mirror of
https://github.com/Arman92/go-tdlib.git
synced 2024-09-13 03:10:38 +02:00
36532 lines
1.4 MiB
Executable file
36532 lines
1.4 MiB
Executable file
package tdlib
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"strconv"
|
|
"strings"
|
|
)
|
|
|
|
type tdCommon struct {
|
|
Type string `json:"@type"`
|
|
Extra string `json:"@extra"`
|
|
}
|
|
|
|
// JSONInt64 alias for int64, in order to deal with json big number problem
|
|
type JSONInt64 int64
|
|
|
|
// MarshalJSON marshals to json
|
|
func (jsonInt *JSONInt64) MarshalJSON() ([]byte, error) {
|
|
intStr := strconv.FormatInt(int64(*jsonInt), 10)
|
|
return []byte(intStr), nil
|
|
}
|
|
|
|
// UnmarshalJSON unmarshals from json
|
|
func (jsonInt *JSONInt64) UnmarshalJSON(b []byte) error {
|
|
intStr := string(b)
|
|
intStr = strings.Replace(intStr, "\"", "", 2)
|
|
jsonBigInt, err := strconv.ParseInt(intStr, 10, 64)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
*jsonInt = JSONInt64(jsonBigInt)
|
|
return nil
|
|
}
|
|
|
|
// TdMessage is the interface for all messages send and received to/from tdlib
|
|
type TdMessage interface {
|
|
MessageType() string
|
|
}
|
|
|
|
// AuthenticationCodeTypeEnum Alias for abstract AuthenticationCodeType 'Sub-Classes', used as constant-enum here
|
|
type AuthenticationCodeTypeEnum string
|
|
|
|
// AuthenticationCodeType enums
|
|
const (
|
|
AuthenticationCodeTypeTelegramMessageType AuthenticationCodeTypeEnum = "authenticationCodeTypeTelegramMessage"
|
|
AuthenticationCodeTypeSmsType AuthenticationCodeTypeEnum = "authenticationCodeTypeSms"
|
|
AuthenticationCodeTypeCallType AuthenticationCodeTypeEnum = "authenticationCodeTypeCall"
|
|
AuthenticationCodeTypeFlashCallType AuthenticationCodeTypeEnum = "authenticationCodeTypeFlashCall"
|
|
)
|
|
|
|
// AuthorizationStateEnum Alias for abstract AuthorizationState 'Sub-Classes', used as constant-enum here
|
|
type AuthorizationStateEnum string
|
|
|
|
// AuthorizationState enums
|
|
const (
|
|
AuthorizationStateWaitTdlibParametersType AuthorizationStateEnum = "authorizationStateWaitTdlibParameters"
|
|
AuthorizationStateWaitEncryptionKeyType AuthorizationStateEnum = "authorizationStateWaitEncryptionKey"
|
|
AuthorizationStateWaitPhoneNumberType AuthorizationStateEnum = "authorizationStateWaitPhoneNumber"
|
|
AuthorizationStateWaitCodeType AuthorizationStateEnum = "authorizationStateWaitCode"
|
|
AuthorizationStateWaitOtherDeviceConfirmationType AuthorizationStateEnum = "authorizationStateWaitOtherDeviceConfirmation"
|
|
AuthorizationStateWaitRegistrationType AuthorizationStateEnum = "authorizationStateWaitRegistration"
|
|
AuthorizationStateWaitPasswordType AuthorizationStateEnum = "authorizationStateWaitPassword"
|
|
AuthorizationStateReadyType AuthorizationStateEnum = "authorizationStateReady"
|
|
AuthorizationStateLoggingOutType AuthorizationStateEnum = "authorizationStateLoggingOut"
|
|
AuthorizationStateClosingType AuthorizationStateEnum = "authorizationStateClosing"
|
|
AuthorizationStateClosedType AuthorizationStateEnum = "authorizationStateClosed"
|
|
)
|
|
|
|
// InputFileEnum Alias for abstract InputFile 'Sub-Classes', used as constant-enum here
|
|
type InputFileEnum string
|
|
|
|
// InputFile enums
|
|
const (
|
|
InputFileIDType InputFileEnum = "inputFileID"
|
|
InputFileRemoteType InputFileEnum = "inputFileRemote"
|
|
InputFileLocalType InputFileEnum = "inputFileLocal"
|
|
InputFileGeneratedType InputFileEnum = "inputFileGenerated"
|
|
)
|
|
|
|
// ThumbnailFormatEnum Alias for abstract ThumbnailFormat 'Sub-Classes', used as constant-enum here
|
|
type ThumbnailFormatEnum string
|
|
|
|
// ThumbnailFormat enums
|
|
const (
|
|
ThumbnailFormatJpegType ThumbnailFormatEnum = "thumbnailFormatJpeg"
|
|
ThumbnailFormatPngType ThumbnailFormatEnum = "thumbnailFormatPng"
|
|
ThumbnailFormatWebpType ThumbnailFormatEnum = "thumbnailFormatWebp"
|
|
ThumbnailFormatGifType ThumbnailFormatEnum = "thumbnailFormatGif"
|
|
ThumbnailFormatTgsType ThumbnailFormatEnum = "thumbnailFormatTgs"
|
|
ThumbnailFormatMpeg4Type ThumbnailFormatEnum = "thumbnailFormatMpeg4"
|
|
)
|
|
|
|
// MaskPointEnum Alias for abstract MaskPoint 'Sub-Classes', used as constant-enum here
|
|
type MaskPointEnum string
|
|
|
|
// MaskPoint enums
|
|
const (
|
|
MaskPointForeheadType MaskPointEnum = "maskPointForehead"
|
|
MaskPointEyesType MaskPointEnum = "maskPointEyes"
|
|
MaskPointMouthType MaskPointEnum = "maskPointMouth"
|
|
MaskPointChinType MaskPointEnum = "maskPointChin"
|
|
)
|
|
|
|
// PollTypeEnum Alias for abstract PollType 'Sub-Classes', used as constant-enum here
|
|
type PollTypeEnum string
|
|
|
|
// PollType enums
|
|
const (
|
|
PollTypeRegularType PollTypeEnum = "pollTypeRegular"
|
|
PollTypeQuizType PollTypeEnum = "pollTypeQuiz"
|
|
)
|
|
|
|
// UserTypeEnum Alias for abstract UserType 'Sub-Classes', used as constant-enum here
|
|
type UserTypeEnum string
|
|
|
|
// UserType enums
|
|
const (
|
|
UserTypeRegularType UserTypeEnum = "userTypeRegular"
|
|
UserTypeDeletedType UserTypeEnum = "userTypeDeleted"
|
|
UserTypeBotType UserTypeEnum = "userTypeBot"
|
|
UserTypeUnknownType UserTypeEnum = "userTypeUnknown"
|
|
)
|
|
|
|
// InputChatPhotoEnum Alias for abstract InputChatPhoto 'Sub-Classes', used as constant-enum here
|
|
type InputChatPhotoEnum string
|
|
|
|
// InputChatPhoto enums
|
|
const (
|
|
InputChatPhotoPreviousType InputChatPhotoEnum = "inputChatPhotoPrevious"
|
|
InputChatPhotoStaticType InputChatPhotoEnum = "inputChatPhotoStatic"
|
|
InputChatPhotoAnimationType InputChatPhotoEnum = "inputChatPhotoAnimation"
|
|
)
|
|
|
|
// ChatMemberStatusEnum Alias for abstract ChatMemberStatus 'Sub-Classes', used as constant-enum here
|
|
type ChatMemberStatusEnum string
|
|
|
|
// ChatMemberStatus enums
|
|
const (
|
|
ChatMemberStatusCreatorType ChatMemberStatusEnum = "chatMemberStatusCreator"
|
|
ChatMemberStatusAdministratorType ChatMemberStatusEnum = "chatMemberStatusAdministrator"
|
|
ChatMemberStatusMemberType ChatMemberStatusEnum = "chatMemberStatusMember"
|
|
ChatMemberStatusRestrictedType ChatMemberStatusEnum = "chatMemberStatusRestricted"
|
|
ChatMemberStatusLeftType ChatMemberStatusEnum = "chatMemberStatusLeft"
|
|
ChatMemberStatusBannedType ChatMemberStatusEnum = "chatMemberStatusBanned"
|
|
)
|
|
|
|
// ChatMembersFilterEnum Alias for abstract ChatMembersFilter 'Sub-Classes', used as constant-enum here
|
|
type ChatMembersFilterEnum string
|
|
|
|
// ChatMembersFilter enums
|
|
const (
|
|
ChatMembersFilterContactsType ChatMembersFilterEnum = "chatMembersFilterContacts"
|
|
ChatMembersFilterAdministratorsType ChatMembersFilterEnum = "chatMembersFilterAdministrators"
|
|
ChatMembersFilterMembersType ChatMembersFilterEnum = "chatMembersFilterMembers"
|
|
ChatMembersFilterMentionType ChatMembersFilterEnum = "chatMembersFilterMention"
|
|
ChatMembersFilterRestrictedType ChatMembersFilterEnum = "chatMembersFilterRestricted"
|
|
ChatMembersFilterBannedType ChatMembersFilterEnum = "chatMembersFilterBanned"
|
|
ChatMembersFilterBotsType ChatMembersFilterEnum = "chatMembersFilterBots"
|
|
)
|
|
|
|
// SupergroupMembersFilterEnum Alias for abstract SupergroupMembersFilter 'Sub-Classes', used as constant-enum here
|
|
type SupergroupMembersFilterEnum string
|
|
|
|
// SupergroupMembersFilter enums
|
|
const (
|
|
SupergroupMembersFilterRecentType SupergroupMembersFilterEnum = "supergroupMembersFilterRecent"
|
|
SupergroupMembersFilterContactsType SupergroupMembersFilterEnum = "supergroupMembersFilterContacts"
|
|
SupergroupMembersFilterAdministratorsType SupergroupMembersFilterEnum = "supergroupMembersFilterAdministrators"
|
|
SupergroupMembersFilterSearchType SupergroupMembersFilterEnum = "supergroupMembersFilterSearch"
|
|
SupergroupMembersFilterRestrictedType SupergroupMembersFilterEnum = "supergroupMembersFilterRestricted"
|
|
SupergroupMembersFilterBannedType SupergroupMembersFilterEnum = "supergroupMembersFilterBanned"
|
|
SupergroupMembersFilterMentionType SupergroupMembersFilterEnum = "supergroupMembersFilterMention"
|
|
SupergroupMembersFilterBotsType SupergroupMembersFilterEnum = "supergroupMembersFilterBots"
|
|
)
|
|
|
|
// SecretChatStateEnum Alias for abstract SecretChatState 'Sub-Classes', used as constant-enum here
|
|
type SecretChatStateEnum string
|
|
|
|
// SecretChatState enums
|
|
const (
|
|
SecretChatStatePendingType SecretChatStateEnum = "secretChatStatePending"
|
|
SecretChatStateReadyType SecretChatStateEnum = "secretChatStateReady"
|
|
SecretChatStateClosedType SecretChatStateEnum = "secretChatStateClosed"
|
|
)
|
|
|
|
// MessageSenderEnum Alias for abstract MessageSender 'Sub-Classes', used as constant-enum here
|
|
type MessageSenderEnum string
|
|
|
|
// MessageSender enums
|
|
const (
|
|
MessageSenderUserType MessageSenderEnum = "messageSenderUser"
|
|
MessageSenderChatType MessageSenderEnum = "messageSenderChat"
|
|
)
|
|
|
|
// MessageForwardOriginEnum Alias for abstract MessageForwardOrigin 'Sub-Classes', used as constant-enum here
|
|
type MessageForwardOriginEnum string
|
|
|
|
// MessageForwardOrigin enums
|
|
const (
|
|
MessageForwardOriginUserType MessageForwardOriginEnum = "messageForwardOriginUser"
|
|
MessageForwardOriginChatType MessageForwardOriginEnum = "messageForwardOriginChat"
|
|
MessageForwardOriginHiddenUserType MessageForwardOriginEnum = "messageForwardOriginHiddenUser"
|
|
MessageForwardOriginChannelType MessageForwardOriginEnum = "messageForwardOriginChannel"
|
|
MessageForwardOriginMessageImportType MessageForwardOriginEnum = "messageForwardOriginMessageImport"
|
|
)
|
|
|
|
// MessageSendingStateEnum Alias for abstract MessageSendingState 'Sub-Classes', used as constant-enum here
|
|
type MessageSendingStateEnum string
|
|
|
|
// MessageSendingState enums
|
|
const (
|
|
MessageSendingStatePendingType MessageSendingStateEnum = "messageSendingStatePending"
|
|
MessageSendingStateFailedType MessageSendingStateEnum = "messageSendingStateFailed"
|
|
)
|
|
|
|
// NotificationSettingsScopeEnum Alias for abstract NotificationSettingsScope 'Sub-Classes', used as constant-enum here
|
|
type NotificationSettingsScopeEnum string
|
|
|
|
// NotificationSettingsScope enums
|
|
const (
|
|
NotificationSettingsScopePrivateChatsType NotificationSettingsScopeEnum = "notificationSettingsScopePrivateChats"
|
|
NotificationSettingsScopeGroupChatsType NotificationSettingsScopeEnum = "notificationSettingsScopeGroupChats"
|
|
NotificationSettingsScopeChannelChatsType NotificationSettingsScopeEnum = "notificationSettingsScopeChannelChats"
|
|
)
|
|
|
|
// ChatTypeEnum Alias for abstract ChatType 'Sub-Classes', used as constant-enum here
|
|
type ChatTypeEnum string
|
|
|
|
// ChatType enums
|
|
const (
|
|
ChatTypePrivateType ChatTypeEnum = "chatTypePrivate"
|
|
ChatTypeBasicGroupType ChatTypeEnum = "chatTypeBasicGroup"
|
|
ChatTypeSupergroupType ChatTypeEnum = "chatTypeSupergroup"
|
|
ChatTypeSecretType ChatTypeEnum = "chatTypeSecret"
|
|
)
|
|
|
|
// ChatListEnum Alias for abstract ChatList 'Sub-Classes', used as constant-enum here
|
|
type ChatListEnum string
|
|
|
|
// ChatList enums
|
|
const (
|
|
ChatListMainType ChatListEnum = "chatListMain"
|
|
ChatListArchiveType ChatListEnum = "chatListArchive"
|
|
ChatListFilterType ChatListEnum = "chatListFilter"
|
|
)
|
|
|
|
// ChatSourceEnum Alias for abstract ChatSource 'Sub-Classes', used as constant-enum here
|
|
type ChatSourceEnum string
|
|
|
|
// ChatSource enums
|
|
const (
|
|
ChatSourceMtprotoProxyType ChatSourceEnum = "chatSourceMtprotoProxy"
|
|
ChatSourcePublicServiceAnnouncementType ChatSourceEnum = "chatSourcePublicServiceAnnouncement"
|
|
)
|
|
|
|
// PublicChatTypeEnum Alias for abstract PublicChatType 'Sub-Classes', used as constant-enum here
|
|
type PublicChatTypeEnum string
|
|
|
|
// PublicChatType enums
|
|
const (
|
|
PublicChatTypeHasUsernameType PublicChatTypeEnum = "publicChatTypeHasUsername"
|
|
PublicChatTypeIsLocationBasedType PublicChatTypeEnum = "publicChatTypeIsLocationBased"
|
|
)
|
|
|
|
// ChatActionBarEnum Alias for abstract ChatActionBar 'Sub-Classes', used as constant-enum here
|
|
type ChatActionBarEnum string
|
|
|
|
// ChatActionBar enums
|
|
const (
|
|
ChatActionBarReportSpamType ChatActionBarEnum = "chatActionBarReportSpam"
|
|
ChatActionBarReportUnrelatedLocationType ChatActionBarEnum = "chatActionBarReportUnrelatedLocation"
|
|
ChatActionBarInviteMembersType ChatActionBarEnum = "chatActionBarInviteMembers"
|
|
ChatActionBarReportAddBlockType ChatActionBarEnum = "chatActionBarReportAddBlock"
|
|
ChatActionBarAddContactType ChatActionBarEnum = "chatActionBarAddContact"
|
|
ChatActionBarSharePhoneNumberType ChatActionBarEnum = "chatActionBarSharePhoneNumber"
|
|
)
|
|
|
|
// KeyboardButtonTypeEnum Alias for abstract KeyboardButtonType 'Sub-Classes', used as constant-enum here
|
|
type KeyboardButtonTypeEnum string
|
|
|
|
// KeyboardButtonType enums
|
|
const (
|
|
KeyboardButtonTypeTextType KeyboardButtonTypeEnum = "keyboardButtonTypeText"
|
|
KeyboardButtonTypeRequestPhoneNumberType KeyboardButtonTypeEnum = "keyboardButtonTypeRequestPhoneNumber"
|
|
KeyboardButtonTypeRequestLocationType KeyboardButtonTypeEnum = "keyboardButtonTypeRequestLocation"
|
|
KeyboardButtonTypeRequestPollType KeyboardButtonTypeEnum = "keyboardButtonTypeRequestPoll"
|
|
)
|
|
|
|
// InlineKeyboardButtonTypeEnum Alias for abstract InlineKeyboardButtonType 'Sub-Classes', used as constant-enum here
|
|
type InlineKeyboardButtonTypeEnum string
|
|
|
|
// InlineKeyboardButtonType enums
|
|
const (
|
|
InlineKeyboardButtonTypeURLType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeURL"
|
|
InlineKeyboardButtonTypeLoginURLType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeLoginURL"
|
|
InlineKeyboardButtonTypeCallbackType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeCallback"
|
|
InlineKeyboardButtonTypeCallbackWithPasswordType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeCallbackWithPassword"
|
|
InlineKeyboardButtonTypeCallbackGameType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeCallbackGame"
|
|
InlineKeyboardButtonTypeSwitchInlineType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeSwitchInline"
|
|
InlineKeyboardButtonTypeBuyType InlineKeyboardButtonTypeEnum = "inlineKeyboardButtonTypeBuy"
|
|
)
|
|
|
|
// ReplyMarkupEnum Alias for abstract ReplyMarkup 'Sub-Classes', used as constant-enum here
|
|
type ReplyMarkupEnum string
|
|
|
|
// ReplyMarkup enums
|
|
const (
|
|
ReplyMarkupRemoveKeyboardType ReplyMarkupEnum = "replyMarkupRemoveKeyboard"
|
|
ReplyMarkupForceReplyType ReplyMarkupEnum = "replyMarkupForceReply"
|
|
ReplyMarkupShowKeyboardType ReplyMarkupEnum = "replyMarkupShowKeyboard"
|
|
ReplyMarkupInlineKeyboardType ReplyMarkupEnum = "replyMarkupInlineKeyboard"
|
|
)
|
|
|
|
// LoginURLInfoEnum Alias for abstract LoginURLInfo 'Sub-Classes', used as constant-enum here
|
|
type LoginURLInfoEnum string
|
|
|
|
// LoginURLInfo enums
|
|
const (
|
|
LoginURLInfoOpenType LoginURLInfoEnum = "loginURLInfoOpen"
|
|
LoginURLInfoRequestConfirmationType LoginURLInfoEnum = "loginURLInfoRequestConfirmation"
|
|
)
|
|
|
|
// RichTextEnum Alias for abstract RichText 'Sub-Classes', used as constant-enum here
|
|
type RichTextEnum string
|
|
|
|
// RichText enums
|
|
const (
|
|
RichTextPlainType RichTextEnum = "richTextPlain"
|
|
RichTextBoldType RichTextEnum = "richTextBold"
|
|
RichTextItalicType RichTextEnum = "richTextItalic"
|
|
RichTextUnderlineType RichTextEnum = "richTextUnderline"
|
|
RichTextStrikethroughType RichTextEnum = "richTextStrikethrough"
|
|
RichTextFixedType RichTextEnum = "richTextFixed"
|
|
RichTextURLType RichTextEnum = "richTextURL"
|
|
RichTextEmailAddressType RichTextEnum = "richTextEmailAddress"
|
|
RichTextSubscriptType RichTextEnum = "richTextSubscript"
|
|
RichTextSuperscriptType RichTextEnum = "richTextSuperscript"
|
|
RichTextMarkedType RichTextEnum = "richTextMarked"
|
|
RichTextPhoneNumberType RichTextEnum = "richTextPhoneNumber"
|
|
RichTextIconType RichTextEnum = "richTextIcon"
|
|
RichTextReferenceType RichTextEnum = "richTextReference"
|
|
RichTextAnchorType RichTextEnum = "richTextAnchor"
|
|
RichTextAnchorLinkType RichTextEnum = "richTextAnchorLink"
|
|
RichTextsType RichTextEnum = "richTexts"
|
|
)
|
|
|
|
// PageBlockHorizontalAlignmentEnum Alias for abstract PageBlockHorizontalAlignment 'Sub-Classes', used as constant-enum here
|
|
type PageBlockHorizontalAlignmentEnum string
|
|
|
|
// PageBlockHorizontalAlignment enums
|
|
const (
|
|
PageBlockHorizontalAlignmentLeftType PageBlockHorizontalAlignmentEnum = "pageBlockHorizontalAlignmentLeft"
|
|
PageBlockHorizontalAlignmentCenterType PageBlockHorizontalAlignmentEnum = "pageBlockHorizontalAlignmentCenter"
|
|
PageBlockHorizontalAlignmentRightType PageBlockHorizontalAlignmentEnum = "pageBlockHorizontalAlignmentRight"
|
|
)
|
|
|
|
// PageBlockVerticalAlignmentEnum Alias for abstract PageBlockVerticalAlignment 'Sub-Classes', used as constant-enum here
|
|
type PageBlockVerticalAlignmentEnum string
|
|
|
|
// PageBlockVerticalAlignment enums
|
|
const (
|
|
PageBlockVerticalAlignmentTopType PageBlockVerticalAlignmentEnum = "pageBlockVerticalAlignmentTop"
|
|
PageBlockVerticalAlignmentMiddleType PageBlockVerticalAlignmentEnum = "pageBlockVerticalAlignmentMiddle"
|
|
PageBlockVerticalAlignmentBottomType PageBlockVerticalAlignmentEnum = "pageBlockVerticalAlignmentBottom"
|
|
)
|
|
|
|
// PageBlockEnum Alias for abstract PageBlock 'Sub-Classes', used as constant-enum here
|
|
type PageBlockEnum string
|
|
|
|
// PageBlock enums
|
|
const (
|
|
PageBlockTitleType PageBlockEnum = "pageBlockTitle"
|
|
PageBlockSubtitleType PageBlockEnum = "pageBlockSubtitle"
|
|
PageBlockAuthorDateType PageBlockEnum = "pageBlockAuthorDate"
|
|
PageBlockHeaderType PageBlockEnum = "pageBlockHeader"
|
|
PageBlockSubheaderType PageBlockEnum = "pageBlockSubheader"
|
|
PageBlockKickerType PageBlockEnum = "pageBlockKicker"
|
|
PageBlockParagraphType PageBlockEnum = "pageBlockParagraph"
|
|
PageBlockPreformattedType PageBlockEnum = "pageBlockPreformatted"
|
|
PageBlockFooterType PageBlockEnum = "pageBlockFooter"
|
|
PageBlockDividerType PageBlockEnum = "pageBlockDivider"
|
|
PageBlockAnchorType PageBlockEnum = "pageBlockAnchor"
|
|
PageBlockListType PageBlockEnum = "pageBlockList"
|
|
PageBlockBlockQuoteType PageBlockEnum = "pageBlockBlockQuote"
|
|
PageBlockPullQuoteType PageBlockEnum = "pageBlockPullQuote"
|
|
PageBlockAnimationType PageBlockEnum = "pageBlockAnimation"
|
|
PageBlockAudioType PageBlockEnum = "pageBlockAudio"
|
|
PageBlockPhotoType PageBlockEnum = "pageBlockPhoto"
|
|
PageBlockVideoType PageBlockEnum = "pageBlockVideo"
|
|
PageBlockVoiceNoteType PageBlockEnum = "pageBlockVoiceNote"
|
|
PageBlockCoverType PageBlockEnum = "pageBlockCover"
|
|
PageBlockEmbeddedType PageBlockEnum = "pageBlockEmbedded"
|
|
PageBlockEmbeddedPostType PageBlockEnum = "pageBlockEmbeddedPost"
|
|
PageBlockCollageType PageBlockEnum = "pageBlockCollage"
|
|
PageBlockSlideshowType PageBlockEnum = "pageBlockSlideshow"
|
|
PageBlockChatLinkType PageBlockEnum = "pageBlockChatLink"
|
|
PageBlockTableType PageBlockEnum = "pageBlockTable"
|
|
PageBlockDetailsType PageBlockEnum = "pageBlockDetails"
|
|
PageBlockRelatedArticlesType PageBlockEnum = "pageBlockRelatedArticles"
|
|
PageBlockMapType PageBlockEnum = "pageBlockMap"
|
|
)
|
|
|
|
// InputCredentialsEnum Alias for abstract InputCredentials 'Sub-Classes', used as constant-enum here
|
|
type InputCredentialsEnum string
|
|
|
|
// InputCredentials enums
|
|
const (
|
|
InputCredentialsSavedType InputCredentialsEnum = "inputCredentialsSaved"
|
|
InputCredentialsNewType InputCredentialsEnum = "inputCredentialsNew"
|
|
InputCredentialsApplePayType InputCredentialsEnum = "inputCredentialsApplePay"
|
|
InputCredentialsGooglePayType InputCredentialsEnum = "inputCredentialsGooglePay"
|
|
)
|
|
|
|
// PassportElementTypeEnum Alias for abstract PassportElementType 'Sub-Classes', used as constant-enum here
|
|
type PassportElementTypeEnum string
|
|
|
|
// PassportElementType enums
|
|
const (
|
|
PassportElementTypePersonalDetailsType PassportElementTypeEnum = "passportElementTypePersonalDetails"
|
|
PassportElementTypePassportType PassportElementTypeEnum = "passportElementTypePassport"
|
|
PassportElementTypeDriverLicenseType PassportElementTypeEnum = "passportElementTypeDriverLicense"
|
|
PassportElementTypeIDentityCardType PassportElementTypeEnum = "passportElementTypeIDentityCard"
|
|
PassportElementTypeInternalPassportType PassportElementTypeEnum = "passportElementTypeInternalPassport"
|
|
PassportElementTypeAddressType PassportElementTypeEnum = "passportElementTypeAddress"
|
|
PassportElementTypeUtilityBillType PassportElementTypeEnum = "passportElementTypeUtilityBill"
|
|
PassportElementTypeBankStatementType PassportElementTypeEnum = "passportElementTypeBankStatement"
|
|
PassportElementTypeRentalAgreementType PassportElementTypeEnum = "passportElementTypeRentalAgreement"
|
|
PassportElementTypePassportRegistrationType PassportElementTypeEnum = "passportElementTypePassportRegistration"
|
|
PassportElementTypeTemporaryRegistrationType PassportElementTypeEnum = "passportElementTypeTemporaryRegistration"
|
|
PassportElementTypePhoneNumberType PassportElementTypeEnum = "passportElementTypePhoneNumber"
|
|
PassportElementTypeEmailAddressType PassportElementTypeEnum = "passportElementTypeEmailAddress"
|
|
)
|
|
|
|
// PassportElementEnum Alias for abstract PassportElement 'Sub-Classes', used as constant-enum here
|
|
type PassportElementEnum string
|
|
|
|
// PassportElement enums
|
|
const (
|
|
PassportElementPersonalDetailsType PassportElementEnum = "passportElementPersonalDetails"
|
|
PassportElementPassportType PassportElementEnum = "passportElementPassport"
|
|
PassportElementDriverLicenseType PassportElementEnum = "passportElementDriverLicense"
|
|
PassportElementIDentityCardType PassportElementEnum = "passportElementIDentityCard"
|
|
PassportElementInternalPassportType PassportElementEnum = "passportElementInternalPassport"
|
|
PassportElementAddressType PassportElementEnum = "passportElementAddress"
|
|
PassportElementUtilityBillType PassportElementEnum = "passportElementUtilityBill"
|
|
PassportElementBankStatementType PassportElementEnum = "passportElementBankStatement"
|
|
PassportElementRentalAgreementType PassportElementEnum = "passportElementRentalAgreement"
|
|
PassportElementPassportRegistrationType PassportElementEnum = "passportElementPassportRegistration"
|
|
PassportElementTemporaryRegistrationType PassportElementEnum = "passportElementTemporaryRegistration"
|
|
PassportElementPhoneNumberType PassportElementEnum = "passportElementPhoneNumber"
|
|
PassportElementEmailAddressType PassportElementEnum = "passportElementEmailAddress"
|
|
)
|
|
|
|
// InputPassportElementEnum Alias for abstract InputPassportElement 'Sub-Classes', used as constant-enum here
|
|
type InputPassportElementEnum string
|
|
|
|
// InputPassportElement enums
|
|
const (
|
|
InputPassportElementPersonalDetailsType InputPassportElementEnum = "inputPassportElementPersonalDetails"
|
|
InputPassportElementPassportType InputPassportElementEnum = "inputPassportElementPassport"
|
|
InputPassportElementDriverLicenseType InputPassportElementEnum = "inputPassportElementDriverLicense"
|
|
InputPassportElementIDentityCardType InputPassportElementEnum = "inputPassportElementIDentityCard"
|
|
InputPassportElementInternalPassportType InputPassportElementEnum = "inputPassportElementInternalPassport"
|
|
InputPassportElementAddressType InputPassportElementEnum = "inputPassportElementAddress"
|
|
InputPassportElementUtilityBillType InputPassportElementEnum = "inputPassportElementUtilityBill"
|
|
InputPassportElementBankStatementType InputPassportElementEnum = "inputPassportElementBankStatement"
|
|
InputPassportElementRentalAgreementType InputPassportElementEnum = "inputPassportElementRentalAgreement"
|
|
InputPassportElementPassportRegistrationType InputPassportElementEnum = "inputPassportElementPassportRegistration"
|
|
InputPassportElementTemporaryRegistrationType InputPassportElementEnum = "inputPassportElementTemporaryRegistration"
|
|
InputPassportElementPhoneNumberType InputPassportElementEnum = "inputPassportElementPhoneNumber"
|
|
InputPassportElementEmailAddressType InputPassportElementEnum = "inputPassportElementEmailAddress"
|
|
)
|
|
|
|
// PassportElementErrorSourceEnum Alias for abstract PassportElementErrorSource 'Sub-Classes', used as constant-enum here
|
|
type PassportElementErrorSourceEnum string
|
|
|
|
// PassportElementErrorSource enums
|
|
const (
|
|
PassportElementErrorSourceUnspecifiedType PassportElementErrorSourceEnum = "passportElementErrorSourceUnspecified"
|
|
PassportElementErrorSourceDataFieldType PassportElementErrorSourceEnum = "passportElementErrorSourceDataField"
|
|
PassportElementErrorSourceFrontSideType PassportElementErrorSourceEnum = "passportElementErrorSourceFrontSide"
|
|
PassportElementErrorSourceReverseSideType PassportElementErrorSourceEnum = "passportElementErrorSourceReverseSide"
|
|
PassportElementErrorSourceSelfieType PassportElementErrorSourceEnum = "passportElementErrorSourceSelfie"
|
|
PassportElementErrorSourceTranslationFileType PassportElementErrorSourceEnum = "passportElementErrorSourceTranslationFile"
|
|
PassportElementErrorSourceTranslationFilesType PassportElementErrorSourceEnum = "passportElementErrorSourceTranslationFiles"
|
|
PassportElementErrorSourceFileType PassportElementErrorSourceEnum = "passportElementErrorSourceFile"
|
|
PassportElementErrorSourceFilesType PassportElementErrorSourceEnum = "passportElementErrorSourceFiles"
|
|
)
|
|
|
|
// InputPassportElementErrorSourceEnum Alias for abstract InputPassportElementErrorSource 'Sub-Classes', used as constant-enum here
|
|
type InputPassportElementErrorSourceEnum string
|
|
|
|
// InputPassportElementErrorSource enums
|
|
const (
|
|
InputPassportElementErrorSourceUnspecifiedType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceUnspecified"
|
|
InputPassportElementErrorSourceDataFieldType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceDataField"
|
|
InputPassportElementErrorSourceFrontSideType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceFrontSide"
|
|
InputPassportElementErrorSourceReverseSideType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceReverseSide"
|
|
InputPassportElementErrorSourceSelfieType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceSelfie"
|
|
InputPassportElementErrorSourceTranslationFileType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceTranslationFile"
|
|
InputPassportElementErrorSourceTranslationFilesType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceTranslationFiles"
|
|
InputPassportElementErrorSourceFileType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceFile"
|
|
InputPassportElementErrorSourceFilesType InputPassportElementErrorSourceEnum = "inputPassportElementErrorSourceFiles"
|
|
)
|
|
|
|
// MessageContentEnum Alias for abstract MessageContent 'Sub-Classes', used as constant-enum here
|
|
type MessageContentEnum string
|
|
|
|
// MessageContent enums
|
|
const (
|
|
MessageTextType MessageContentEnum = "messageText"
|
|
MessageAnimationType MessageContentEnum = "messageAnimation"
|
|
MessageAudioType MessageContentEnum = "messageAudio"
|
|
MessageDocumentType MessageContentEnum = "messageDocument"
|
|
MessagePhotoType MessageContentEnum = "messagePhoto"
|
|
MessageExpiredPhotoType MessageContentEnum = "messageExpiredPhoto"
|
|
MessageStickerType MessageContentEnum = "messageSticker"
|
|
MessageVideoType MessageContentEnum = "messageVideo"
|
|
MessageExpiredVideoType MessageContentEnum = "messageExpiredVideo"
|
|
MessageVideoNoteType MessageContentEnum = "messageVideoNote"
|
|
MessageVoiceNoteType MessageContentEnum = "messageVoiceNote"
|
|
MessageLocationType MessageContentEnum = "messageLocation"
|
|
MessageVenueType MessageContentEnum = "messageVenue"
|
|
MessageContactType MessageContentEnum = "messageContact"
|
|
MessageDiceType MessageContentEnum = "messageDice"
|
|
MessageGameType MessageContentEnum = "messageGame"
|
|
MessagePollType MessageContentEnum = "messagePoll"
|
|
MessageInvoiceType MessageContentEnum = "messageInvoice"
|
|
MessageCallType MessageContentEnum = "messageCall"
|
|
MessageVoiceChatStartedType MessageContentEnum = "messageVoiceChatStarted"
|
|
MessageVoiceChatEndedType MessageContentEnum = "messageVoiceChatEnded"
|
|
MessageInviteVoiceChatParticipantsType MessageContentEnum = "messageInviteVoiceChatParticipants"
|
|
MessageBasicGroupChatCreateType MessageContentEnum = "messageBasicGroupChatCreate"
|
|
MessageSupergroupChatCreateType MessageContentEnum = "messageSupergroupChatCreate"
|
|
MessageChatChangeTitleType MessageContentEnum = "messageChatChangeTitle"
|
|
MessageChatChangePhotoType MessageContentEnum = "messageChatChangePhoto"
|
|
MessageChatDeletePhotoType MessageContentEnum = "messageChatDeletePhoto"
|
|
MessageChatAddMembersType MessageContentEnum = "messageChatAddMembers"
|
|
MessageChatJoinByLinkType MessageContentEnum = "messageChatJoinByLink"
|
|
MessageChatDeleteMemberType MessageContentEnum = "messageChatDeleteMember"
|
|
MessageChatUpgradeToType MessageContentEnum = "messageChatUpgradeTo"
|
|
MessageChatUpgradeFromType MessageContentEnum = "messageChatUpgradeFrom"
|
|
MessagePinMessageType MessageContentEnum = "messagePinMessage"
|
|
MessageScreenshotTakenType MessageContentEnum = "messageScreenshotTaken"
|
|
MessageChatSetTTLType MessageContentEnum = "messageChatSetTTL"
|
|
MessageCustomServiceActionType MessageContentEnum = "messageCustomServiceAction"
|
|
MessageGameScoreType MessageContentEnum = "messageGameScore"
|
|
MessagePaymentSuccessfulType MessageContentEnum = "messagePaymentSuccessful"
|
|
MessagePaymentSuccessfulBotType MessageContentEnum = "messagePaymentSuccessfulBot"
|
|
MessageContactRegisteredType MessageContentEnum = "messageContactRegistered"
|
|
MessageWebsiteConnectedType MessageContentEnum = "messageWebsiteConnected"
|
|
MessagePassportDataSentType MessageContentEnum = "messagePassportDataSent"
|
|
MessagePassportDataReceivedType MessageContentEnum = "messagePassportDataReceived"
|
|
MessageProximityAlertTriggeredType MessageContentEnum = "messageProximityAlertTriggered"
|
|
MessageUnsupportedType MessageContentEnum = "messageUnsupported"
|
|
)
|
|
|
|
// TextEntityTypeEnum Alias for abstract TextEntityType 'Sub-Classes', used as constant-enum here
|
|
type TextEntityTypeEnum string
|
|
|
|
// TextEntityType enums
|
|
const (
|
|
TextEntityTypeMentionType TextEntityTypeEnum = "textEntityTypeMention"
|
|
TextEntityTypeHashtagType TextEntityTypeEnum = "textEntityTypeHashtag"
|
|
TextEntityTypeCashtagType TextEntityTypeEnum = "textEntityTypeCashtag"
|
|
TextEntityTypeBotCommandType TextEntityTypeEnum = "textEntityTypeBotCommand"
|
|
TextEntityTypeURLType TextEntityTypeEnum = "textEntityTypeURL"
|
|
TextEntityTypeEmailAddressType TextEntityTypeEnum = "textEntityTypeEmailAddress"
|
|
TextEntityTypePhoneNumberType TextEntityTypeEnum = "textEntityTypePhoneNumber"
|
|
TextEntityTypeBankCardNumberType TextEntityTypeEnum = "textEntityTypeBankCardNumber"
|
|
TextEntityTypeBoldType TextEntityTypeEnum = "textEntityTypeBold"
|
|
TextEntityTypeItalicType TextEntityTypeEnum = "textEntityTypeItalic"
|
|
TextEntityTypeUnderlineType TextEntityTypeEnum = "textEntityTypeUnderline"
|
|
TextEntityTypeStrikethroughType TextEntityTypeEnum = "textEntityTypeStrikethrough"
|
|
TextEntityTypeCodeType TextEntityTypeEnum = "textEntityTypeCode"
|
|
TextEntityTypePreType TextEntityTypeEnum = "textEntityTypePre"
|
|
TextEntityTypePreCodeType TextEntityTypeEnum = "textEntityTypePreCode"
|
|
TextEntityTypeTextURLType TextEntityTypeEnum = "textEntityTypeTextURL"
|
|
TextEntityTypeMentionNameType TextEntityTypeEnum = "textEntityTypeMentionName"
|
|
)
|
|
|
|
// MessageSchedulingStateEnum Alias for abstract MessageSchedulingState 'Sub-Classes', used as constant-enum here
|
|
type MessageSchedulingStateEnum string
|
|
|
|
// MessageSchedulingState enums
|
|
const (
|
|
MessageSchedulingStateSendAtDateType MessageSchedulingStateEnum = "messageSchedulingStateSendAtDate"
|
|
MessageSchedulingStateSendWhenOnlineType MessageSchedulingStateEnum = "messageSchedulingStateSendWhenOnline"
|
|
)
|
|
|
|
// InputMessageContentEnum Alias for abstract InputMessageContent 'Sub-Classes', used as constant-enum here
|
|
type InputMessageContentEnum string
|
|
|
|
// InputMessageContent enums
|
|
const (
|
|
InputMessageTextType InputMessageContentEnum = "inputMessageText"
|
|
InputMessageAnimationType InputMessageContentEnum = "inputMessageAnimation"
|
|
InputMessageAudioType InputMessageContentEnum = "inputMessageAudio"
|
|
InputMessageDocumentType InputMessageContentEnum = "inputMessageDocument"
|
|
InputMessagePhotoType InputMessageContentEnum = "inputMessagePhoto"
|
|
InputMessageStickerType InputMessageContentEnum = "inputMessageSticker"
|
|
InputMessageVideoType InputMessageContentEnum = "inputMessageVideo"
|
|
InputMessageVideoNoteType InputMessageContentEnum = "inputMessageVideoNote"
|
|
InputMessageVoiceNoteType InputMessageContentEnum = "inputMessageVoiceNote"
|
|
InputMessageLocationType InputMessageContentEnum = "inputMessageLocation"
|
|
InputMessageVenueType InputMessageContentEnum = "inputMessageVenue"
|
|
InputMessageContactType InputMessageContentEnum = "inputMessageContact"
|
|
InputMessageDiceType InputMessageContentEnum = "inputMessageDice"
|
|
InputMessageGameType InputMessageContentEnum = "inputMessageGame"
|
|
InputMessageInvoiceType InputMessageContentEnum = "inputMessageInvoice"
|
|
InputMessagePollType InputMessageContentEnum = "inputMessagePoll"
|
|
InputMessageForwardedType InputMessageContentEnum = "inputMessageForwarded"
|
|
)
|
|
|
|
// SearchMessagesFilterEnum Alias for abstract SearchMessagesFilter 'Sub-Classes', used as constant-enum here
|
|
type SearchMessagesFilterEnum string
|
|
|
|
// SearchMessagesFilter enums
|
|
const (
|
|
SearchMessagesFilterEmptyType SearchMessagesFilterEnum = "searchMessagesFilterEmpty"
|
|
SearchMessagesFilterAnimationType SearchMessagesFilterEnum = "searchMessagesFilterAnimation"
|
|
SearchMessagesFilterAudioType SearchMessagesFilterEnum = "searchMessagesFilterAudio"
|
|
SearchMessagesFilterDocumentType SearchMessagesFilterEnum = "searchMessagesFilterDocument"
|
|
SearchMessagesFilterPhotoType SearchMessagesFilterEnum = "searchMessagesFilterPhoto"
|
|
SearchMessagesFilterVideoType SearchMessagesFilterEnum = "searchMessagesFilterVideo"
|
|
SearchMessagesFilterVoiceNoteType SearchMessagesFilterEnum = "searchMessagesFilterVoiceNote"
|
|
SearchMessagesFilterPhotoAndVideoType SearchMessagesFilterEnum = "searchMessagesFilterPhotoAndVideo"
|
|
SearchMessagesFilterURLType SearchMessagesFilterEnum = "searchMessagesFilterURL"
|
|
SearchMessagesFilterChatPhotoType SearchMessagesFilterEnum = "searchMessagesFilterChatPhoto"
|
|
SearchMessagesFilterCallType SearchMessagesFilterEnum = "searchMessagesFilterCall"
|
|
SearchMessagesFilterMissedCallType SearchMessagesFilterEnum = "searchMessagesFilterMissedCall"
|
|
SearchMessagesFilterVideoNoteType SearchMessagesFilterEnum = "searchMessagesFilterVideoNote"
|
|
SearchMessagesFilterVoiceAndVideoNoteType SearchMessagesFilterEnum = "searchMessagesFilterVoiceAndVideoNote"
|
|
SearchMessagesFilterMentionType SearchMessagesFilterEnum = "searchMessagesFilterMention"
|
|
SearchMessagesFilterUnreadMentionType SearchMessagesFilterEnum = "searchMessagesFilterUnreadMention"
|
|
SearchMessagesFilterFailedToSendType SearchMessagesFilterEnum = "searchMessagesFilterFailedToSend"
|
|
SearchMessagesFilterPinnedType SearchMessagesFilterEnum = "searchMessagesFilterPinned"
|
|
)
|
|
|
|
// ChatActionEnum Alias for abstract ChatAction 'Sub-Classes', used as constant-enum here
|
|
type ChatActionEnum string
|
|
|
|
// ChatAction enums
|
|
const (
|
|
ChatActionTypingType ChatActionEnum = "chatActionTyping"
|
|
ChatActionRecordingVideoType ChatActionEnum = "chatActionRecordingVideo"
|
|
ChatActionUploadingVideoType ChatActionEnum = "chatActionUploadingVideo"
|
|
ChatActionRecordingVoiceNoteType ChatActionEnum = "chatActionRecordingVoiceNote"
|
|
ChatActionUploadingVoiceNoteType ChatActionEnum = "chatActionUploadingVoiceNote"
|
|
ChatActionUploadingPhotoType ChatActionEnum = "chatActionUploadingPhoto"
|
|
ChatActionUploadingDocumentType ChatActionEnum = "chatActionUploadingDocument"
|
|
ChatActionChoosingLocationType ChatActionEnum = "chatActionChoosingLocation"
|
|
ChatActionChoosingContactType ChatActionEnum = "chatActionChoosingContact"
|
|
ChatActionStartPlayingGameType ChatActionEnum = "chatActionStartPlayingGame"
|
|
ChatActionRecordingVideoNoteType ChatActionEnum = "chatActionRecordingVideoNote"
|
|
ChatActionUploadingVideoNoteType ChatActionEnum = "chatActionUploadingVideoNote"
|
|
ChatActionCancelType ChatActionEnum = "chatActionCancel"
|
|
)
|
|
|
|
// UserStatusEnum Alias for abstract UserStatus 'Sub-Classes', used as constant-enum here
|
|
type UserStatusEnum string
|
|
|
|
// UserStatus enums
|
|
const (
|
|
UserStatusEmptyType UserStatusEnum = "userStatusEmpty"
|
|
UserStatusOnlineType UserStatusEnum = "userStatusOnline"
|
|
UserStatusOfflineType UserStatusEnum = "userStatusOffline"
|
|
UserStatusRecentlyType UserStatusEnum = "userStatusRecently"
|
|
UserStatusLastWeekType UserStatusEnum = "userStatusLastWeek"
|
|
UserStatusLastMonthType UserStatusEnum = "userStatusLastMonth"
|
|
)
|
|
|
|
// CallDiscardReasonEnum Alias for abstract CallDiscardReason 'Sub-Classes', used as constant-enum here
|
|
type CallDiscardReasonEnum string
|
|
|
|
// CallDiscardReason enums
|
|
const (
|
|
CallDiscardReasonEmptyType CallDiscardReasonEnum = "callDiscardReasonEmpty"
|
|
CallDiscardReasonMissedType CallDiscardReasonEnum = "callDiscardReasonMissed"
|
|
CallDiscardReasonDeclinedType CallDiscardReasonEnum = "callDiscardReasonDeclined"
|
|
CallDiscardReasonDisconnectedType CallDiscardReasonEnum = "callDiscardReasonDisconnected"
|
|
CallDiscardReasonHungUpType CallDiscardReasonEnum = "callDiscardReasonHungUp"
|
|
)
|
|
|
|
// CallServerTypeEnum Alias for abstract CallServerType 'Sub-Classes', used as constant-enum here
|
|
type CallServerTypeEnum string
|
|
|
|
// CallServerType enums
|
|
const (
|
|
CallServerTypeTelegramReflectorType CallServerTypeEnum = "callServerTypeTelegramReflector"
|
|
CallServerTypeWebrtcType CallServerTypeEnum = "callServerTypeWebrtc"
|
|
)
|
|
|
|
// CallStateEnum Alias for abstract CallState 'Sub-Classes', used as constant-enum here
|
|
type CallStateEnum string
|
|
|
|
// CallState enums
|
|
const (
|
|
CallStatePendingType CallStateEnum = "callStatePending"
|
|
CallStateExchangingKeysType CallStateEnum = "callStateExchangingKeys"
|
|
CallStateReadyType CallStateEnum = "callStateReady"
|
|
CallStateHangingUpType CallStateEnum = "callStateHangingUp"
|
|
CallStateDiscardedType CallStateEnum = "callStateDiscarded"
|
|
CallStateErrorType CallStateEnum = "callStateError"
|
|
)
|
|
|
|
// CallProblemEnum Alias for abstract CallProblem 'Sub-Classes', used as constant-enum here
|
|
type CallProblemEnum string
|
|
|
|
// CallProblem enums
|
|
const (
|
|
CallProblemEchoType CallProblemEnum = "callProblemEcho"
|
|
CallProblemNoiseType CallProblemEnum = "callProblemNoise"
|
|
CallProblemInterruptionsType CallProblemEnum = "callProblemInterruptions"
|
|
CallProblemDistortedSpeechType CallProblemEnum = "callProblemDistortedSpeech"
|
|
CallProblemSilentLocalType CallProblemEnum = "callProblemSilentLocal"
|
|
CallProblemSilentRemoteType CallProblemEnum = "callProblemSilentRemote"
|
|
CallProblemDroppedType CallProblemEnum = "callProblemDropped"
|
|
CallProblemDistortedVideoType CallProblemEnum = "callProblemDistortedVideo"
|
|
CallProblemPixelatedVideoType CallProblemEnum = "callProblemPixelatedVideo"
|
|
)
|
|
|
|
// DiceStickersEnum Alias for abstract DiceStickers 'Sub-Classes', used as constant-enum here
|
|
type DiceStickersEnum string
|
|
|
|
// DiceStickers enums
|
|
const (
|
|
DiceStickersRegularType DiceStickersEnum = "diceStickersRegular"
|
|
DiceStickersSlotMachineType DiceStickersEnum = "diceStickersSlotMachine"
|
|
)
|
|
|
|
// InputInlineQueryResultEnum Alias for abstract InputInlineQueryResult 'Sub-Classes', used as constant-enum here
|
|
type InputInlineQueryResultEnum string
|
|
|
|
// InputInlineQueryResult enums
|
|
const (
|
|
InputInlineQueryResultAnimationType InputInlineQueryResultEnum = "inputInlineQueryResultAnimation"
|
|
InputInlineQueryResultArticleType InputInlineQueryResultEnum = "inputInlineQueryResultArticle"
|
|
InputInlineQueryResultAudioType InputInlineQueryResultEnum = "inputInlineQueryResultAudio"
|
|
InputInlineQueryResultContactType InputInlineQueryResultEnum = "inputInlineQueryResultContact"
|
|
InputInlineQueryResultDocumentType InputInlineQueryResultEnum = "inputInlineQueryResultDocument"
|
|
InputInlineQueryResultGameType InputInlineQueryResultEnum = "inputInlineQueryResultGame"
|
|
InputInlineQueryResultLocationType InputInlineQueryResultEnum = "inputInlineQueryResultLocation"
|
|
InputInlineQueryResultPhotoType InputInlineQueryResultEnum = "inputInlineQueryResultPhoto"
|
|
InputInlineQueryResultStickerType InputInlineQueryResultEnum = "inputInlineQueryResultSticker"
|
|
InputInlineQueryResultVenueType InputInlineQueryResultEnum = "inputInlineQueryResultVenue"
|
|
InputInlineQueryResultVideoType InputInlineQueryResultEnum = "inputInlineQueryResultVideo"
|
|
InputInlineQueryResultVoiceNoteType InputInlineQueryResultEnum = "inputInlineQueryResultVoiceNote"
|
|
)
|
|
|
|
// InlineQueryResultEnum Alias for abstract InlineQueryResult 'Sub-Classes', used as constant-enum here
|
|
type InlineQueryResultEnum string
|
|
|
|
// InlineQueryResult enums
|
|
const (
|
|
InlineQueryResultArticleType InlineQueryResultEnum = "inlineQueryResultArticle"
|
|
InlineQueryResultContactType InlineQueryResultEnum = "inlineQueryResultContact"
|
|
InlineQueryResultLocationType InlineQueryResultEnum = "inlineQueryResultLocation"
|
|
InlineQueryResultVenueType InlineQueryResultEnum = "inlineQueryResultVenue"
|
|
InlineQueryResultGameType InlineQueryResultEnum = "inlineQueryResultGame"
|
|
InlineQueryResultAnimationType InlineQueryResultEnum = "inlineQueryResultAnimation"
|
|
InlineQueryResultAudioType InlineQueryResultEnum = "inlineQueryResultAudio"
|
|
InlineQueryResultDocumentType InlineQueryResultEnum = "inlineQueryResultDocument"
|
|
InlineQueryResultPhotoType InlineQueryResultEnum = "inlineQueryResultPhoto"
|
|
InlineQueryResultStickerType InlineQueryResultEnum = "inlineQueryResultSticker"
|
|
InlineQueryResultVideoType InlineQueryResultEnum = "inlineQueryResultVideo"
|
|
InlineQueryResultVoiceNoteType InlineQueryResultEnum = "inlineQueryResultVoiceNote"
|
|
)
|
|
|
|
// CallbackQueryPayloadEnum Alias for abstract CallbackQueryPayload 'Sub-Classes', used as constant-enum here
|
|
type CallbackQueryPayloadEnum string
|
|
|
|
// CallbackQueryPayload enums
|
|
const (
|
|
CallbackQueryPayloadDataType CallbackQueryPayloadEnum = "callbackQueryPayloadData"
|
|
CallbackQueryPayloadDataWithPasswordType CallbackQueryPayloadEnum = "callbackQueryPayloadDataWithPassword"
|
|
CallbackQueryPayloadGameType CallbackQueryPayloadEnum = "callbackQueryPayloadGame"
|
|
)
|
|
|
|
// ChatEventActionEnum Alias for abstract ChatEventAction 'Sub-Classes', used as constant-enum here
|
|
type ChatEventActionEnum string
|
|
|
|
// ChatEventAction enums
|
|
const (
|
|
ChatEventMessageEditedType ChatEventActionEnum = "chatEventMessageEdited"
|
|
ChatEventMessageDeletedType ChatEventActionEnum = "chatEventMessageDeleted"
|
|
ChatEventPollStoppedType ChatEventActionEnum = "chatEventPollStopped"
|
|
ChatEventMessagePinnedType ChatEventActionEnum = "chatEventMessagePinned"
|
|
ChatEventMessageUnpinnedType ChatEventActionEnum = "chatEventMessageUnpinned"
|
|
ChatEventMemberJoinedType ChatEventActionEnum = "chatEventMemberJoined"
|
|
ChatEventMemberLeftType ChatEventActionEnum = "chatEventMemberLeft"
|
|
ChatEventMemberInvitedType ChatEventActionEnum = "chatEventMemberInvited"
|
|
ChatEventMemberPromotedType ChatEventActionEnum = "chatEventMemberPromoted"
|
|
ChatEventMemberRestrictedType ChatEventActionEnum = "chatEventMemberRestricted"
|
|
ChatEventTitleChangedType ChatEventActionEnum = "chatEventTitleChanged"
|
|
ChatEventPermissionsChangedType ChatEventActionEnum = "chatEventPermissionsChanged"
|
|
ChatEventDescriptionChangedType ChatEventActionEnum = "chatEventDescriptionChanged"
|
|
ChatEventUsernameChangedType ChatEventActionEnum = "chatEventUsernameChanged"
|
|
ChatEventPhotoChangedType ChatEventActionEnum = "chatEventPhotoChanged"
|
|
ChatEventInvitesToggledType ChatEventActionEnum = "chatEventInvitesToggled"
|
|
ChatEventLinkedChatChangedType ChatEventActionEnum = "chatEventLinkedChatChanged"
|
|
ChatEventSlowModeDelayChangedType ChatEventActionEnum = "chatEventSlowModeDelayChanged"
|
|
ChatEventSignMessagesToggledType ChatEventActionEnum = "chatEventSignMessagesToggled"
|
|
ChatEventStickerSetChangedType ChatEventActionEnum = "chatEventStickerSetChanged"
|
|
ChatEventLocationChangedType ChatEventActionEnum = "chatEventLocationChanged"
|
|
ChatEventIsAllHistoryAvailableToggledType ChatEventActionEnum = "chatEventIsAllHistoryAvailableToggled"
|
|
ChatEventVoiceChatCreatedType ChatEventActionEnum = "chatEventVoiceChatCreated"
|
|
ChatEventVoiceChatDiscardedType ChatEventActionEnum = "chatEventVoiceChatDiscarded"
|
|
ChatEventVoiceChatParticipantIsMutedToggledType ChatEventActionEnum = "chatEventVoiceChatParticipantIsMutedToggled"
|
|
ChatEventVoiceChatMuteNewParticipantsToggledType ChatEventActionEnum = "chatEventVoiceChatMuteNewParticipantsToggled"
|
|
)
|
|
|
|
// LanguagePackStringValueEnum Alias for abstract LanguagePackStringValue 'Sub-Classes', used as constant-enum here
|
|
type LanguagePackStringValueEnum string
|
|
|
|
// LanguagePackStringValue enums
|
|
const (
|
|
LanguagePackStringValueOrdinaryType LanguagePackStringValueEnum = "languagePackStringValueOrdinary"
|
|
LanguagePackStringValuePluralizedType LanguagePackStringValueEnum = "languagePackStringValuePluralized"
|
|
LanguagePackStringValueDeletedType LanguagePackStringValueEnum = "languagePackStringValueDeleted"
|
|
)
|
|
|
|
// DeviceTokenEnum Alias for abstract DeviceToken 'Sub-Classes', used as constant-enum here
|
|
type DeviceTokenEnum string
|
|
|
|
// DeviceToken enums
|
|
const (
|
|
DeviceTokenFirebaseCloudMessagingType DeviceTokenEnum = "deviceTokenFirebaseCloudMessaging"
|
|
DeviceTokenApplePushType DeviceTokenEnum = "deviceTokenApplePush"
|
|
DeviceTokenApplePushVoIPType DeviceTokenEnum = "deviceTokenApplePushVoIP"
|
|
DeviceTokenWindowsPushType DeviceTokenEnum = "deviceTokenWindowsPush"
|
|
DeviceTokenMicrosoftPushType DeviceTokenEnum = "deviceTokenMicrosoftPush"
|
|
DeviceTokenMicrosoftPushVoIPType DeviceTokenEnum = "deviceTokenMicrosoftPushVoIP"
|
|
DeviceTokenWebPushType DeviceTokenEnum = "deviceTokenWebPush"
|
|
DeviceTokenSimplePushType DeviceTokenEnum = "deviceTokenSimplePush"
|
|
DeviceTokenUbuntuPushType DeviceTokenEnum = "deviceTokenUbuntuPush"
|
|
DeviceTokenBlackBerryPushType DeviceTokenEnum = "deviceTokenBlackBerryPush"
|
|
DeviceTokenTizenPushType DeviceTokenEnum = "deviceTokenTizenPush"
|
|
)
|
|
|
|
// BackgroundFillEnum Alias for abstract BackgroundFill 'Sub-Classes', used as constant-enum here
|
|
type BackgroundFillEnum string
|
|
|
|
// BackgroundFill enums
|
|
const (
|
|
BackgroundFillSolidType BackgroundFillEnum = "backgroundFillSolid"
|
|
BackgroundFillGradientType BackgroundFillEnum = "backgroundFillGradient"
|
|
)
|
|
|
|
// BackgroundTypeEnum Alias for abstract BackgroundType 'Sub-Classes', used as constant-enum here
|
|
type BackgroundTypeEnum string
|
|
|
|
// BackgroundType enums
|
|
const (
|
|
BackgroundTypeWallpaperType BackgroundTypeEnum = "backgroundTypeWallpaper"
|
|
BackgroundTypePatternType BackgroundTypeEnum = "backgroundTypePattern"
|
|
BackgroundTypeFillType BackgroundTypeEnum = "backgroundTypeFill"
|
|
)
|
|
|
|
// InputBackgroundEnum Alias for abstract InputBackground 'Sub-Classes', used as constant-enum here
|
|
type InputBackgroundEnum string
|
|
|
|
// InputBackground enums
|
|
const (
|
|
InputBackgroundLocalType InputBackgroundEnum = "inputBackgroundLocal"
|
|
InputBackgroundRemoteType InputBackgroundEnum = "inputBackgroundRemote"
|
|
)
|
|
|
|
// CanTransferOwnershipResultEnum Alias for abstract CanTransferOwnershipResult 'Sub-Classes', used as constant-enum here
|
|
type CanTransferOwnershipResultEnum string
|
|
|
|
// CanTransferOwnershipResult enums
|
|
const (
|
|
CanTransferOwnershipResultOkType CanTransferOwnershipResultEnum = "canTransferOwnershipResultOk"
|
|
CanTransferOwnershipResultPasswordNeededType CanTransferOwnershipResultEnum = "canTransferOwnershipResultPasswordNeeded"
|
|
CanTransferOwnershipResultPasswordTooFreshType CanTransferOwnershipResultEnum = "canTransferOwnershipResultPasswordTooFresh"
|
|
CanTransferOwnershipResultSessionTooFreshType CanTransferOwnershipResultEnum = "canTransferOwnershipResultSessionTooFresh"
|
|
)
|
|
|
|
// CheckChatUsernameResultEnum Alias for abstract CheckChatUsernameResult 'Sub-Classes', used as constant-enum here
|
|
type CheckChatUsernameResultEnum string
|
|
|
|
// CheckChatUsernameResult enums
|
|
const (
|
|
CheckChatUsernameResultOkType CheckChatUsernameResultEnum = "checkChatUsernameResultOk"
|
|
CheckChatUsernameResultUsernameInvalidType CheckChatUsernameResultEnum = "checkChatUsernameResultUsernameInvalid"
|
|
CheckChatUsernameResultUsernameOccupiedType CheckChatUsernameResultEnum = "checkChatUsernameResultUsernameOccupied"
|
|
CheckChatUsernameResultPublicChatsTooMuchType CheckChatUsernameResultEnum = "checkChatUsernameResultPublicChatsTooMuch"
|
|
CheckChatUsernameResultPublicGroupsUnavailableType CheckChatUsernameResultEnum = "checkChatUsernameResultPublicGroupsUnavailable"
|
|
)
|
|
|
|
// MessageFileTypeEnum Alias for abstract MessageFileType 'Sub-Classes', used as constant-enum here
|
|
type MessageFileTypeEnum string
|
|
|
|
// MessageFileType enums
|
|
const (
|
|
MessageFileTypePrivateType MessageFileTypeEnum = "messageFileTypePrivate"
|
|
MessageFileTypeGroupType MessageFileTypeEnum = "messageFileTypeGroup"
|
|
MessageFileTypeUnknownType MessageFileTypeEnum = "messageFileTypeUnknown"
|
|
)
|
|
|
|
// PushMessageContentEnum Alias for abstract PushMessageContent 'Sub-Classes', used as constant-enum here
|
|
type PushMessageContentEnum string
|
|
|
|
// PushMessageContent enums
|
|
const (
|
|
PushMessageContentHiddenType PushMessageContentEnum = "pushMessageContentHidden"
|
|
PushMessageContentAnimationType PushMessageContentEnum = "pushMessageContentAnimation"
|
|
PushMessageContentAudioType PushMessageContentEnum = "pushMessageContentAudio"
|
|
PushMessageContentContactType PushMessageContentEnum = "pushMessageContentContact"
|
|
PushMessageContentContactRegisteredType PushMessageContentEnum = "pushMessageContentContactRegistered"
|
|
PushMessageContentDocumentType PushMessageContentEnum = "pushMessageContentDocument"
|
|
PushMessageContentGameType PushMessageContentEnum = "pushMessageContentGame"
|
|
PushMessageContentGameScoreType PushMessageContentEnum = "pushMessageContentGameScore"
|
|
PushMessageContentInvoiceType PushMessageContentEnum = "pushMessageContentInvoice"
|
|
PushMessageContentLocationType PushMessageContentEnum = "pushMessageContentLocation"
|
|
PushMessageContentPhotoType PushMessageContentEnum = "pushMessageContentPhoto"
|
|
PushMessageContentPollType PushMessageContentEnum = "pushMessageContentPoll"
|
|
PushMessageContentScreenshotTakenType PushMessageContentEnum = "pushMessageContentScreenshotTaken"
|
|
PushMessageContentStickerType PushMessageContentEnum = "pushMessageContentSticker"
|
|
PushMessageContentTextType PushMessageContentEnum = "pushMessageContentText"
|
|
PushMessageContentVideoType PushMessageContentEnum = "pushMessageContentVideo"
|
|
PushMessageContentVideoNoteType PushMessageContentEnum = "pushMessageContentVideoNote"
|
|
PushMessageContentVoiceNoteType PushMessageContentEnum = "pushMessageContentVoiceNote"
|
|
PushMessageContentBasicGroupChatCreateType PushMessageContentEnum = "pushMessageContentBasicGroupChatCreate"
|
|
PushMessageContentChatAddMembersType PushMessageContentEnum = "pushMessageContentChatAddMembers"
|
|
PushMessageContentChatChangePhotoType PushMessageContentEnum = "pushMessageContentChatChangePhoto"
|
|
PushMessageContentChatChangeTitleType PushMessageContentEnum = "pushMessageContentChatChangeTitle"
|
|
PushMessageContentChatDeleteMemberType PushMessageContentEnum = "pushMessageContentChatDeleteMember"
|
|
PushMessageContentChatJoinByLinkType PushMessageContentEnum = "pushMessageContentChatJoinByLink"
|
|
PushMessageContentMessageForwardsType PushMessageContentEnum = "pushMessageContentMessageForwards"
|
|
PushMessageContentMediaAlbumType PushMessageContentEnum = "pushMessageContentMediaAlbum"
|
|
)
|
|
|
|
// NotificationTypeEnum Alias for abstract NotificationType 'Sub-Classes', used as constant-enum here
|
|
type NotificationTypeEnum string
|
|
|
|
// NotificationType enums
|
|
const (
|
|
NotificationTypeNewMessageType NotificationTypeEnum = "notificationTypeNewMessage"
|
|
NotificationTypeNewSecretChatType NotificationTypeEnum = "notificationTypeNewSecretChat"
|
|
NotificationTypeNewCallType NotificationTypeEnum = "notificationTypeNewCall"
|
|
NotificationTypeNewPushMessageType NotificationTypeEnum = "notificationTypeNewPushMessage"
|
|
)
|
|
|
|
// NotificationGroupTypeEnum Alias for abstract NotificationGroupType 'Sub-Classes', used as constant-enum here
|
|
type NotificationGroupTypeEnum string
|
|
|
|
// NotificationGroupType enums
|
|
const (
|
|
NotificationGroupTypeMessagesType NotificationGroupTypeEnum = "notificationGroupTypeMessages"
|
|
NotificationGroupTypeMentionsType NotificationGroupTypeEnum = "notificationGroupTypeMentions"
|
|
NotificationGroupTypeSecretChatType NotificationGroupTypeEnum = "notificationGroupTypeSecretChat"
|
|
NotificationGroupTypeCallsType NotificationGroupTypeEnum = "notificationGroupTypeCalls"
|
|
)
|
|
|
|
// OptionValueEnum Alias for abstract OptionValue 'Sub-Classes', used as constant-enum here
|
|
type OptionValueEnum string
|
|
|
|
// OptionValue enums
|
|
const (
|
|
OptionValueBooleanType OptionValueEnum = "optionValueBoolean"
|
|
OptionValueEmptyType OptionValueEnum = "optionValueEmpty"
|
|
OptionValueIntegerType OptionValueEnum = "optionValueInteger"
|
|
OptionValueStringType OptionValueEnum = "optionValueString"
|
|
)
|
|
|
|
// JsonValueEnum Alias for abstract JsonValue 'Sub-Classes', used as constant-enum here
|
|
type JsonValueEnum string
|
|
|
|
// JsonValue enums
|
|
const (
|
|
JsonValueNullType JsonValueEnum = "jsonValueNull"
|
|
JsonValueBooleanType JsonValueEnum = "jsonValueBoolean"
|
|
JsonValueNumberType JsonValueEnum = "jsonValueNumber"
|
|
JsonValueStringType JsonValueEnum = "jsonValueString"
|
|
JsonValueArrayType JsonValueEnum = "jsonValueArray"
|
|
JsonValueObjectType JsonValueEnum = "jsonValueObject"
|
|
)
|
|
|
|
// UserPrivacySettingRuleEnum Alias for abstract UserPrivacySettingRule 'Sub-Classes', used as constant-enum here
|
|
type UserPrivacySettingRuleEnum string
|
|
|
|
// UserPrivacySettingRule enums
|
|
const (
|
|
UserPrivacySettingRuleAllowAllType UserPrivacySettingRuleEnum = "userPrivacySettingRuleAllowAll"
|
|
UserPrivacySettingRuleAllowContactsType UserPrivacySettingRuleEnum = "userPrivacySettingRuleAllowContacts"
|
|
UserPrivacySettingRuleAllowUsersType UserPrivacySettingRuleEnum = "userPrivacySettingRuleAllowUsers"
|
|
UserPrivacySettingRuleAllowChatMembersType UserPrivacySettingRuleEnum = "userPrivacySettingRuleAllowChatMembers"
|
|
UserPrivacySettingRuleRestrictAllType UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictAll"
|
|
UserPrivacySettingRuleRestrictContactsType UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictContacts"
|
|
UserPrivacySettingRuleRestrictUsersType UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictUsers"
|
|
UserPrivacySettingRuleRestrictChatMembersType UserPrivacySettingRuleEnum = "userPrivacySettingRuleRestrictChatMembers"
|
|
)
|
|
|
|
// UserPrivacySettingEnum Alias for abstract UserPrivacySetting 'Sub-Classes', used as constant-enum here
|
|
type UserPrivacySettingEnum string
|
|
|
|
// UserPrivacySetting enums
|
|
const (
|
|
UserPrivacySettingShowStatusType UserPrivacySettingEnum = "userPrivacySettingShowStatus"
|
|
UserPrivacySettingShowProfilePhotoType UserPrivacySettingEnum = "userPrivacySettingShowProfilePhoto"
|
|
UserPrivacySettingShowLinkInForwardedMessagesType UserPrivacySettingEnum = "userPrivacySettingShowLinkInForwardedMessages"
|
|
UserPrivacySettingShowPhoneNumberType UserPrivacySettingEnum = "userPrivacySettingShowPhoneNumber"
|
|
UserPrivacySettingAllowChatInvitesType UserPrivacySettingEnum = "userPrivacySettingAllowChatInvites"
|
|
UserPrivacySettingAllowCallsType UserPrivacySettingEnum = "userPrivacySettingAllowCalls"
|
|
UserPrivacySettingAllowPeerToPeerCallsType UserPrivacySettingEnum = "userPrivacySettingAllowPeerToPeerCalls"
|
|
UserPrivacySettingAllowFindingByPhoneNumberType UserPrivacySettingEnum = "userPrivacySettingAllowFindingByPhoneNumber"
|
|
)
|
|
|
|
// ChatReportReasonEnum Alias for abstract ChatReportReason 'Sub-Classes', used as constant-enum here
|
|
type ChatReportReasonEnum string
|
|
|
|
// ChatReportReason enums
|
|
const (
|
|
ChatReportReasonSpamType ChatReportReasonEnum = "chatReportReasonSpam"
|
|
ChatReportReasonViolenceType ChatReportReasonEnum = "chatReportReasonViolence"
|
|
ChatReportReasonPornographyType ChatReportReasonEnum = "chatReportReasonPornography"
|
|
ChatReportReasonChildAbuseType ChatReportReasonEnum = "chatReportReasonChildAbuse"
|
|
ChatReportReasonCopyrightType ChatReportReasonEnum = "chatReportReasonCopyright"
|
|
ChatReportReasonUnrelatedLocationType ChatReportReasonEnum = "chatReportReasonUnrelatedLocation"
|
|
ChatReportReasonFakeType ChatReportReasonEnum = "chatReportReasonFake"
|
|
ChatReportReasonCustomType ChatReportReasonEnum = "chatReportReasonCustom"
|
|
)
|
|
|
|
// FileTypeEnum Alias for abstract FileType 'Sub-Classes', used as constant-enum here
|
|
type FileTypeEnum string
|
|
|
|
// FileType enums
|
|
const (
|
|
FileTypeNoneType FileTypeEnum = "fileTypeNone"
|
|
FileTypeAnimationType FileTypeEnum = "fileTypeAnimation"
|
|
FileTypeAudioType FileTypeEnum = "fileTypeAudio"
|
|
FileTypeDocumentType FileTypeEnum = "fileTypeDocument"
|
|
FileTypePhotoType FileTypeEnum = "fileTypePhoto"
|
|
FileTypeProfilePhotoType FileTypeEnum = "fileTypeProfilePhoto"
|
|
FileTypeSecretType FileTypeEnum = "fileTypeSecret"
|
|
FileTypeSecretThumbnailType FileTypeEnum = "fileTypeSecretThumbnail"
|
|
FileTypeSecureType FileTypeEnum = "fileTypeSecure"
|
|
FileTypeStickerType FileTypeEnum = "fileTypeSticker"
|
|
FileTypeThumbnailType FileTypeEnum = "fileTypeThumbnail"
|
|
FileTypeUnknownType FileTypeEnum = "fileTypeUnknown"
|
|
FileTypeVideoType FileTypeEnum = "fileTypeVideo"
|
|
FileTypeVideoNoteType FileTypeEnum = "fileTypeVideoNote"
|
|
FileTypeVoiceNoteType FileTypeEnum = "fileTypeVoiceNote"
|
|
FileTypeWallpaperType FileTypeEnum = "fileTypeWallpaper"
|
|
)
|
|
|
|
// NetworkTypeEnum Alias for abstract NetworkType 'Sub-Classes', used as constant-enum here
|
|
type NetworkTypeEnum string
|
|
|
|
// NetworkType enums
|
|
const (
|
|
NetworkTypeNoneType NetworkTypeEnum = "networkTypeNone"
|
|
NetworkTypeMobileType NetworkTypeEnum = "networkTypeMobile"
|
|
NetworkTypeMobileRoamingType NetworkTypeEnum = "networkTypeMobileRoaming"
|
|
NetworkTypeWiFiType NetworkTypeEnum = "networkTypeWiFi"
|
|
NetworkTypeOtherType NetworkTypeEnum = "networkTypeOther"
|
|
)
|
|
|
|
// NetworkStatisticsEntryEnum Alias for abstract NetworkStatisticsEntry 'Sub-Classes', used as constant-enum here
|
|
type NetworkStatisticsEntryEnum string
|
|
|
|
// NetworkStatisticsEntry enums
|
|
const (
|
|
NetworkStatisticsEntryFileType NetworkStatisticsEntryEnum = "networkStatisticsEntryFile"
|
|
NetworkStatisticsEntryCallType NetworkStatisticsEntryEnum = "networkStatisticsEntryCall"
|
|
)
|
|
|
|
// ConnectionStateEnum Alias for abstract ConnectionState 'Sub-Classes', used as constant-enum here
|
|
type ConnectionStateEnum string
|
|
|
|
// ConnectionState enums
|
|
const (
|
|
ConnectionStateWaitingForNetworkType ConnectionStateEnum = "connectionStateWaitingForNetwork"
|
|
ConnectionStateConnectingToProxyType ConnectionStateEnum = "connectionStateConnectingToProxy"
|
|
ConnectionStateConnectingType ConnectionStateEnum = "connectionStateConnecting"
|
|
ConnectionStateUpdatingType ConnectionStateEnum = "connectionStateUpdating"
|
|
ConnectionStateReadyType ConnectionStateEnum = "connectionStateReady"
|
|
)
|
|
|
|
// TopChatCategoryEnum Alias for abstract TopChatCategory 'Sub-Classes', used as constant-enum here
|
|
type TopChatCategoryEnum string
|
|
|
|
// TopChatCategory enums
|
|
const (
|
|
TopChatCategoryUsersType TopChatCategoryEnum = "topChatCategoryUsers"
|
|
TopChatCategoryBotsType TopChatCategoryEnum = "topChatCategoryBots"
|
|
TopChatCategoryGroupsType TopChatCategoryEnum = "topChatCategoryGroups"
|
|
TopChatCategoryChannelsType TopChatCategoryEnum = "topChatCategoryChannels"
|
|
TopChatCategoryInlineBotsType TopChatCategoryEnum = "topChatCategoryInlineBots"
|
|
TopChatCategoryCallsType TopChatCategoryEnum = "topChatCategoryCalls"
|
|
TopChatCategoryForwardChatsType TopChatCategoryEnum = "topChatCategoryForwardChats"
|
|
)
|
|
|
|
// TMeURLTypeEnum Alias for abstract TMeURLType 'Sub-Classes', used as constant-enum here
|
|
type TMeURLTypeEnum string
|
|
|
|
// TMeURLType enums
|
|
const (
|
|
TMeURLTypeUserType TMeURLTypeEnum = "tMeURLTypeUser"
|
|
TMeURLTypeSupergroupType TMeURLTypeEnum = "tMeURLTypeSupergroup"
|
|
TMeURLTypeChatInviteType TMeURLTypeEnum = "tMeURLTypeChatInvite"
|
|
TMeURLTypeStickerSetType TMeURLTypeEnum = "tMeURLTypeStickerSet"
|
|
)
|
|
|
|
// SuggestedActionEnum Alias for abstract SuggestedAction 'Sub-Classes', used as constant-enum here
|
|
type SuggestedActionEnum string
|
|
|
|
// SuggestedAction enums
|
|
const (
|
|
SuggestedActionEnableArchiveAndMuteNewChatsType SuggestedActionEnum = "suggestedActionEnableArchiveAndMuteNewChats"
|
|
SuggestedActionCheckPhoneNumberType SuggestedActionEnum = "suggestedActionCheckPhoneNumber"
|
|
SuggestedActionSeeTicksHintType SuggestedActionEnum = "suggestedActionSeeTicksHint"
|
|
)
|
|
|
|
// TextParseModeEnum Alias for abstract TextParseMode 'Sub-Classes', used as constant-enum here
|
|
type TextParseModeEnum string
|
|
|
|
// TextParseMode enums
|
|
const (
|
|
TextParseModeMarkdownType TextParseModeEnum = "textParseModeMarkdown"
|
|
TextParseModeHTMLType TextParseModeEnum = "textParseModeHTML"
|
|
)
|
|
|
|
// ProxyTypeEnum Alias for abstract ProxyType 'Sub-Classes', used as constant-enum here
|
|
type ProxyTypeEnum string
|
|
|
|
// ProxyType enums
|
|
const (
|
|
ProxyTypeSocks5Type ProxyTypeEnum = "proxyTypeSocks5"
|
|
ProxyTypeHttpType ProxyTypeEnum = "proxyTypeHttp"
|
|
ProxyTypeMtprotoType ProxyTypeEnum = "proxyTypeMtproto"
|
|
)
|
|
|
|
// InputStickerEnum Alias for abstract InputSticker 'Sub-Classes', used as constant-enum here
|
|
type InputStickerEnum string
|
|
|
|
// InputSticker enums
|
|
const (
|
|
InputStickerStaticType InputStickerEnum = "inputStickerStatic"
|
|
InputStickerAnimatedType InputStickerEnum = "inputStickerAnimated"
|
|
)
|
|
|
|
// StatisticalGraphEnum Alias for abstract StatisticalGraph 'Sub-Classes', used as constant-enum here
|
|
type StatisticalGraphEnum string
|
|
|
|
// StatisticalGraph enums
|
|
const (
|
|
StatisticalGraphDataType StatisticalGraphEnum = "statisticalGraphData"
|
|
StatisticalGraphAsyncType StatisticalGraphEnum = "statisticalGraphAsync"
|
|
StatisticalGraphErrorType StatisticalGraphEnum = "statisticalGraphError"
|
|
)
|
|
|
|
// ChatStatisticsEnum Alias for abstract ChatStatistics 'Sub-Classes', used as constant-enum here
|
|
type ChatStatisticsEnum string
|
|
|
|
// ChatStatistics enums
|
|
const (
|
|
ChatStatisticsSupergroupType ChatStatisticsEnum = "chatStatisticsSupergroup"
|
|
ChatStatisticsChannelType ChatStatisticsEnum = "chatStatisticsChannel"
|
|
)
|
|
|
|
// VectorPathCommandEnum Alias for abstract VectorPathCommand 'Sub-Classes', used as constant-enum here
|
|
type VectorPathCommandEnum string
|
|
|
|
// VectorPathCommand enums
|
|
const (
|
|
VectorPathCommandLineType VectorPathCommandEnum = "vectorPathCommandLine"
|
|
VectorPathCommandCubicBezierCurveType VectorPathCommandEnum = "vectorPathCommandCubicBezierCurve"
|
|
)
|
|
|
|
// UpdateEnum Alias for abstract Update 'Sub-Classes', used as constant-enum here
|
|
type UpdateEnum string
|
|
|
|
// Update enums
|
|
const (
|
|
UpdateAuthorizationStateType UpdateEnum = "updateAuthorizationState"
|
|
UpdateNewMessageType UpdateEnum = "updateNewMessage"
|
|
UpdateMessageSendAcknowledgedType UpdateEnum = "updateMessageSendAcknowledged"
|
|
UpdateMessageSendSucceededType UpdateEnum = "updateMessageSendSucceeded"
|
|
UpdateMessageSendFailedType UpdateEnum = "updateMessageSendFailed"
|
|
UpdateMessageContentType UpdateEnum = "updateMessageContent"
|
|
UpdateMessageEditedType UpdateEnum = "updateMessageEdited"
|
|
UpdateMessageIsPinnedType UpdateEnum = "updateMessageIsPinned"
|
|
UpdateMessageInteractionInfoType UpdateEnum = "updateMessageInteractionInfo"
|
|
UpdateMessageContentOpenedType UpdateEnum = "updateMessageContentOpened"
|
|
UpdateMessageMentionReadType UpdateEnum = "updateMessageMentionRead"
|
|
UpdateMessageLiveLocationViewedType UpdateEnum = "updateMessageLiveLocationViewed"
|
|
UpdateNewChatType UpdateEnum = "updateNewChat"
|
|
UpdateChatTitleType UpdateEnum = "updateChatTitle"
|
|
UpdateChatPhotoType UpdateEnum = "updateChatPhoto"
|
|
UpdateChatPermissionsType UpdateEnum = "updateChatPermissions"
|
|
UpdateChatLastMessageType UpdateEnum = "updateChatLastMessage"
|
|
UpdateChatPositionType UpdateEnum = "updateChatPosition"
|
|
UpdateChatIsMarkedAsUnreadType UpdateEnum = "updateChatIsMarkedAsUnread"
|
|
UpdateChatIsBlockedType UpdateEnum = "updateChatIsBlocked"
|
|
UpdateChatHasScheduledMessagesType UpdateEnum = "updateChatHasScheduledMessages"
|
|
UpdateChatVoiceChatType UpdateEnum = "updateChatVoiceChat"
|
|
UpdateChatDefaultDisableNotificationType UpdateEnum = "updateChatDefaultDisableNotification"
|
|
UpdateChatReadInboxType UpdateEnum = "updateChatReadInbox"
|
|
UpdateChatReadOutboxType UpdateEnum = "updateChatReadOutbox"
|
|
UpdateChatUnreadMentionCountType UpdateEnum = "updateChatUnreadMentionCount"
|
|
UpdateChatNotificationSettingsType UpdateEnum = "updateChatNotificationSettings"
|
|
UpdateScopeNotificationSettingsType UpdateEnum = "updateScopeNotificationSettings"
|
|
UpdateChatActionBarType UpdateEnum = "updateChatActionBar"
|
|
UpdateChatReplyMarkupType UpdateEnum = "updateChatReplyMarkup"
|
|
UpdateChatDraftMessageType UpdateEnum = "updateChatDraftMessage"
|
|
UpdateChatFiltersType UpdateEnum = "updateChatFilters"
|
|
UpdateChatOnlineMemberCountType UpdateEnum = "updateChatOnlineMemberCount"
|
|
UpdateNotificationType UpdateEnum = "updateNotification"
|
|
UpdateNotificationGroupType UpdateEnum = "updateNotificationGroup"
|
|
UpdateActiveNotificationsType UpdateEnum = "updateActiveNotifications"
|
|
UpdateHavePendingNotificationsType UpdateEnum = "updateHavePendingNotifications"
|
|
UpdateDeleteMessagesType UpdateEnum = "updateDeleteMessages"
|
|
UpdateUserChatActionType UpdateEnum = "updateUserChatAction"
|
|
UpdateUserStatusType UpdateEnum = "updateUserStatus"
|
|
UpdateUserType UpdateEnum = "updateUser"
|
|
UpdateBasicGroupType UpdateEnum = "updateBasicGroup"
|
|
UpdateSupergroupType UpdateEnum = "updateSupergroup"
|
|
UpdateSecretChatType UpdateEnum = "updateSecretChat"
|
|
UpdateUserFullInfoType UpdateEnum = "updateUserFullInfo"
|
|
UpdateBasicGroupFullInfoType UpdateEnum = "updateBasicGroupFullInfo"
|
|
UpdateSupergroupFullInfoType UpdateEnum = "updateSupergroupFullInfo"
|
|
UpdateServiceNotificationType UpdateEnum = "updateServiceNotification"
|
|
UpdateFileType UpdateEnum = "updateFile"
|
|
UpdateFileGenerationStartType UpdateEnum = "updateFileGenerationStart"
|
|
UpdateFileGenerationStopType UpdateEnum = "updateFileGenerationStop"
|
|
UpdateCallType UpdateEnum = "updateCall"
|
|
UpdateGroupCallType UpdateEnum = "updateGroupCall"
|
|
UpdateGroupCallParticipantType UpdateEnum = "updateGroupCallParticipant"
|
|
UpdateNewCallSignalingDataType UpdateEnum = "updateNewCallSignalingData"
|
|
UpdateUserPrivacySettingRulesType UpdateEnum = "updateUserPrivacySettingRules"
|
|
UpdateUnreadMessageCountType UpdateEnum = "updateUnreadMessageCount"
|
|
UpdateUnreadChatCountType UpdateEnum = "updateUnreadChatCount"
|
|
UpdateOptionType UpdateEnum = "updateOption"
|
|
UpdateStickerSetType UpdateEnum = "updateStickerSet"
|
|
UpdateInstalledStickerSetsType UpdateEnum = "updateInstalledStickerSets"
|
|
UpdateTrendingStickerSetsType UpdateEnum = "updateTrendingStickerSets"
|
|
UpdateRecentStickersType UpdateEnum = "updateRecentStickers"
|
|
UpdateFavoriteStickersType UpdateEnum = "updateFavoriteStickers"
|
|
UpdateSavedAnimationsType UpdateEnum = "updateSavedAnimations"
|
|
UpdateSelectedBackgroundType UpdateEnum = "updateSelectedBackground"
|
|
UpdateLanguagePackStringsType UpdateEnum = "updateLanguagePackStrings"
|
|
UpdateConnectionStateType UpdateEnum = "updateConnectionState"
|
|
UpdateTermsOfServiceType UpdateEnum = "updateTermsOfService"
|
|
UpdateUsersNearbyType UpdateEnum = "updateUsersNearby"
|
|
UpdateDiceEmojisType UpdateEnum = "updateDiceEmojis"
|
|
UpdateAnimationSearchParametersType UpdateEnum = "updateAnimationSearchParameters"
|
|
UpdateSuggestedActionsType UpdateEnum = "updateSuggestedActions"
|
|
UpdateNewInlineQueryType UpdateEnum = "updateNewInlineQuery"
|
|
UpdateNewChosenInlineResultType UpdateEnum = "updateNewChosenInlineResult"
|
|
UpdateNewCallbackQueryType UpdateEnum = "updateNewCallbackQuery"
|
|
UpdateNewInlineCallbackQueryType UpdateEnum = "updateNewInlineCallbackQuery"
|
|
UpdateNewShippingQueryType UpdateEnum = "updateNewShippingQuery"
|
|
UpdateNewPreCheckoutQueryType UpdateEnum = "updateNewPreCheckoutQuery"
|
|
UpdateNewCustomEventType UpdateEnum = "updateNewCustomEvent"
|
|
UpdateNewCustomQueryType UpdateEnum = "updateNewCustomQuery"
|
|
UpdatePollType UpdateEnum = "updatePoll"
|
|
UpdatePollAnswerType UpdateEnum = "updatePollAnswer"
|
|
)
|
|
|
|
// LogStreamEnum Alias for abstract LogStream 'Sub-Classes', used as constant-enum here
|
|
type LogStreamEnum string
|
|
|
|
// LogStream enums
|
|
const (
|
|
LogStreamDefaultType LogStreamEnum = "logStreamDefault"
|
|
LogStreamFileType LogStreamEnum = "logStreamFile"
|
|
LogStreamEmptyType LogStreamEnum = "logStreamEmpty"
|
|
) // AuthenticationCodeType Provides information about the method by which an authentication code is delivered to the user
|
|
type AuthenticationCodeType interface {
|
|
GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum
|
|
}
|
|
|
|
// AuthorizationState Represents the current authorization state of the TDLib client
|
|
type AuthorizationState interface {
|
|
GetAuthorizationStateEnum() AuthorizationStateEnum
|
|
}
|
|
|
|
// InputFile Points to a file
|
|
type InputFile interface {
|
|
GetInputFileEnum() InputFileEnum
|
|
}
|
|
|
|
// ThumbnailFormat Describes format of the thumbnail
|
|
type ThumbnailFormat interface {
|
|
GetThumbnailFormatEnum() ThumbnailFormatEnum
|
|
}
|
|
|
|
// MaskPoint Part of the face, relative to which a mask should be placed
|
|
type MaskPoint interface {
|
|
GetMaskPointEnum() MaskPointEnum
|
|
}
|
|
|
|
// PollType Describes the type of a poll
|
|
type PollType interface {
|
|
GetPollTypeEnum() PollTypeEnum
|
|
}
|
|
|
|
// UserType Represents the type of a user. The following types are possible: regular users, deleted users and bots
|
|
type UserType interface {
|
|
GetUserTypeEnum() UserTypeEnum
|
|
}
|
|
|
|
// InputChatPhoto Describes a photo to be set as a user profile or chat photo
|
|
type InputChatPhoto interface {
|
|
GetInputChatPhotoEnum() InputChatPhotoEnum
|
|
}
|
|
|
|
// ChatMemberStatus Provides information about the status of a member in a chat
|
|
type ChatMemberStatus interface {
|
|
GetChatMemberStatusEnum() ChatMemberStatusEnum
|
|
}
|
|
|
|
// ChatMembersFilter Specifies the kind of chat members to return in searchChatMembers
|
|
type ChatMembersFilter interface {
|
|
GetChatMembersFilterEnum() ChatMembersFilterEnum
|
|
}
|
|
|
|
// SupergroupMembersFilter Specifies the kind of chat members to return in getSupergroupMembers
|
|
type SupergroupMembersFilter interface {
|
|
GetSupergroupMembersFilterEnum() SupergroupMembersFilterEnum
|
|
}
|
|
|
|
// SecretChatState Describes the current secret chat state
|
|
type SecretChatState interface {
|
|
GetSecretChatStateEnum() SecretChatStateEnum
|
|
}
|
|
|
|
// MessageSender Contains information about the sender of a message
|
|
type MessageSender interface {
|
|
GetMessageSenderEnum() MessageSenderEnum
|
|
}
|
|
|
|
// MessageForwardOrigin Contains information about the origin of a forwarded message
|
|
type MessageForwardOrigin interface {
|
|
GetMessageForwardOriginEnum() MessageForwardOriginEnum
|
|
}
|
|
|
|
// MessageSendingState Contains information about the sending state of the message
|
|
type MessageSendingState interface {
|
|
GetMessageSendingStateEnum() MessageSendingStateEnum
|
|
}
|
|
|
|
// NotificationSettingsScope Describes the types of chats to which notification settings are applied
|
|
type NotificationSettingsScope interface {
|
|
GetNotificationSettingsScopeEnum() NotificationSettingsScopeEnum
|
|
}
|
|
|
|
// ChatType Describes the type of a chat
|
|
type ChatType interface {
|
|
GetChatTypeEnum() ChatTypeEnum
|
|
}
|
|
|
|
// ChatList Describes a list of chats
|
|
type ChatList interface {
|
|
GetChatListEnum() ChatListEnum
|
|
}
|
|
|
|
// ChatSource Describes a reason why an external chat is shown in a chat list
|
|
type ChatSource interface {
|
|
GetChatSourceEnum() ChatSourceEnum
|
|
}
|
|
|
|
// PublicChatType Describes a type of public chats
|
|
type PublicChatType interface {
|
|
GetPublicChatTypeEnum() PublicChatTypeEnum
|
|
}
|
|
|
|
// ChatActionBar Describes actions which should be possible to do through a chat action bar
|
|
type ChatActionBar interface {
|
|
GetChatActionBarEnum() ChatActionBarEnum
|
|
}
|
|
|
|
// KeyboardButtonType Describes a keyboard button type
|
|
type KeyboardButtonType interface {
|
|
GetKeyboardButtonTypeEnum() KeyboardButtonTypeEnum
|
|
}
|
|
|
|
// InlineKeyboardButtonType Describes the type of an inline keyboard button
|
|
type InlineKeyboardButtonType interface {
|
|
GetInlineKeyboardButtonTypeEnum() InlineKeyboardButtonTypeEnum
|
|
}
|
|
|
|
// ReplyMarkup Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots
|
|
type ReplyMarkup interface {
|
|
GetReplyMarkupEnum() ReplyMarkupEnum
|
|
}
|
|
|
|
// LoginURLInfo Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl
|
|
type LoginURLInfo interface {
|
|
GetLoginURLInfoEnum() LoginURLInfoEnum
|
|
}
|
|
|
|
// RichText Describes a text object inside an instant-view web page
|
|
type RichText interface {
|
|
GetRichTextEnum() RichTextEnum
|
|
}
|
|
|
|
// PageBlockHorizontalAlignment Describes a horizontal alignment of a table cell content
|
|
type PageBlockHorizontalAlignment interface {
|
|
GetPageBlockHorizontalAlignmentEnum() PageBlockHorizontalAlignmentEnum
|
|
}
|
|
|
|
// PageBlockVerticalAlignment Describes a Vertical alignment of a table cell content
|
|
type PageBlockVerticalAlignment interface {
|
|
GetPageBlockVerticalAlignmentEnum() PageBlockVerticalAlignmentEnum
|
|
}
|
|
|
|
// PageBlock Describes a block of an instant view web page
|
|
type PageBlock interface {
|
|
GetPageBlockEnum() PageBlockEnum
|
|
}
|
|
|
|
// InputCredentials Contains information about the payment method chosen by the user
|
|
type InputCredentials interface {
|
|
GetInputCredentialsEnum() InputCredentialsEnum
|
|
}
|
|
|
|
// PassportElementType Contains the type of a Telegram Passport element
|
|
type PassportElementType interface {
|
|
GetPassportElementTypeEnum() PassportElementTypeEnum
|
|
}
|
|
|
|
// PassportElement Contains information about a Telegram Passport element
|
|
type PassportElement interface {
|
|
GetPassportElementEnum() PassportElementEnum
|
|
}
|
|
|
|
// InputPassportElement Contains information about a Telegram Passport element to be saved
|
|
type InputPassportElement interface {
|
|
GetInputPassportElementEnum() InputPassportElementEnum
|
|
}
|
|
|
|
// PassportElementErrorSource Contains the description of an error in a Telegram Passport element
|
|
type PassportElementErrorSource interface {
|
|
GetPassportElementErrorSourceEnum() PassportElementErrorSourceEnum
|
|
}
|
|
|
|
// InputPassportElementErrorSource Contains the description of an error in a Telegram Passport element; for bots only
|
|
type InputPassportElementErrorSource interface {
|
|
GetInputPassportElementErrorSourceEnum() InputPassportElementErrorSourceEnum
|
|
}
|
|
|
|
// MessageContent Contains the content of a message
|
|
type MessageContent interface {
|
|
GetMessageContentEnum() MessageContentEnum
|
|
}
|
|
|
|
// TextEntityType Represents a part of the text which must be formatted differently
|
|
type TextEntityType interface {
|
|
GetTextEntityTypeEnum() TextEntityTypeEnum
|
|
}
|
|
|
|
// MessageSchedulingState Contains information about the time when a scheduled message will be sent
|
|
type MessageSchedulingState interface {
|
|
GetMessageSchedulingStateEnum() MessageSchedulingStateEnum
|
|
}
|
|
|
|
// InputMessageContent The content of a message to send
|
|
type InputMessageContent interface {
|
|
GetInputMessageContentEnum() InputMessageContentEnum
|
|
}
|
|
|
|
// SearchMessagesFilter Represents a filter for message search results
|
|
type SearchMessagesFilter interface {
|
|
GetSearchMessagesFilterEnum() SearchMessagesFilterEnum
|
|
}
|
|
|
|
// ChatAction Describes the different types of activity in a chat
|
|
type ChatAction interface {
|
|
GetChatActionEnum() ChatActionEnum
|
|
}
|
|
|
|
// UserStatus Describes the last time the user was online
|
|
type UserStatus interface {
|
|
GetUserStatusEnum() UserStatusEnum
|
|
}
|
|
|
|
// CallDiscardReason Describes the reason why a call was discarded
|
|
type CallDiscardReason interface {
|
|
GetCallDiscardReasonEnum() CallDiscardReasonEnum
|
|
}
|
|
|
|
// CallServerType Describes the type of a call server
|
|
type CallServerType interface {
|
|
GetCallServerTypeEnum() CallServerTypeEnum
|
|
}
|
|
|
|
// CallState Describes the current call state
|
|
type CallState interface {
|
|
GetCallStateEnum() CallStateEnum
|
|
}
|
|
|
|
// CallProblem Describes the exact type of a problem with a call
|
|
type CallProblem interface {
|
|
GetCallProblemEnum() CallProblemEnum
|
|
}
|
|
|
|
// DiceStickers Contains animated stickers which should be used for dice animation rendering
|
|
type DiceStickers interface {
|
|
GetDiceStickersEnum() DiceStickersEnum
|
|
}
|
|
|
|
// InputInlineQueryResult Represents a single result of an inline query; for bots only
|
|
type InputInlineQueryResult interface {
|
|
GetInputInlineQueryResultEnum() InputInlineQueryResultEnum
|
|
}
|
|
|
|
// InlineQueryResult Represents a single result of an inline query
|
|
type InlineQueryResult interface {
|
|
GetInlineQueryResultEnum() InlineQueryResultEnum
|
|
}
|
|
|
|
// CallbackQueryPayload Represents a payload of a callback query
|
|
type CallbackQueryPayload interface {
|
|
GetCallbackQueryPayloadEnum() CallbackQueryPayloadEnum
|
|
}
|
|
|
|
// ChatEventAction Represents a chat event
|
|
type ChatEventAction interface {
|
|
GetChatEventActionEnum() ChatEventActionEnum
|
|
}
|
|
|
|
// LanguagePackStringValue Represents the value of a string in a language pack
|
|
type LanguagePackStringValue interface {
|
|
GetLanguagePackStringValueEnum() LanguagePackStringValueEnum
|
|
}
|
|
|
|
// DeviceToken Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org
|
|
type DeviceToken interface {
|
|
GetDeviceTokenEnum() DeviceTokenEnum
|
|
}
|
|
|
|
// BackgroundFill Describes a fill of a background
|
|
type BackgroundFill interface {
|
|
GetBackgroundFillEnum() BackgroundFillEnum
|
|
}
|
|
|
|
// BackgroundType Describes the type of a background
|
|
type BackgroundType interface {
|
|
GetBackgroundTypeEnum() BackgroundTypeEnum
|
|
}
|
|
|
|
// InputBackground Contains information about background to set
|
|
type InputBackground interface {
|
|
GetInputBackgroundEnum() InputBackgroundEnum
|
|
}
|
|
|
|
// CanTransferOwnershipResult Represents result of checking whether the current session can be used to transfer a chat ownership to another user
|
|
type CanTransferOwnershipResult interface {
|
|
GetCanTransferOwnershipResultEnum() CanTransferOwnershipResultEnum
|
|
}
|
|
|
|
// CheckChatUsernameResult Represents result of checking whether a username can be set for a chat
|
|
type CheckChatUsernameResult interface {
|
|
GetCheckChatUsernameResultEnum() CheckChatUsernameResultEnum
|
|
}
|
|
|
|
// MessageFileType Contains information about a file with messages exported from another app
|
|
type MessageFileType interface {
|
|
GetMessageFileTypeEnum() MessageFileTypeEnum
|
|
}
|
|
|
|
// PushMessageContent Contains content of a push message notification
|
|
type PushMessageContent interface {
|
|
GetPushMessageContentEnum() PushMessageContentEnum
|
|
}
|
|
|
|
// NotificationType Contains detailed information about a notification
|
|
type NotificationType interface {
|
|
GetNotificationTypeEnum() NotificationTypeEnum
|
|
}
|
|
|
|
// NotificationGroupType Describes the type of notifications in a notification group
|
|
type NotificationGroupType interface {
|
|
GetNotificationGroupTypeEnum() NotificationGroupTypeEnum
|
|
}
|
|
|
|
// OptionValue Represents the value of an option
|
|
type OptionValue interface {
|
|
GetOptionValueEnum() OptionValueEnum
|
|
}
|
|
|
|
// JsonValue Represents a JSON value
|
|
type JsonValue interface {
|
|
GetJsonValueEnum() JsonValueEnum
|
|
}
|
|
|
|
// UserPrivacySettingRule Represents a single rule for managing privacy settings
|
|
type UserPrivacySettingRule interface {
|
|
GetUserPrivacySettingRuleEnum() UserPrivacySettingRuleEnum
|
|
}
|
|
|
|
// UserPrivacySetting Describes available user privacy settings
|
|
type UserPrivacySetting interface {
|
|
GetUserPrivacySettingEnum() UserPrivacySettingEnum
|
|
}
|
|
|
|
// ChatReportReason Describes the reason why a chat is reported
|
|
type ChatReportReason interface {
|
|
GetChatReportReasonEnum() ChatReportReasonEnum
|
|
}
|
|
|
|
// FileType Represents the type of a file
|
|
type FileType interface {
|
|
GetFileTypeEnum() FileTypeEnum
|
|
}
|
|
|
|
// NetworkType Represents the type of a network
|
|
type NetworkType interface {
|
|
GetNetworkTypeEnum() NetworkTypeEnum
|
|
}
|
|
|
|
// NetworkStatisticsEntry Contains statistics about network usage
|
|
type NetworkStatisticsEntry interface {
|
|
GetNetworkStatisticsEntryEnum() NetworkStatisticsEntryEnum
|
|
}
|
|
|
|
// ConnectionState Describes the current state of the connection to Telegram servers
|
|
type ConnectionState interface {
|
|
GetConnectionStateEnum() ConnectionStateEnum
|
|
}
|
|
|
|
// TopChatCategory Represents the categories of chats for which a list of frequently used chats can be retrieved
|
|
type TopChatCategory interface {
|
|
GetTopChatCategoryEnum() TopChatCategoryEnum
|
|
}
|
|
|
|
// TMeURLType Describes the type of a URL linking to an internal Telegram entity
|
|
type TMeURLType interface {
|
|
GetTMeURLTypeEnum() TMeURLTypeEnum
|
|
}
|
|
|
|
// SuggestedAction Describes an action suggested to the current user
|
|
type SuggestedAction interface {
|
|
GetSuggestedActionEnum() SuggestedActionEnum
|
|
}
|
|
|
|
// TextParseMode Describes the way the text should be parsed for TextEntities
|
|
type TextParseMode interface {
|
|
GetTextParseModeEnum() TextParseModeEnum
|
|
}
|
|
|
|
// ProxyType Describes the type of a proxy server
|
|
type ProxyType interface {
|
|
GetProxyTypeEnum() ProxyTypeEnum
|
|
}
|
|
|
|
// InputSticker Describes a sticker that needs to be added to a sticker set
|
|
type InputSticker interface {
|
|
GetInputStickerEnum() InputStickerEnum
|
|
}
|
|
|
|
// StatisticalGraph Describes a statistical graph
|
|
type StatisticalGraph interface {
|
|
GetStatisticalGraphEnum() StatisticalGraphEnum
|
|
}
|
|
|
|
// ChatStatistics Contains a detailed statistics about a chat
|
|
type ChatStatistics interface {
|
|
GetChatStatisticsEnum() ChatStatisticsEnum
|
|
}
|
|
|
|
// VectorPathCommand Represents a vector path command
|
|
type VectorPathCommand interface {
|
|
GetVectorPathCommandEnum() VectorPathCommandEnum
|
|
}
|
|
|
|
// Update Contains notifications about data changes
|
|
type Update interface {
|
|
GetUpdateEnum() UpdateEnum
|
|
}
|
|
|
|
// LogStream Describes a stream to which TDLib internal log is written
|
|
type LogStream interface {
|
|
GetLogStreamEnum() LogStreamEnum
|
|
}
|
|
|
|
// Error An object of this type can be returned on every function call, in case of an error
|
|
type Error struct {
|
|
tdCommon
|
|
Code int32 `json:"code"` // Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user
|
|
Message string `json:"message"` // Error message; subject to future changes
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Error
|
|
func (error *Error) MessageType() string {
|
|
return "error"
|
|
}
|
|
|
|
// NewError creates a new Error
|
|
//
|
|
// @param code Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user
|
|
// @param message Error message; subject to future changes
|
|
func NewError(code int32, message string) *Error {
|
|
errorTemp := Error{
|
|
tdCommon: tdCommon{Type: "error"},
|
|
Code: code,
|
|
Message: message,
|
|
}
|
|
|
|
return &errorTemp
|
|
}
|
|
|
|
// Ok An object of this type is returned on a successful function call for certain functions
|
|
type Ok struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Ok
|
|
func (ok *Ok) MessageType() string {
|
|
return "ok"
|
|
}
|
|
|
|
// NewOk creates a new Ok
|
|
//
|
|
func NewOk() *Ok {
|
|
okTemp := Ok{
|
|
tdCommon: tdCommon{Type: "ok"},
|
|
}
|
|
|
|
return &okTemp
|
|
}
|
|
|
|
// TdlibParameters Contains parameters for TDLib initialization
|
|
type TdlibParameters struct {
|
|
tdCommon
|
|
UseTestDc bool `json:"use_test_dc"` // If set to true, the Telegram test environment will be used instead of the production environment
|
|
DatabaseDirectory string `json:"database_directory"` // The path to the directory for the persistent database; if empty, the current working directory will be used
|
|
FilesDirectory string `json:"files_directory"` // The path to the directory for storing files; if empty, database_directory will be used
|
|
UseFileDatabase bool `json:"use_file_database"` // If set to true, information about downloaded and uploaded files will be saved between application restarts
|
|
UseChatInfoDatabase bool `json:"use_chat_info_database"` // If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database
|
|
UseMessageDatabase bool `json:"use_message_database"` // If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database
|
|
UseSecretChats bool `json:"use_secret_chats"` // If set to true, support for secret chats will be enabled
|
|
APIID int32 `json:"api_id"` // Application identifier for Telegram API access, which can be obtained at https://my.telegram.org
|
|
APIHash string `json:"api_hash"` // Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org
|
|
SystemLanguageCode string `json:"system_language_code"` // IETF language tag of the user's operating system language; must be non-empty
|
|
DeviceModel string `json:"device_model"` // Model of the device the application is being run on; must be non-empty
|
|
SystemVersion string `json:"system_version"` // Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib
|
|
ApplicationVersion string `json:"application_version"` // Application version; must be non-empty
|
|
EnableStorageOptimizer bool `json:"enable_storage_optimizer"` // If set to true, old files will automatically be deleted
|
|
IgnoreFileNames bool `json:"ignore_file_names"` // If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name
|
|
}
|
|
|
|
// MessageType return the string telegram-type of TdlibParameters
|
|
func (tdlibParameters *TdlibParameters) MessageType() string {
|
|
return "tdlibParameters"
|
|
}
|
|
|
|
// NewTdlibParameters creates a new TdlibParameters
|
|
//
|
|
// @param useTestDc If set to true, the Telegram test environment will be used instead of the production environment
|
|
// @param databaseDirectory The path to the directory for the persistent database; if empty, the current working directory will be used
|
|
// @param filesDirectory The path to the directory for storing files; if empty, database_directory will be used
|
|
// @param useFileDatabase If set to true, information about downloaded and uploaded files will be saved between application restarts
|
|
// @param useChatInfoDatabase If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database
|
|
// @param useMessageDatabase If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database
|
|
// @param useSecretChats If set to true, support for secret chats will be enabled
|
|
// @param aPIID Application identifier for Telegram API access, which can be obtained at https://my.telegram.org
|
|
// @param aPIHash Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org
|
|
// @param systemLanguageCode IETF language tag of the user's operating system language; must be non-empty
|
|
// @param deviceModel Model of the device the application is being run on; must be non-empty
|
|
// @param systemVersion Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib
|
|
// @param applicationVersion Application version; must be non-empty
|
|
// @param enableStorageOptimizer If set to true, old files will automatically be deleted
|
|
// @param ignoreFileNames If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name
|
|
func NewTdlibParameters(useTestDc bool, databaseDirectory string, filesDirectory string, useFileDatabase bool, useChatInfoDatabase bool, useMessageDatabase bool, useSecretChats bool, aPIID int32, aPIHash string, systemLanguageCode string, deviceModel string, systemVersion string, applicationVersion string, enableStorageOptimizer bool, ignoreFileNames bool) *TdlibParameters {
|
|
tdlibParametersTemp := TdlibParameters{
|
|
tdCommon: tdCommon{Type: "tdlibParameters"},
|
|
UseTestDc: useTestDc,
|
|
DatabaseDirectory: databaseDirectory,
|
|
FilesDirectory: filesDirectory,
|
|
UseFileDatabase: useFileDatabase,
|
|
UseChatInfoDatabase: useChatInfoDatabase,
|
|
UseMessageDatabase: useMessageDatabase,
|
|
UseSecretChats: useSecretChats,
|
|
APIID: aPIID,
|
|
APIHash: aPIHash,
|
|
SystemLanguageCode: systemLanguageCode,
|
|
DeviceModel: deviceModel,
|
|
SystemVersion: systemVersion,
|
|
ApplicationVersion: applicationVersion,
|
|
EnableStorageOptimizer: enableStorageOptimizer,
|
|
IgnoreFileNames: ignoreFileNames,
|
|
}
|
|
|
|
return &tdlibParametersTemp
|
|
}
|
|
|
|
// AuthenticationCodeTypeTelegramMessage An authentication code is delivered via a private Telegram message, which can be viewed from another active session
|
|
type AuthenticationCodeTypeTelegramMessage struct {
|
|
tdCommon
|
|
Length int32 `json:"length"` // Length of the code
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthenticationCodeTypeTelegramMessage
|
|
func (authenticationCodeTypeTelegramMessage *AuthenticationCodeTypeTelegramMessage) MessageType() string {
|
|
return "authenticationCodeTypeTelegramMessage"
|
|
}
|
|
|
|
// NewAuthenticationCodeTypeTelegramMessage creates a new AuthenticationCodeTypeTelegramMessage
|
|
//
|
|
// @param length Length of the code
|
|
func NewAuthenticationCodeTypeTelegramMessage(length int32) *AuthenticationCodeTypeTelegramMessage {
|
|
authenticationCodeTypeTelegramMessageTemp := AuthenticationCodeTypeTelegramMessage{
|
|
tdCommon: tdCommon{Type: "authenticationCodeTypeTelegramMessage"},
|
|
Length: length,
|
|
}
|
|
|
|
return &authenticationCodeTypeTelegramMessageTemp
|
|
}
|
|
|
|
// GetAuthenticationCodeTypeEnum return the enum type of this object
|
|
func (authenticationCodeTypeTelegramMessage *AuthenticationCodeTypeTelegramMessage) GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum {
|
|
return AuthenticationCodeTypeTelegramMessageType
|
|
}
|
|
|
|
// AuthenticationCodeTypeSms An authentication code is delivered via an SMS message to the specified phone number
|
|
type AuthenticationCodeTypeSms struct {
|
|
tdCommon
|
|
Length int32 `json:"length"` // Length of the code
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthenticationCodeTypeSms
|
|
func (authenticationCodeTypeSms *AuthenticationCodeTypeSms) MessageType() string {
|
|
return "authenticationCodeTypeSms"
|
|
}
|
|
|
|
// NewAuthenticationCodeTypeSms creates a new AuthenticationCodeTypeSms
|
|
//
|
|
// @param length Length of the code
|
|
func NewAuthenticationCodeTypeSms(length int32) *AuthenticationCodeTypeSms {
|
|
authenticationCodeTypeSmsTemp := AuthenticationCodeTypeSms{
|
|
tdCommon: tdCommon{Type: "authenticationCodeTypeSms"},
|
|
Length: length,
|
|
}
|
|
|
|
return &authenticationCodeTypeSmsTemp
|
|
}
|
|
|
|
// GetAuthenticationCodeTypeEnum return the enum type of this object
|
|
func (authenticationCodeTypeSms *AuthenticationCodeTypeSms) GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum {
|
|
return AuthenticationCodeTypeSmsType
|
|
}
|
|
|
|
// AuthenticationCodeTypeCall An authentication code is delivered via a phone call to the specified phone number
|
|
type AuthenticationCodeTypeCall struct {
|
|
tdCommon
|
|
Length int32 `json:"length"` // Length of the code
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthenticationCodeTypeCall
|
|
func (authenticationCodeTypeCall *AuthenticationCodeTypeCall) MessageType() string {
|
|
return "authenticationCodeTypeCall"
|
|
}
|
|
|
|
// NewAuthenticationCodeTypeCall creates a new AuthenticationCodeTypeCall
|
|
//
|
|
// @param length Length of the code
|
|
func NewAuthenticationCodeTypeCall(length int32) *AuthenticationCodeTypeCall {
|
|
authenticationCodeTypeCallTemp := AuthenticationCodeTypeCall{
|
|
tdCommon: tdCommon{Type: "authenticationCodeTypeCall"},
|
|
Length: length,
|
|
}
|
|
|
|
return &authenticationCodeTypeCallTemp
|
|
}
|
|
|
|
// GetAuthenticationCodeTypeEnum return the enum type of this object
|
|
func (authenticationCodeTypeCall *AuthenticationCodeTypeCall) GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum {
|
|
return AuthenticationCodeTypeCallType
|
|
}
|
|
|
|
// AuthenticationCodeTypeFlashCall An authentication code is delivered by an immediately cancelled call to the specified phone number. The number from which the call was made is the code
|
|
type AuthenticationCodeTypeFlashCall struct {
|
|
tdCommon
|
|
Pattern string `json:"pattern"` // Pattern of the phone number from which the call will be made
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthenticationCodeTypeFlashCall
|
|
func (authenticationCodeTypeFlashCall *AuthenticationCodeTypeFlashCall) MessageType() string {
|
|
return "authenticationCodeTypeFlashCall"
|
|
}
|
|
|
|
// NewAuthenticationCodeTypeFlashCall creates a new AuthenticationCodeTypeFlashCall
|
|
//
|
|
// @param pattern Pattern of the phone number from which the call will be made
|
|
func NewAuthenticationCodeTypeFlashCall(pattern string) *AuthenticationCodeTypeFlashCall {
|
|
authenticationCodeTypeFlashCallTemp := AuthenticationCodeTypeFlashCall{
|
|
tdCommon: tdCommon{Type: "authenticationCodeTypeFlashCall"},
|
|
Pattern: pattern,
|
|
}
|
|
|
|
return &authenticationCodeTypeFlashCallTemp
|
|
}
|
|
|
|
// GetAuthenticationCodeTypeEnum return the enum type of this object
|
|
func (authenticationCodeTypeFlashCall *AuthenticationCodeTypeFlashCall) GetAuthenticationCodeTypeEnum() AuthenticationCodeTypeEnum {
|
|
return AuthenticationCodeTypeFlashCallType
|
|
}
|
|
|
|
// AuthenticationCodeInfo Information about the authentication code that was sent
|
|
type AuthenticationCodeInfo struct {
|
|
tdCommon
|
|
PhoneNumber string `json:"phone_number"` // A phone number that is being authenticated
|
|
Type AuthenticationCodeType `json:"type"` // Describes the way the code was sent to the user
|
|
NextType AuthenticationCodeType `json:"next_type"` // Describes the way the next code will be sent to the user; may be null
|
|
Timeout int32 `json:"timeout"` // Timeout before the code should be re-sent, in seconds
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthenticationCodeInfo
|
|
func (authenticationCodeInfo *AuthenticationCodeInfo) MessageType() string {
|
|
return "authenticationCodeInfo"
|
|
}
|
|
|
|
// NewAuthenticationCodeInfo creates a new AuthenticationCodeInfo
|
|
//
|
|
// @param phoneNumber A phone number that is being authenticated
|
|
// @param typeParam Describes the way the code was sent to the user
|
|
// @param nextType Describes the way the next code will be sent to the user; may be null
|
|
// @param timeout Timeout before the code should be re-sent, in seconds
|
|
func NewAuthenticationCodeInfo(phoneNumber string, typeParam AuthenticationCodeType, nextType AuthenticationCodeType, timeout int32) *AuthenticationCodeInfo {
|
|
authenticationCodeInfoTemp := AuthenticationCodeInfo{
|
|
tdCommon: tdCommon{Type: "authenticationCodeInfo"},
|
|
PhoneNumber: phoneNumber,
|
|
Type: typeParam,
|
|
NextType: nextType,
|
|
Timeout: timeout,
|
|
}
|
|
|
|
return &authenticationCodeInfoTemp
|
|
}
|
|
|
|
// UnmarshalJSON unmarshal to json
|
|
func (authenticationCodeInfo *AuthenticationCodeInfo) UnmarshalJSON(b []byte) error {
|
|
var objMap map[string]*json.RawMessage
|
|
err := json.Unmarshal(b, &objMap)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
tempObj := struct {
|
|
tdCommon
|
|
PhoneNumber string `json:"phone_number"` // A phone number that is being authenticated
|
|
Timeout int32 `json:"timeout"` // Timeout before the code should be re-sent, in seconds
|
|
}{}
|
|
err = json.Unmarshal(b, &tempObj)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
authenticationCodeInfo.tdCommon = tempObj.tdCommon
|
|
authenticationCodeInfo.PhoneNumber = tempObj.PhoneNumber
|
|
authenticationCodeInfo.Timeout = tempObj.Timeout
|
|
|
|
fieldType, _ := unmarshalAuthenticationCodeType(objMap["type"])
|
|
authenticationCodeInfo.Type = fieldType
|
|
|
|
fieldNextType, _ := unmarshalAuthenticationCodeType(objMap["next_type"])
|
|
authenticationCodeInfo.NextType = fieldNextType
|
|
|
|
return nil
|
|
}
|
|
|
|
// EmailAddressAuthenticationCodeInfo Information about the email address authentication code that was sent
|
|
type EmailAddressAuthenticationCodeInfo struct {
|
|
tdCommon
|
|
EmailAddressPattern string `json:"email_address_pattern"` // Pattern of the email address to which an authentication code was sent
|
|
Length int32 `json:"length"` // Length of the code; 0 if unknown
|
|
}
|
|
|
|
// MessageType return the string telegram-type of EmailAddressAuthenticationCodeInfo
|
|
func (emailAddressAuthenticationCodeInfo *EmailAddressAuthenticationCodeInfo) MessageType() string {
|
|
return "emailAddressAuthenticationCodeInfo"
|
|
}
|
|
|
|
// NewEmailAddressAuthenticationCodeInfo creates a new EmailAddressAuthenticationCodeInfo
|
|
//
|
|
// @param emailAddressPattern Pattern of the email address to which an authentication code was sent
|
|
// @param length Length of the code; 0 if unknown
|
|
func NewEmailAddressAuthenticationCodeInfo(emailAddressPattern string, length int32) *EmailAddressAuthenticationCodeInfo {
|
|
emailAddressAuthenticationCodeInfoTemp := EmailAddressAuthenticationCodeInfo{
|
|
tdCommon: tdCommon{Type: "emailAddressAuthenticationCodeInfo"},
|
|
EmailAddressPattern: emailAddressPattern,
|
|
Length: length,
|
|
}
|
|
|
|
return &emailAddressAuthenticationCodeInfoTemp
|
|
}
|
|
|
|
// TextEntity Represents a part of the text that needs to be formatted in some unusual way
|
|
type TextEntity struct {
|
|
tdCommon
|
|
Offset int32 `json:"offset"` // Offset of the entity, in UTF-16 code units
|
|
Length int32 `json:"length"` // Length of the entity, in UTF-16 code units
|
|
Type TextEntityType `json:"type"` // Type of the entity
|
|
}
|
|
|
|
// MessageType return the string telegram-type of TextEntity
|
|
func (textEntity *TextEntity) MessageType() string {
|
|
return "textEntity"
|
|
}
|
|
|
|
// NewTextEntity creates a new TextEntity
|
|
//
|
|
// @param offset Offset of the entity, in UTF-16 code units
|
|
// @param length Length of the entity, in UTF-16 code units
|
|
// @param typeParam Type of the entity
|
|
func NewTextEntity(offset int32, length int32, typeParam TextEntityType) *TextEntity {
|
|
textEntityTemp := TextEntity{
|
|
tdCommon: tdCommon{Type: "textEntity"},
|
|
Offset: offset,
|
|
Length: length,
|
|
Type: typeParam,
|
|
}
|
|
|
|
return &textEntityTemp
|
|
}
|
|
|
|
// UnmarshalJSON unmarshal to json
|
|
func (textEntity *TextEntity) UnmarshalJSON(b []byte) error {
|
|
var objMap map[string]*json.RawMessage
|
|
err := json.Unmarshal(b, &objMap)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
tempObj := struct {
|
|
tdCommon
|
|
Offset int32 `json:"offset"` // Offset of the entity, in UTF-16 code units
|
|
Length int32 `json:"length"` // Length of the entity, in UTF-16 code units
|
|
|
|
}{}
|
|
err = json.Unmarshal(b, &tempObj)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
textEntity.tdCommon = tempObj.tdCommon
|
|
textEntity.Offset = tempObj.Offset
|
|
textEntity.Length = tempObj.Length
|
|
|
|
fieldType, _ := unmarshalTextEntityType(objMap["type"])
|
|
textEntity.Type = fieldType
|
|
|
|
return nil
|
|
}
|
|
|
|
// TextEntities Contains a list of text entities
|
|
type TextEntities struct {
|
|
tdCommon
|
|
Entities []TextEntity `json:"entities"` // List of text entities
|
|
}
|
|
|
|
// MessageType return the string telegram-type of TextEntities
|
|
func (textEntities *TextEntities) MessageType() string {
|
|
return "textEntities"
|
|
}
|
|
|
|
// NewTextEntities creates a new TextEntities
|
|
//
|
|
// @param entities List of text entities
|
|
func NewTextEntities(entities []TextEntity) *TextEntities {
|
|
textEntitiesTemp := TextEntities{
|
|
tdCommon: tdCommon{Type: "textEntities"},
|
|
Entities: entities,
|
|
}
|
|
|
|
return &textEntitiesTemp
|
|
}
|
|
|
|
// FormattedText A text with some entities
|
|
type FormattedText struct {
|
|
tdCommon
|
|
Text string `json:"text"` // The text
|
|
Entities []TextEntity `json:"entities"` // Entities contained in the text. Entities can be nested, but must not mutually intersect with each other.
|
|
}
|
|
|
|
// MessageType return the string telegram-type of FormattedText
|
|
func (formattedText *FormattedText) MessageType() string {
|
|
return "formattedText"
|
|
}
|
|
|
|
// NewFormattedText creates a new FormattedText
|
|
//
|
|
// @param text The text
|
|
// @param entities Entities contained in the text. Entities can be nested, but must not mutually intersect with each other.
|
|
func NewFormattedText(text string, entities []TextEntity) *FormattedText {
|
|
formattedTextTemp := FormattedText{
|
|
tdCommon: tdCommon{Type: "formattedText"},
|
|
Text: text,
|
|
Entities: entities,
|
|
}
|
|
|
|
return &formattedTextTemp
|
|
}
|
|
|
|
// TermsOfService Contains Telegram terms of service
|
|
type TermsOfService struct {
|
|
tdCommon
|
|
Text *FormattedText `json:"text"` // Text of the terms of service
|
|
MinUserAge int32 `json:"min_user_age"` // The minimum age of a user to be able to accept the terms; 0 if any
|
|
ShowPopup bool `json:"show_popup"` // True, if a blocking popup with terms of service must be shown to the user
|
|
}
|
|
|
|
// MessageType return the string telegram-type of TermsOfService
|
|
func (termsOfService *TermsOfService) MessageType() string {
|
|
return "termsOfService"
|
|
}
|
|
|
|
// NewTermsOfService creates a new TermsOfService
|
|
//
|
|
// @param text Text of the terms of service
|
|
// @param minUserAge The minimum age of a user to be able to accept the terms; 0 if any
|
|
// @param showPopup True, if a blocking popup with terms of service must be shown to the user
|
|
func NewTermsOfService(text *FormattedText, minUserAge int32, showPopup bool) *TermsOfService {
|
|
termsOfServiceTemp := TermsOfService{
|
|
tdCommon: tdCommon{Type: "termsOfService"},
|
|
Text: text,
|
|
MinUserAge: minUserAge,
|
|
ShowPopup: showPopup,
|
|
}
|
|
|
|
return &termsOfServiceTemp
|
|
}
|
|
|
|
// AuthorizationStateWaitTdlibParameters TDLib needs TdlibParameters for initialization
|
|
type AuthorizationStateWaitTdlibParameters struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateWaitTdlibParameters
|
|
func (authorizationStateWaitTdlibParameters *AuthorizationStateWaitTdlibParameters) MessageType() string {
|
|
return "authorizationStateWaitTdlibParameters"
|
|
}
|
|
|
|
// NewAuthorizationStateWaitTdlibParameters creates a new AuthorizationStateWaitTdlibParameters
|
|
//
|
|
func NewAuthorizationStateWaitTdlibParameters() *AuthorizationStateWaitTdlibParameters {
|
|
authorizationStateWaitTdlibParametersTemp := AuthorizationStateWaitTdlibParameters{
|
|
tdCommon: tdCommon{Type: "authorizationStateWaitTdlibParameters"},
|
|
}
|
|
|
|
return &authorizationStateWaitTdlibParametersTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateWaitTdlibParameters *AuthorizationStateWaitTdlibParameters) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateWaitTdlibParametersType
|
|
}
|
|
|
|
// AuthorizationStateWaitEncryptionKey TDLib needs an encryption key to decrypt the local database
|
|
type AuthorizationStateWaitEncryptionKey struct {
|
|
tdCommon
|
|
IsEncrypted bool `json:"is_encrypted"` // True, if the database is currently encrypted
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateWaitEncryptionKey
|
|
func (authorizationStateWaitEncryptionKey *AuthorizationStateWaitEncryptionKey) MessageType() string {
|
|
return "authorizationStateWaitEncryptionKey"
|
|
}
|
|
|
|
// NewAuthorizationStateWaitEncryptionKey creates a new AuthorizationStateWaitEncryptionKey
|
|
//
|
|
// @param isEncrypted True, if the database is currently encrypted
|
|
func NewAuthorizationStateWaitEncryptionKey(isEncrypted bool) *AuthorizationStateWaitEncryptionKey {
|
|
authorizationStateWaitEncryptionKeyTemp := AuthorizationStateWaitEncryptionKey{
|
|
tdCommon: tdCommon{Type: "authorizationStateWaitEncryptionKey"},
|
|
IsEncrypted: isEncrypted,
|
|
}
|
|
|
|
return &authorizationStateWaitEncryptionKeyTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateWaitEncryptionKey *AuthorizationStateWaitEncryptionKey) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateWaitEncryptionKeyType
|
|
}
|
|
|
|
// AuthorizationStateWaitPhoneNumber TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options
|
|
type AuthorizationStateWaitPhoneNumber struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateWaitPhoneNumber
|
|
func (authorizationStateWaitPhoneNumber *AuthorizationStateWaitPhoneNumber) MessageType() string {
|
|
return "authorizationStateWaitPhoneNumber"
|
|
}
|
|
|
|
// NewAuthorizationStateWaitPhoneNumber creates a new AuthorizationStateWaitPhoneNumber
|
|
//
|
|
func NewAuthorizationStateWaitPhoneNumber() *AuthorizationStateWaitPhoneNumber {
|
|
authorizationStateWaitPhoneNumberTemp := AuthorizationStateWaitPhoneNumber{
|
|
tdCommon: tdCommon{Type: "authorizationStateWaitPhoneNumber"},
|
|
}
|
|
|
|
return &authorizationStateWaitPhoneNumberTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateWaitPhoneNumber *AuthorizationStateWaitPhoneNumber) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateWaitPhoneNumberType
|
|
}
|
|
|
|
// AuthorizationStateWaitCode TDLib needs the user's authentication code to authorize
|
|
type AuthorizationStateWaitCode struct {
|
|
tdCommon
|
|
CodeInfo *AuthenticationCodeInfo `json:"code_info"` // Information about the authorization code that was sent
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateWaitCode
|
|
func (authorizationStateWaitCode *AuthorizationStateWaitCode) MessageType() string {
|
|
return "authorizationStateWaitCode"
|
|
}
|
|
|
|
// NewAuthorizationStateWaitCode creates a new AuthorizationStateWaitCode
|
|
//
|
|
// @param codeInfo Information about the authorization code that was sent
|
|
func NewAuthorizationStateWaitCode(codeInfo *AuthenticationCodeInfo) *AuthorizationStateWaitCode {
|
|
authorizationStateWaitCodeTemp := AuthorizationStateWaitCode{
|
|
tdCommon: tdCommon{Type: "authorizationStateWaitCode"},
|
|
CodeInfo: codeInfo,
|
|
}
|
|
|
|
return &authorizationStateWaitCodeTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateWaitCode *AuthorizationStateWaitCode) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateWaitCodeType
|
|
}
|
|
|
|
// AuthorizationStateWaitOtherDeviceConfirmation The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link
|
|
type AuthorizationStateWaitOtherDeviceConfirmation struct {
|
|
tdCommon
|
|
Link string `json:"link"` // A tg:// URL for the QR code. The link will be updated frequently
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateWaitOtherDeviceConfirmation
|
|
func (authorizationStateWaitOtherDeviceConfirmation *AuthorizationStateWaitOtherDeviceConfirmation) MessageType() string {
|
|
return "authorizationStateWaitOtherDeviceConfirmation"
|
|
}
|
|
|
|
// NewAuthorizationStateWaitOtherDeviceConfirmation creates a new AuthorizationStateWaitOtherDeviceConfirmation
|
|
//
|
|
// @param link A tg:// URL for the QR code. The link will be updated frequently
|
|
func NewAuthorizationStateWaitOtherDeviceConfirmation(link string) *AuthorizationStateWaitOtherDeviceConfirmation {
|
|
authorizationStateWaitOtherDeviceConfirmationTemp := AuthorizationStateWaitOtherDeviceConfirmation{
|
|
tdCommon: tdCommon{Type: "authorizationStateWaitOtherDeviceConfirmation"},
|
|
Link: link,
|
|
}
|
|
|
|
return &authorizationStateWaitOtherDeviceConfirmationTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateWaitOtherDeviceConfirmation *AuthorizationStateWaitOtherDeviceConfirmation) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateWaitOtherDeviceConfirmationType
|
|
}
|
|
|
|
// AuthorizationStateWaitRegistration The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration
|
|
type AuthorizationStateWaitRegistration struct {
|
|
tdCommon
|
|
TermsOfService *TermsOfService `json:"terms_of_service"` // Telegram terms of service
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateWaitRegistration
|
|
func (authorizationStateWaitRegistration *AuthorizationStateWaitRegistration) MessageType() string {
|
|
return "authorizationStateWaitRegistration"
|
|
}
|
|
|
|
// NewAuthorizationStateWaitRegistration creates a new AuthorizationStateWaitRegistration
|
|
//
|
|
// @param termsOfService Telegram terms of service
|
|
func NewAuthorizationStateWaitRegistration(termsOfService *TermsOfService) *AuthorizationStateWaitRegistration {
|
|
authorizationStateWaitRegistrationTemp := AuthorizationStateWaitRegistration{
|
|
tdCommon: tdCommon{Type: "authorizationStateWaitRegistration"},
|
|
TermsOfService: termsOfService,
|
|
}
|
|
|
|
return &authorizationStateWaitRegistrationTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateWaitRegistration *AuthorizationStateWaitRegistration) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateWaitRegistrationType
|
|
}
|
|
|
|
// AuthorizationStateWaitPassword The user has been authorized, but needs to enter a password to start using the application
|
|
type AuthorizationStateWaitPassword struct {
|
|
tdCommon
|
|
PasswordHint string `json:"password_hint"` // Hint for the password; may be empty
|
|
HasRecoveryEmailAddress bool `json:"has_recovery_email_address"` // True, if a recovery email address has been set up
|
|
RecoveryEmailAddressPattern string `json:"recovery_email_address_pattern"` // Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateWaitPassword
|
|
func (authorizationStateWaitPassword *AuthorizationStateWaitPassword) MessageType() string {
|
|
return "authorizationStateWaitPassword"
|
|
}
|
|
|
|
// NewAuthorizationStateWaitPassword creates a new AuthorizationStateWaitPassword
|
|
//
|
|
// @param passwordHint Hint for the password; may be empty
|
|
// @param hasRecoveryEmailAddress True, if a recovery email address has been set up
|
|
// @param recoveryEmailAddressPattern Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent
|
|
func NewAuthorizationStateWaitPassword(passwordHint string, hasRecoveryEmailAddress bool, recoveryEmailAddressPattern string) *AuthorizationStateWaitPassword {
|
|
authorizationStateWaitPasswordTemp := AuthorizationStateWaitPassword{
|
|
tdCommon: tdCommon{Type: "authorizationStateWaitPassword"},
|
|
PasswordHint: passwordHint,
|
|
HasRecoveryEmailAddress: hasRecoveryEmailAddress,
|
|
RecoveryEmailAddressPattern: recoveryEmailAddressPattern,
|
|
}
|
|
|
|
return &authorizationStateWaitPasswordTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateWaitPassword *AuthorizationStateWaitPassword) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateWaitPasswordType
|
|
}
|
|
|
|
// AuthorizationStateReady The user has been successfully authorized. TDLib is now ready to answer queries
|
|
type AuthorizationStateReady struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateReady
|
|
func (authorizationStateReady *AuthorizationStateReady) MessageType() string {
|
|
return "authorizationStateReady"
|
|
}
|
|
|
|
// NewAuthorizationStateReady creates a new AuthorizationStateReady
|
|
//
|
|
func NewAuthorizationStateReady() *AuthorizationStateReady {
|
|
authorizationStateReadyTemp := AuthorizationStateReady{
|
|
tdCommon: tdCommon{Type: "authorizationStateReady"},
|
|
}
|
|
|
|
return &authorizationStateReadyTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateReady *AuthorizationStateReady) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateReadyType
|
|
}
|
|
|
|
// AuthorizationStateLoggingOut The user is currently logging out
|
|
type AuthorizationStateLoggingOut struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateLoggingOut
|
|
func (authorizationStateLoggingOut *AuthorizationStateLoggingOut) MessageType() string {
|
|
return "authorizationStateLoggingOut"
|
|
}
|
|
|
|
// NewAuthorizationStateLoggingOut creates a new AuthorizationStateLoggingOut
|
|
//
|
|
func NewAuthorizationStateLoggingOut() *AuthorizationStateLoggingOut {
|
|
authorizationStateLoggingOutTemp := AuthorizationStateLoggingOut{
|
|
tdCommon: tdCommon{Type: "authorizationStateLoggingOut"},
|
|
}
|
|
|
|
return &authorizationStateLoggingOutTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateLoggingOut *AuthorizationStateLoggingOut) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateLoggingOutType
|
|
}
|
|
|
|
// AuthorizationStateClosing TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received
|
|
type AuthorizationStateClosing struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateClosing
|
|
func (authorizationStateClosing *AuthorizationStateClosing) MessageType() string {
|
|
return "authorizationStateClosing"
|
|
}
|
|
|
|
// NewAuthorizationStateClosing creates a new AuthorizationStateClosing
|
|
//
|
|
func NewAuthorizationStateClosing() *AuthorizationStateClosing {
|
|
authorizationStateClosingTemp := AuthorizationStateClosing{
|
|
tdCommon: tdCommon{Type: "authorizationStateClosing"},
|
|
}
|
|
|
|
return &authorizationStateClosingTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateClosing *AuthorizationStateClosing) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateClosingType
|
|
}
|
|
|
|
// AuthorizationStateClosed TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to
|
|
type AuthorizationStateClosed struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of AuthorizationStateClosed
|
|
func (authorizationStateClosed *AuthorizationStateClosed) MessageType() string {
|
|
return "authorizationStateClosed"
|
|
}
|
|
|
|
// NewAuthorizationStateClosed creates a new AuthorizationStateClosed
|
|
//
|
|
func NewAuthorizationStateClosed() *AuthorizationStateClosed {
|
|
authorizationStateClosedTemp := AuthorizationStateClosed{
|
|
tdCommon: tdCommon{Type: "authorizationStateClosed"},
|
|
}
|
|
|
|
return &authorizationStateClosedTemp
|
|
}
|
|
|
|
// GetAuthorizationStateEnum return the enum type of this object
|
|
func (authorizationStateClosed *AuthorizationStateClosed) GetAuthorizationStateEnum() AuthorizationStateEnum {
|
|
return AuthorizationStateClosedType
|
|
}
|
|
|
|
// PasswordState Represents the current state of 2-step verification
|
|
type PasswordState struct {
|
|
tdCommon
|
|
HasPassword bool `json:"has_password"` // True, if a 2-step verification password is set
|
|
PasswordHint string `json:"password_hint"` // Hint for the password; may be empty
|
|
HasRecoveryEmailAddress bool `json:"has_recovery_email_address"` // True, if a recovery email is set
|
|
HasPassportData bool `json:"has_passport_data"` // True, if some Telegram Passport elements were saved
|
|
RecoveryEmailAddressCodeInfo *EmailAddressAuthenticationCodeInfo `json:"recovery_email_address_code_info"` // Information about the recovery email address to which the confirmation email was sent; may be null
|
|
}
|
|
|
|
// MessageType return the string telegram-type of PasswordState
|
|
func (passwordState *PasswordState) MessageType() string {
|
|
return "passwordState"
|
|
}
|
|
|
|
// NewPasswordState creates a new PasswordState
|
|
//
|
|
// @param hasPassword True, if a 2-step verification password is set
|
|
// @param passwordHint Hint for the password; may be empty
|
|
// @param hasRecoveryEmailAddress True, if a recovery email is set
|
|
// @param hasPassportData True, if some Telegram Passport elements were saved
|
|
// @param recoveryEmailAddressCodeInfo Information about the recovery email address to which the confirmation email was sent; may be null
|
|
func NewPasswordState(hasPassword bool, passwordHint string, hasRecoveryEmailAddress bool, hasPassportData bool, recoveryEmailAddressCodeInfo *EmailAddressAuthenticationCodeInfo) *PasswordState {
|
|
passwordStateTemp := PasswordState{
|
|
tdCommon: tdCommon{Type: "passwordState"},
|
|
HasPassword: hasPassword,
|
|
PasswordHint: passwordHint,
|
|
HasRecoveryEmailAddress: hasRecoveryEmailAddress,
|
|
HasPassportData: hasPassportData,
|
|
RecoveryEmailAddressCodeInfo: recoveryEmailAddressCodeInfo,
|
|
}
|
|
|
|
return &passwordStateTemp
|
|
}
|
|
|
|
// RecoveryEmailAddress Contains information about the current recovery email address
|
|
type RecoveryEmailAddress struct {
|
|
tdCommon
|
|
RecoveryEmailAddress string `json:"recovery_email_address"` // Recovery email address
|
|
}
|
|
|
|
// MessageType return the string telegram-type of RecoveryEmailAddress
|
|
func (recoveryEmailAddress *RecoveryEmailAddress) MessageType() string {
|
|
return "recoveryEmailAddress"
|
|
}
|
|
|
|
// NewRecoveryEmailAddress creates a new RecoveryEmailAddress
|
|
//
|
|
// @param recoveryEmailAddress Recovery email address
|
|
func NewRecoveryEmailAddress(recoveryEmailAddress string) *RecoveryEmailAddress {
|
|
recoveryEmailAddressTemp := RecoveryEmailAddress{
|
|
tdCommon: tdCommon{Type: "recoveryEmailAddress"},
|
|
RecoveryEmailAddress: recoveryEmailAddress,
|
|
}
|
|
|
|
return &recoveryEmailAddressTemp
|
|
}
|
|
|
|
// TemporaryPasswordState Returns information about the availability of a temporary password, which can be used for payments
|
|
type TemporaryPasswordState struct {
|
|
tdCommon
|
|
HasPassword bool `json:"has_password"` // True, if a temporary password is available
|
|
ValidFor int32 `json:"valid_for"` // Time left before the temporary password expires, in seconds
|
|
}
|
|
|
|
// MessageType return the string telegram-type of TemporaryPasswordState
|
|
func (temporaryPasswordState *TemporaryPasswordState) MessageType() string {
|
|
return "temporaryPasswordState"
|
|
}
|
|
|
|
// NewTemporaryPasswordState creates a new TemporaryPasswordState
|
|
//
|
|
// @param hasPassword True, if a temporary password is available
|
|
// @param validFor Time left before the temporary password expires, in seconds
|
|
func NewTemporaryPasswordState(hasPassword bool, validFor int32) *TemporaryPasswordState {
|
|
temporaryPasswordStateTemp := TemporaryPasswordState{
|
|
tdCommon: tdCommon{Type: "temporaryPasswordState"},
|
|
HasPassword: hasPassword,
|
|
ValidFor: validFor,
|
|
}
|
|
|
|
return &temporaryPasswordStateTemp
|
|
}
|
|
|
|
// LocalFile Represents a local file
|
|
type LocalFile struct {
|
|
tdCommon
|
|
Path string `json:"path"` // Local path to the locally available file part; may be empty
|
|
CanBeDownloaded bool `json:"can_be_downloaded"` // True, if it is possible to try to download or generate the file
|
|
CanBeDeleted bool `json:"can_be_deleted"` // True, if the file can be deleted
|
|
IsDownloadingActive bool `json:"is_downloading_active"` // True, if the file is currently being downloaded (or a local copy is being generated by some other means)
|
|
IsDownloadingCompleted bool `json:"is_downloading_completed"` // True, if the local copy is fully available
|
|
DownloadOffset int32 `json:"download_offset"` // Download will be started from this offset. downloaded_prefix_size is calculated from this offset
|
|
DownloadedPrefixSize int32 `json:"downloaded_prefix_size"` // If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix
|
|
DownloadedSize int32 `json:"downloaded_size"` // Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage
|
|
}
|
|
|
|
// MessageType return the string telegram-type of LocalFile
|
|
func (localFile *LocalFile) MessageType() string {
|
|
return "localFile"
|
|
}
|
|
|
|
// NewLocalFile creates a new LocalFile
|
|
//
|
|
// @param path Local path to the locally available file part; may be empty
|
|
// @param canBeDownloaded True, if it is possible to try to download or generate the file
|
|
// @param canBeDeleted True, if the file can be deleted
|
|
// @param isDownloadingActive True, if the file is currently being downloaded (or a local copy is being generated by some other means)
|
|
// @param isDownloadingCompleted True, if the local copy is fully available
|
|
// @param downloadOffset Download will be started from this offset. downloaded_prefix_size is calculated from this offset
|
|
// @param downloadedPrefixSize If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix
|
|
// @param downloadedSize Total downloaded file bytes. Should be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage
|
|
func NewLocalFile(path string, canBeDownloaded bool, canBeDeleted bool, isDownloadingActive bool, isDownloadingCompleted bool, downloadOffset int32, downloadedPrefixSize int32, downloadedSize int32) *LocalFile {
|
|
localFileTemp := LocalFile{
|
|
tdCommon: tdCommon{Type: "localFile"},
|
|
Path: path,
|
|
CanBeDownloaded: canBeDownloaded,
|
|
CanBeDeleted: canBeDeleted,
|
|
IsDownloadingActive: isDownloadingActive,
|
|
IsDownloadingCompleted: isDownloadingCompleted,
|
|
DownloadOffset: downloadOffset,
|
|
DownloadedPrefixSize: downloadedPrefixSize,
|
|
DownloadedSize: downloadedSize,
|
|
}
|
|
|
|
return &localFileTemp
|
|
}
|
|
|
|
// RemoteFile Represents a remote file
|
|
type RemoteFile struct {
|
|
tdCommon
|
|
ID string `json:"id"` // Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.
|
|
UniqueID string `json:"unique_id"` // Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time
|
|
IsUploadingActive bool `json:"is_uploading_active"` // True, if the file is currently being uploaded (or a remote copy is being generated by some other means)
|
|
IsUploadingCompleted bool `json:"is_uploading_completed"` // True, if a remote copy is fully available
|
|
UploadedSize int32 `json:"uploaded_size"` // Size of the remote available part of the file; 0 if unknown
|
|
}
|
|
|
|
// MessageType return the string telegram-type of RemoteFile
|
|
func (remoteFile *RemoteFile) MessageType() string {
|
|
return "remoteFile"
|
|
}
|
|
|
|
// NewRemoteFile creates a new RemoteFile
|
|
//
|
|
// @param iD Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers.
|
|
// @param uniqueID Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time
|
|
// @param isUploadingActive True, if the file is currently being uploaded (or a remote copy is being generated by some other means)
|
|
// @param isUploadingCompleted True, if a remote copy is fully available
|
|
// @param uploadedSize Size of the remote available part of the file; 0 if unknown
|
|
func NewRemoteFile(iD string, uniqueID string, isUploadingActive bool, isUploadingCompleted bool, uploadedSize int32) *RemoteFile {
|
|
remoteFileTemp := RemoteFile{
|
|
tdCommon: tdCommon{Type: "remoteFile"},
|
|
ID: iD,
|
|
UniqueID: uniqueID,
|
|
IsUploadingActive: isUploadingActive,
|
|
IsUploadingCompleted: isUploadingCompleted,
|
|
UploadedSize: uploadedSize,
|
|
}
|
|
|
|
return &remoteFileTemp
|
|
}
|
|
|
|
// File Represents a file
|
|
type File struct {
|
|
tdCommon
|
|
ID int32 `json:"id"` // Unique file identifier
|
|
Size int32 `json:"size"` // File size; 0 if unknown
|
|
ExpectedSize int32 `json:"expected_size"` // Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress
|
|
Local *LocalFile `json:"local"` // Information about the local copy of the file
|
|
Remote *RemoteFile `json:"remote"` // Information about the remote copy of the file
|
|
}
|
|
|
|
// MessageType return the string telegram-type of File
|
|
func (file *File) MessageType() string {
|
|
return "file"
|
|
}
|
|
|
|
// NewFile creates a new File
|
|
//
|
|
// @param iD Unique file identifier
|
|
// @param size File size; 0 if unknown
|
|
// @param expectedSize Expected file size in case the exact file size is unknown, but an approximate size is known. Can be used to show download/upload progress
|
|
// @param local Information about the local copy of the file
|
|
// @param remote Information about the remote copy of the file
|
|
func NewFile(iD int32, size int32, expectedSize int32, local *LocalFile, remote *RemoteFile) *File {
|
|
fileTemp := File{
|
|
tdCommon: tdCommon{Type: "file"},
|
|
ID: iD,
|
|
Size: size,
|
|
ExpectedSize: expectedSize,
|
|
Local: local,
|
|
Remote: remote,
|
|
}
|
|
|
|
return &fileTemp
|
|
}
|
|
|
|
// InputFileID A file defined by its unique ID
|
|
type InputFileID struct {
|
|
tdCommon
|
|
ID int32 `json:"id"` // Unique file identifier
|
|
}
|
|
|
|
// MessageType return the string telegram-type of InputFileID
|
|
func (inputFileID *InputFileID) MessageType() string {
|
|
return "inputFileId"
|
|
}
|
|
|
|
// NewInputFileID creates a new InputFileID
|
|
//
|
|
// @param iD Unique file identifier
|
|
func NewInputFileID(iD int32) *InputFileID {
|
|
inputFileIDTemp := InputFileID{
|
|
tdCommon: tdCommon{Type: "inputFileId"},
|
|
ID: iD,
|
|
}
|
|
|
|
return &inputFileIDTemp
|
|
}
|
|
|
|
// GetInputFileEnum return the enum type of this object
|
|
func (inputFileID *InputFileID) GetInputFileEnum() InputFileEnum {
|
|
return InputFileIDType
|
|
}
|
|
|
|
// InputFileRemote A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib.
|
|
type InputFileRemote struct {
|
|
tdCommon
|
|
ID string `json:"id"` // Remote file identifier
|
|
}
|
|
|
|
// MessageType return the string telegram-type of InputFileRemote
|
|
func (inputFileRemote *InputFileRemote) MessageType() string {
|
|
return "inputFileRemote"
|
|
}
|
|
|
|
// NewInputFileRemote creates a new InputFileRemote
|
|
//
|
|
// @param iD Remote file identifier
|
|
func NewInputFileRemote(iD string) *InputFileRemote {
|
|
inputFileRemoteTemp := InputFileRemote{
|
|
tdCommon: tdCommon{Type: "inputFileRemote"},
|
|
ID: iD,
|
|
}
|
|
|
|
return &inputFileRemoteTemp
|
|
}
|
|
|
|
// GetInputFileEnum return the enum type of this object
|
|
func (inputFileRemote *InputFileRemote) GetInputFileEnum() InputFileEnum {
|
|
return InputFileRemoteType
|
|
}
|
|
|
|
// InputFileLocal A file defined by a local path
|
|
type InputFileLocal struct {
|
|
tdCommon
|
|
Path string `json:"path"` // Local path to the file
|
|
}
|
|
|
|
// MessageType return the string telegram-type of InputFileLocal
|
|
func (inputFileLocal *InputFileLocal) MessageType() string {
|
|
return "inputFileLocal"
|
|
}
|
|
|
|
// NewInputFileLocal creates a new InputFileLocal
|
|
//
|
|
// @param path Local path to the file
|
|
func NewInputFileLocal(path string) *InputFileLocal {
|
|
inputFileLocalTemp := InputFileLocal{
|
|
tdCommon: tdCommon{Type: "inputFileLocal"},
|
|
Path: path,
|
|
}
|
|
|
|
return &inputFileLocalTemp
|
|
}
|
|
|
|
// GetInputFileEnum return the enum type of this object
|
|
func (inputFileLocal *InputFileLocal) GetInputFileEnum() InputFileEnum {
|
|
return InputFileLocalType
|
|
}
|
|
|
|
// InputFileGenerated A file generated by the application
|
|
type InputFileGenerated struct {
|
|
tdCommon
|
|
OriginalPath string `json:"original_path"` // Local path to a file from which the file is generated; may be empty if there is no such file
|
|
Conversion string `json:"conversion"` // String specifying the conversion applied to the original file; should be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage
|
|
ExpectedSize int32 `json:"expected_size"` // Expected size of the generated file; 0 if unknown
|
|
}
|
|
|
|
// MessageType return the string telegram-type of InputFileGenerated
|
|
func (inputFileGenerated *InputFileGenerated) MessageType() string {
|
|
return "inputFileGenerated"
|
|
}
|
|
|
|
// NewInputFileGenerated creates a new InputFileGenerated
|
|
//
|
|
// @param originalPath Local path to a file from which the file is generated; may be empty if there is no such file
|
|
// @param conversion String specifying the conversion applied to the original file; should be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage
|
|
// @param expectedSize Expected size of the generated file; 0 if unknown
|
|
func NewInputFileGenerated(originalPath string, conversion string, expectedSize int32) *InputFileGenerated {
|
|
inputFileGeneratedTemp := InputFileGenerated{
|
|
tdCommon: tdCommon{Type: "inputFileGenerated"},
|
|
OriginalPath: originalPath,
|
|
Conversion: conversion,
|
|
ExpectedSize: expectedSize,
|
|
}
|
|
|
|
return &inputFileGeneratedTemp
|
|
}
|
|
|
|
// GetInputFileEnum return the enum type of this object
|
|
func (inputFileGenerated *InputFileGenerated) GetInputFileEnum() InputFileEnum {
|
|
return InputFileGeneratedType
|
|
}
|
|
|
|
// PhotoSize Describes an image in JPEG format
|
|
type PhotoSize struct {
|
|
tdCommon
|
|
Type string `json:"type"` // Image type (see https://core.telegram.org/constructor/photoSize)
|
|
Photo *File `json:"photo"` // Information about the image file
|
|
Width int32 `json:"width"` // Image width
|
|
Height int32 `json:"height"` // Image height
|
|
ProgressiveSizes []int32 `json:"progressive_sizes"` // Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image
|
|
}
|
|
|
|
// MessageType return the string telegram-type of PhotoSize
|
|
func (photoSize *PhotoSize) MessageType() string {
|
|
return "photoSize"
|
|
}
|
|
|
|
// NewPhotoSize creates a new PhotoSize
|
|
//
|
|
// @param typeParam Image type (see https://core.telegram.org/constructor/photoSize)
|
|
// @param photo Information about the image file
|
|
// @param width Image width
|
|
// @param height Image height
|
|
// @param progressiveSizes Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image
|
|
func NewPhotoSize(typeParam string, photo *File, width int32, height int32, progressiveSizes []int32) *PhotoSize {
|
|
photoSizeTemp := PhotoSize{
|
|
tdCommon: tdCommon{Type: "photoSize"},
|
|
Type: typeParam,
|
|
Photo: photo,
|
|
Width: width,
|
|
Height: height,
|
|
ProgressiveSizes: progressiveSizes,
|
|
}
|
|
|
|
return &photoSizeTemp
|
|
}
|
|
|
|
// Minithumbnail Thumbnail image of a very poor quality and low resolution
|
|
type Minithumbnail struct {
|
|
tdCommon
|
|
Width int32 `json:"width"` // Thumbnail width, usually doesn't exceed 40
|
|
Height int32 `json:"height"` // Thumbnail height, usually doesn't exceed 40
|
|
Data []byte `json:"data"` // The thumbnail in JPEG format
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Minithumbnail
|
|
func (minithumbnail *Minithumbnail) MessageType() string {
|
|
return "minithumbnail"
|
|
}
|
|
|
|
// NewMinithumbnail creates a new Minithumbnail
|
|
//
|
|
// @param width Thumbnail width, usually doesn't exceed 40
|
|
// @param height Thumbnail height, usually doesn't exceed 40
|
|
// @param data The thumbnail in JPEG format
|
|
func NewMinithumbnail(width int32, height int32, data []byte) *Minithumbnail {
|
|
minithumbnailTemp := Minithumbnail{
|
|
tdCommon: tdCommon{Type: "minithumbnail"},
|
|
Width: width,
|
|
Height: height,
|
|
Data: data,
|
|
}
|
|
|
|
return &minithumbnailTemp
|
|
}
|
|
|
|
// ThumbnailFormatJpeg The thumbnail is in JPEG format
|
|
type ThumbnailFormatJpeg struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of ThumbnailFormatJpeg
|
|
func (thumbnailFormatJpeg *ThumbnailFormatJpeg) MessageType() string {
|
|
return "thumbnailFormatJpeg"
|
|
}
|
|
|
|
// NewThumbnailFormatJpeg creates a new ThumbnailFormatJpeg
|
|
//
|
|
func NewThumbnailFormatJpeg() *ThumbnailFormatJpeg {
|
|
thumbnailFormatJpegTemp := ThumbnailFormatJpeg{
|
|
tdCommon: tdCommon{Type: "thumbnailFormatJpeg"},
|
|
}
|
|
|
|
return &thumbnailFormatJpegTemp
|
|
}
|
|
|
|
// GetThumbnailFormatEnum return the enum type of this object
|
|
func (thumbnailFormatJpeg *ThumbnailFormatJpeg) GetThumbnailFormatEnum() ThumbnailFormatEnum {
|
|
return ThumbnailFormatJpegType
|
|
}
|
|
|
|
// ThumbnailFormatPng The thumbnail is in PNG format. It will be used only for background patterns
|
|
type ThumbnailFormatPng struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of ThumbnailFormatPng
|
|
func (thumbnailFormatPng *ThumbnailFormatPng) MessageType() string {
|
|
return "thumbnailFormatPng"
|
|
}
|
|
|
|
// NewThumbnailFormatPng creates a new ThumbnailFormatPng
|
|
//
|
|
func NewThumbnailFormatPng() *ThumbnailFormatPng {
|
|
thumbnailFormatPngTemp := ThumbnailFormatPng{
|
|
tdCommon: tdCommon{Type: "thumbnailFormatPng"},
|
|
}
|
|
|
|
return &thumbnailFormatPngTemp
|
|
}
|
|
|
|
// GetThumbnailFormatEnum return the enum type of this object
|
|
func (thumbnailFormatPng *ThumbnailFormatPng) GetThumbnailFormatEnum() ThumbnailFormatEnum {
|
|
return ThumbnailFormatPngType
|
|
}
|
|
|
|
// ThumbnailFormatWebp The thumbnail is in WEBP format. It will be used only for some stickers
|
|
type ThumbnailFormatWebp struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of ThumbnailFormatWebp
|
|
func (thumbnailFormatWebp *ThumbnailFormatWebp) MessageType() string {
|
|
return "thumbnailFormatWebp"
|
|
}
|
|
|
|
// NewThumbnailFormatWebp creates a new ThumbnailFormatWebp
|
|
//
|
|
func NewThumbnailFormatWebp() *ThumbnailFormatWebp {
|
|
thumbnailFormatWebpTemp := ThumbnailFormatWebp{
|
|
tdCommon: tdCommon{Type: "thumbnailFormatWebp"},
|
|
}
|
|
|
|
return &thumbnailFormatWebpTemp
|
|
}
|
|
|
|
// GetThumbnailFormatEnum return the enum type of this object
|
|
func (thumbnailFormatWebp *ThumbnailFormatWebp) GetThumbnailFormatEnum() ThumbnailFormatEnum {
|
|
return ThumbnailFormatWebpType
|
|
}
|
|
|
|
// ThumbnailFormatGif The thumbnail is in static GIF format. It will be used only for some bot inline results
|
|
type ThumbnailFormatGif struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of ThumbnailFormatGif
|
|
func (thumbnailFormatGif *ThumbnailFormatGif) MessageType() string {
|
|
return "thumbnailFormatGif"
|
|
}
|
|
|
|
// NewThumbnailFormatGif creates a new ThumbnailFormatGif
|
|
//
|
|
func NewThumbnailFormatGif() *ThumbnailFormatGif {
|
|
thumbnailFormatGifTemp := ThumbnailFormatGif{
|
|
tdCommon: tdCommon{Type: "thumbnailFormatGif"},
|
|
}
|
|
|
|
return &thumbnailFormatGifTemp
|
|
}
|
|
|
|
// GetThumbnailFormatEnum return the enum type of this object
|
|
func (thumbnailFormatGif *ThumbnailFormatGif) GetThumbnailFormatEnum() ThumbnailFormatEnum {
|
|
return ThumbnailFormatGifType
|
|
}
|
|
|
|
// ThumbnailFormatTgs The thumbnail is in TGS format. It will be used only for animated sticker sets
|
|
type ThumbnailFormatTgs struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of ThumbnailFormatTgs
|
|
func (thumbnailFormatTgs *ThumbnailFormatTgs) MessageType() string {
|
|
return "thumbnailFormatTgs"
|
|
}
|
|
|
|
// NewThumbnailFormatTgs creates a new ThumbnailFormatTgs
|
|
//
|
|
func NewThumbnailFormatTgs() *ThumbnailFormatTgs {
|
|
thumbnailFormatTgsTemp := ThumbnailFormatTgs{
|
|
tdCommon: tdCommon{Type: "thumbnailFormatTgs"},
|
|
}
|
|
|
|
return &thumbnailFormatTgsTemp
|
|
}
|
|
|
|
// GetThumbnailFormatEnum return the enum type of this object
|
|
func (thumbnailFormatTgs *ThumbnailFormatTgs) GetThumbnailFormatEnum() ThumbnailFormatEnum {
|
|
return ThumbnailFormatTgsType
|
|
}
|
|
|
|
// ThumbnailFormatMpeg4 The thumbnail is in MPEG4 format. It will be used only for some animations and videos
|
|
type ThumbnailFormatMpeg4 struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of ThumbnailFormatMpeg4
|
|
func (thumbnailFormatMpeg4 *ThumbnailFormatMpeg4) MessageType() string {
|
|
return "thumbnailFormatMpeg4"
|
|
}
|
|
|
|
// NewThumbnailFormatMpeg4 creates a new ThumbnailFormatMpeg4
|
|
//
|
|
func NewThumbnailFormatMpeg4() *ThumbnailFormatMpeg4 {
|
|
thumbnailFormatMpeg4Temp := ThumbnailFormatMpeg4{
|
|
tdCommon: tdCommon{Type: "thumbnailFormatMpeg4"},
|
|
}
|
|
|
|
return &thumbnailFormatMpeg4Temp
|
|
}
|
|
|
|
// GetThumbnailFormatEnum return the enum type of this object
|
|
func (thumbnailFormatMpeg4 *ThumbnailFormatMpeg4) GetThumbnailFormatEnum() ThumbnailFormatEnum {
|
|
return ThumbnailFormatMpeg4Type
|
|
}
|
|
|
|
// Thumbnail Represents a thumbnail
|
|
type Thumbnail struct {
|
|
tdCommon
|
|
Format ThumbnailFormat `json:"format"` // Thumbnail format
|
|
Width int32 `json:"width"` // Thumbnail width
|
|
Height int32 `json:"height"` // Thumbnail height
|
|
File *File `json:"file"` // The thumbnail
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Thumbnail
|
|
func (thumbnail *Thumbnail) MessageType() string {
|
|
return "thumbnail"
|
|
}
|
|
|
|
// NewThumbnail creates a new Thumbnail
|
|
//
|
|
// @param format Thumbnail format
|
|
// @param width Thumbnail width
|
|
// @param height Thumbnail height
|
|
// @param file The thumbnail
|
|
func NewThumbnail(format ThumbnailFormat, width int32, height int32, file *File) *Thumbnail {
|
|
thumbnailTemp := Thumbnail{
|
|
tdCommon: tdCommon{Type: "thumbnail"},
|
|
Format: format,
|
|
Width: width,
|
|
Height: height,
|
|
File: file,
|
|
}
|
|
|
|
return &thumbnailTemp
|
|
}
|
|
|
|
// UnmarshalJSON unmarshal to json
|
|
func (thumbnail *Thumbnail) UnmarshalJSON(b []byte) error {
|
|
var objMap map[string]*json.RawMessage
|
|
err := json.Unmarshal(b, &objMap)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
tempObj := struct {
|
|
tdCommon
|
|
Width int32 `json:"width"` // Thumbnail width
|
|
Height int32 `json:"height"` // Thumbnail height
|
|
File *File `json:"file"` // The thumbnail
|
|
}{}
|
|
err = json.Unmarshal(b, &tempObj)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
thumbnail.tdCommon = tempObj.tdCommon
|
|
thumbnail.Width = tempObj.Width
|
|
thumbnail.Height = tempObj.Height
|
|
thumbnail.File = tempObj.File
|
|
|
|
fieldFormat, _ := unmarshalThumbnailFormat(objMap["format"])
|
|
thumbnail.Format = fieldFormat
|
|
|
|
return nil
|
|
}
|
|
|
|
// MaskPointForehead A mask should be placed relatively to the forehead
|
|
type MaskPointForehead struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of MaskPointForehead
|
|
func (maskPointForehead *MaskPointForehead) MessageType() string {
|
|
return "maskPointForehead"
|
|
}
|
|
|
|
// NewMaskPointForehead creates a new MaskPointForehead
|
|
//
|
|
func NewMaskPointForehead() *MaskPointForehead {
|
|
maskPointForeheadTemp := MaskPointForehead{
|
|
tdCommon: tdCommon{Type: "maskPointForehead"},
|
|
}
|
|
|
|
return &maskPointForeheadTemp
|
|
}
|
|
|
|
// GetMaskPointEnum return the enum type of this object
|
|
func (maskPointForehead *MaskPointForehead) GetMaskPointEnum() MaskPointEnum {
|
|
return MaskPointForeheadType
|
|
}
|
|
|
|
// MaskPointEyes A mask should be placed relatively to the eyes
|
|
type MaskPointEyes struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of MaskPointEyes
|
|
func (maskPointEyes *MaskPointEyes) MessageType() string {
|
|
return "maskPointEyes"
|
|
}
|
|
|
|
// NewMaskPointEyes creates a new MaskPointEyes
|
|
//
|
|
func NewMaskPointEyes() *MaskPointEyes {
|
|
maskPointEyesTemp := MaskPointEyes{
|
|
tdCommon: tdCommon{Type: "maskPointEyes"},
|
|
}
|
|
|
|
return &maskPointEyesTemp
|
|
}
|
|
|
|
// GetMaskPointEnum return the enum type of this object
|
|
func (maskPointEyes *MaskPointEyes) GetMaskPointEnum() MaskPointEnum {
|
|
return MaskPointEyesType
|
|
}
|
|
|
|
// MaskPointMouth A mask should be placed relatively to the mouth
|
|
type MaskPointMouth struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of MaskPointMouth
|
|
func (maskPointMouth *MaskPointMouth) MessageType() string {
|
|
return "maskPointMouth"
|
|
}
|
|
|
|
// NewMaskPointMouth creates a new MaskPointMouth
|
|
//
|
|
func NewMaskPointMouth() *MaskPointMouth {
|
|
maskPointMouthTemp := MaskPointMouth{
|
|
tdCommon: tdCommon{Type: "maskPointMouth"},
|
|
}
|
|
|
|
return &maskPointMouthTemp
|
|
}
|
|
|
|
// GetMaskPointEnum return the enum type of this object
|
|
func (maskPointMouth *MaskPointMouth) GetMaskPointEnum() MaskPointEnum {
|
|
return MaskPointMouthType
|
|
}
|
|
|
|
// MaskPointChin A mask should be placed relatively to the chin
|
|
type MaskPointChin struct {
|
|
tdCommon
|
|
}
|
|
|
|
// MessageType return the string telegram-type of MaskPointChin
|
|
func (maskPointChin *MaskPointChin) MessageType() string {
|
|
return "maskPointChin"
|
|
}
|
|
|
|
// NewMaskPointChin creates a new MaskPointChin
|
|
//
|
|
func NewMaskPointChin() *MaskPointChin {
|
|
maskPointChinTemp := MaskPointChin{
|
|
tdCommon: tdCommon{Type: "maskPointChin"},
|
|
}
|
|
|
|
return &maskPointChinTemp
|
|
}
|
|
|
|
// GetMaskPointEnum return the enum type of this object
|
|
func (maskPointChin *MaskPointChin) GetMaskPointEnum() MaskPointEnum {
|
|
return MaskPointChinType
|
|
}
|
|
|
|
// MaskPosition Position on a photo where a mask should be placed
|
|
type MaskPosition struct {
|
|
tdCommon
|
|
Point MaskPoint `json:"point"` // Part of the face, relative to which the mask should be placed
|
|
XShift float64 `json:"x_shift"` // Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)
|
|
YShift float64 `json:"y_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)
|
|
Scale float64 `json:"scale"` // Mask scaling coefficient. (For example, 2.0 means a doubled size)
|
|
}
|
|
|
|
// MessageType return the string telegram-type of MaskPosition
|
|
func (maskPosition *MaskPosition) MessageType() string {
|
|
return "maskPosition"
|
|
}
|
|
|
|
// NewMaskPosition creates a new MaskPosition
|
|
//
|
|
// @param point Part of the face, relative to which the mask should be placed
|
|
// @param xShift Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)
|
|
// @param yShift 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)
|
|
// @param scale Mask scaling coefficient. (For example, 2.0 means a doubled size)
|
|
func NewMaskPosition(point MaskPoint, xShift float64, yShift float64, scale float64) *MaskPosition {
|
|
maskPositionTemp := MaskPosition{
|
|
tdCommon: tdCommon{Type: "maskPosition"},
|
|
Point: point,
|
|
XShift: xShift,
|
|
YShift: yShift,
|
|
Scale: scale,
|
|
}
|
|
|
|
return &maskPositionTemp
|
|
}
|
|
|
|
// UnmarshalJSON unmarshal to json
|
|
func (maskPosition *MaskPosition) UnmarshalJSON(b []byte) error {
|
|
var objMap map[string]*json.RawMessage
|
|
err := json.Unmarshal(b, &objMap)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
tempObj := struct {
|
|
tdCommon
|
|
XShift float64 `json:"x_shift"` // Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)
|
|
YShift float64 `json:"y_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)
|
|
Scale float64 `json:"scale"` // Mask scaling coefficient. (For example, 2.0 means a doubled size)
|
|
}{}
|
|
err = json.Unmarshal(b, &tempObj)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
maskPosition.tdCommon = tempObj.tdCommon
|
|
maskPosition.XShift = tempObj.XShift
|
|
maskPosition.YShift = tempObj.YShift
|
|
maskPosition.Scale = tempObj.Scale
|
|
|
|
fieldPoint, _ := unmarshalMaskPoint(objMap["point"])
|
|
maskPosition.Point = fieldPoint
|
|
|
|
return nil
|
|
}
|
|
|
|
// ClosedVectorPath Represents a closed vector path. The path begins at the end point of the last command
|
|
type ClosedVectorPath struct {
|
|
tdCommon
|
|
Commands []VectorPathCommand `json:"commands"` // List of vector path commands
|
|
}
|
|
|
|
// MessageType return the string telegram-type of ClosedVectorPath
|
|
func (closedVectorPath *ClosedVectorPath) MessageType() string {
|
|
return "closedVectorPath"
|
|
}
|
|
|
|
// NewClosedVectorPath creates a new ClosedVectorPath
|
|
//
|
|
// @param commands List of vector path commands
|
|
func NewClosedVectorPath(commands []VectorPathCommand) *ClosedVectorPath {
|
|
closedVectorPathTemp := ClosedVectorPath{
|
|
tdCommon: tdCommon{Type: "closedVectorPath"},
|
|
Commands: commands,
|
|
}
|
|
|
|
return &closedVectorPathTemp
|
|
}
|
|
|
|
// PollOption Describes one answer option of a poll
|
|
type PollOption struct {
|
|
tdCommon
|
|
Text string `json:"text"` // Option text; 1-100 characters
|
|
VoterCount int32 `json:"voter_count"` // Number of voters for this option, available only for closed or voted polls
|
|
VotePercentage int32 `json:"vote_percentage"` // The percentage of votes for this option; 0-100
|
|
IsChosen bool `json:"is_chosen"` // True, if the option was chosen by the user
|
|
IsBeingChosen bool `json:"is_being_chosen"` // True, if the option is being chosen by a pending setPollAnswer request
|
|
}
|
|
|
|
// MessageType return the string telegram-type of PollOption
|
|
func (pollOption *PollOption) MessageType() string {
|
|
return "pollOption"
|
|
}
|
|
|
|
// NewPollOption creates a new PollOption
|
|
//
|
|
// @param text Option text; 1-100 characters
|
|
// @param voterCount Number of voters for this option, available only for closed or voted polls
|
|
// @param votePercentage The percentage of votes for this option; 0-100
|
|
// @param isChosen True, if the option was chosen by the user
|
|
// @param isBeingChosen True, if the option is being chosen by a pending setPollAnswer request
|
|
func NewPollOption(text string, voterCount int32, votePercentage int32, isChosen bool, isBeingChosen bool) *PollOption {
|
|
pollOptionTemp := PollOption{
|
|
tdCommon: tdCommon{Type: "pollOption"},
|
|
Text: text,
|
|
VoterCount: voterCount,
|
|
VotePercentage: votePercentage,
|
|
IsChosen: isChosen,
|
|
IsBeingChosen: isBeingChosen,
|
|
}
|
|
|
|
return &pollOptionTemp
|
|
}
|
|
|
|
// PollTypeRegular A regular poll
|
|
type PollTypeRegular struct {
|
|
tdCommon
|
|
AllowMultipleAnswers bool `json:"allow_multiple_answers"` // True, if multiple answer options can be chosen simultaneously
|
|
}
|
|
|
|
// MessageType return the string telegram-type of PollTypeRegular
|
|
func (pollTypeRegular *PollTypeRegular) MessageType() string {
|
|
return "pollTypeRegular"
|
|
}
|
|
|
|
// NewPollTypeRegular creates a new PollTypeRegular
|
|
//
|
|
// @param allowMultipleAnswers True, if multiple answer options can be chosen simultaneously
|
|
func NewPollTypeRegular(allowMultipleAnswers bool) *PollTypeRegular {
|
|
pollTypeRegularTemp := PollTypeRegular{
|
|
tdCommon: tdCommon{Type: "pollTypeRegular"},
|
|
AllowMultipleAnswers: allowMultipleAnswers,
|
|
}
|
|
|
|
return &pollTypeRegularTemp
|
|
}
|
|
|
|
// GetPollTypeEnum return the enum type of this object
|
|
func (pollTypeRegular *PollTypeRegular) GetPollTypeEnum() PollTypeEnum {
|
|
return PollTypeRegularType
|
|
}
|
|
|
|
// PollTypeQuiz A poll in quiz mode, which has exactly one correct answer option and can be answered only once
|
|
type PollTypeQuiz struct {
|
|
tdCommon
|
|
CorrectOptionID int32 `json:"correct_option_id"` // 0-based identifier of the correct answer option; -1 for a yet unanswered poll
|
|
Explanation *FormattedText `json:"explanation"` // Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll
|
|
}
|
|
|
|
// MessageType return the string telegram-type of PollTypeQuiz
|
|
func (pollTypeQuiz *PollTypeQuiz) MessageType() string {
|
|
return "pollTypeQuiz"
|
|
}
|
|
|
|
// NewPollTypeQuiz creates a new PollTypeQuiz
|
|
//
|
|
// @param correctOptionID 0-based identifier of the correct answer option; -1 for a yet unanswered poll
|
|
// @param explanation Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll
|
|
func NewPollTypeQuiz(correctOptionID int32, explanation *FormattedText) *PollTypeQuiz {
|
|
pollTypeQuizTemp := PollTypeQuiz{
|
|
tdCommon: tdCommon{Type: "pollTypeQuiz"},
|
|
CorrectOptionID: correctOptionID,
|
|
Explanation: explanation,
|
|
}
|
|
|
|
return &pollTypeQuizTemp
|
|
}
|
|
|
|
// GetPollTypeEnum return the enum type of this object
|
|
func (pollTypeQuiz *PollTypeQuiz) GetPollTypeEnum() PollTypeEnum {
|
|
return PollTypeQuizType
|
|
}
|
|
|
|
// Animation Describes an animation file. The animation must be encoded in GIF or MPEG4 format
|
|
type Animation struct {
|
|
tdCommon
|
|
Duration int32 `json:"duration"` // Duration of the animation, in seconds; as defined by the sender
|
|
Width int32 `json:"width"` // Width of the animation
|
|
Height int32 `json:"height"` // Height of the animation
|
|
FileName string `json:"file_name"` // Original name of the file; as defined by the sender
|
|
MimeType string `json:"mime_type"` // MIME type of the file, usually "image/gif" or "video/mp4"
|
|
HasStickers bool `json:"has_stickers"` // True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets
|
|
Minithumbnail *Minithumbnail `json:"minithumbnail"` // Animation minithumbnail; may be null
|
|
Thumbnail *Thumbnail `json:"thumbnail"` // Animation thumbnail in JPEG or MPEG4 format; may be null
|
|
Animation *File `json:"animation"` // File containing the animation
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Animation
|
|
func (animation *Animation) MessageType() string {
|
|
return "animation"
|
|
}
|
|
|
|
// NewAnimation creates a new Animation
|
|
//
|
|
// @param duration Duration of the animation, in seconds; as defined by the sender
|
|
// @param width Width of the animation
|
|
// @param height Height of the animation
|
|
// @param fileName Original name of the file; as defined by the sender
|
|
// @param mimeType MIME type of the file, usually "image/gif" or "video/mp4"
|
|
// @param hasStickers True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets
|
|
// @param minithumbnail Animation minithumbnail; may be null
|
|
// @param thumbnail Animation thumbnail in JPEG or MPEG4 format; may be null
|
|
// @param animation File containing the animation
|
|
func NewAnimation(duration int32, width int32, height int32, fileName string, mimeType string, hasStickers bool, minithumbnail *Minithumbnail, thumbnail *Thumbnail, animation *File) *Animation {
|
|
animationTemp := Animation{
|
|
tdCommon: tdCommon{Type: "animation"},
|
|
Duration: duration,
|
|
Width: width,
|
|
Height: height,
|
|
FileName: fileName,
|
|
MimeType: mimeType,
|
|
HasStickers: hasStickers,
|
|
Minithumbnail: minithumbnail,
|
|
Thumbnail: thumbnail,
|
|
Animation: animation,
|
|
}
|
|
|
|
return &animationTemp
|
|
}
|
|
|
|
// Audio Describes an audio file. Audio is usually in MP3 or M4A format
|
|
type Audio struct {
|
|
tdCommon
|
|
Duration int32 `json:"duration"` // Duration of the audio, in seconds; as defined by the sender
|
|
Title string `json:"title"` // Title of the audio; as defined by the sender
|
|
Performer string `json:"performer"` // Performer of the audio; as defined by the sender
|
|
FileName string `json:"file_name"` // Original name of the file; as defined by the sender
|
|
MimeType string `json:"mime_type"` // The MIME type of the file; as defined by the sender
|
|
AlbumCoverMinithumbnail *Minithumbnail `json:"album_cover_minithumbnail"` // The minithumbnail of the album cover; may be null
|
|
AlbumCoverThumbnail *Thumbnail `json:"album_cover_thumbnail"` // The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null
|
|
Audio *File `json:"audio"` // File containing the audio
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Audio
|
|
func (audio *Audio) MessageType() string {
|
|
return "audio"
|
|
}
|
|
|
|
// NewAudio creates a new Audio
|
|
//
|
|
// @param duration Duration of the audio, in seconds; as defined by the sender
|
|
// @param title Title of the audio; as defined by the sender
|
|
// @param performer Performer of the audio; as defined by the sender
|
|
// @param fileName Original name of the file; as defined by the sender
|
|
// @param mimeType The MIME type of the file; as defined by the sender
|
|
// @param albumCoverMinithumbnail The minithumbnail of the album cover; may be null
|
|
// @param albumCoverThumbnail The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail should be extracted from the downloaded file; may be null
|
|
// @param audio File containing the audio
|
|
func NewAudio(duration int32, title string, performer string, fileName string, mimeType string, albumCoverMinithumbnail *Minithumbnail, albumCoverThumbnail *Thumbnail, audio *File) *Audio {
|
|
audioTemp := Audio{
|
|
tdCommon: tdCommon{Type: "audio"},
|
|
Duration: duration,
|
|
Title: title,
|
|
Performer: performer,
|
|
FileName: fileName,
|
|
MimeType: mimeType,
|
|
AlbumCoverMinithumbnail: albumCoverMinithumbnail,
|
|
AlbumCoverThumbnail: albumCoverThumbnail,
|
|
Audio: audio,
|
|
}
|
|
|
|
return &audioTemp
|
|
}
|
|
|
|
// Document Describes a document of any type
|
|
type Document struct {
|
|
tdCommon
|
|
FileName string `json:"file_name"` // Original name of the file; as defined by the sender
|
|
MimeType string `json:"mime_type"` // MIME type of the file; as defined by the sender
|
|
Minithumbnail *Minithumbnail `json:"minithumbnail"` // Document minithumbnail; may be null
|
|
Thumbnail *Thumbnail `json:"thumbnail"` // Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null
|
|
Document *File `json:"document"` // File containing the document
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Document
|
|
func (document *Document) MessageType() string {
|
|
return "document"
|
|
}
|
|
|
|
// NewDocument creates a new Document
|
|
//
|
|
// @param fileName Original name of the file; as defined by the sender
|
|
// @param mimeType MIME type of the file; as defined by the sender
|
|
// @param minithumbnail Document minithumbnail; may be null
|
|
// @param thumbnail Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null
|
|
// @param document File containing the document
|
|
func NewDocument(fileName string, mimeType string, minithumbnail *Minithumbnail, thumbnail *Thumbnail, document *File) *Document {
|
|
documentTemp := Document{
|
|
tdCommon: tdCommon{Type: "document"},
|
|
FileName: fileName,
|
|
MimeType: mimeType,
|
|
Minithumbnail: minithumbnail,
|
|
Thumbnail: thumbnail,
|
|
Document: document,
|
|
}
|
|
|
|
return &documentTemp
|
|
}
|
|
|
|
// Photo Describes a photo
|
|
type Photo struct {
|
|
tdCommon
|
|
HasStickers bool `json:"has_stickers"` // True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets
|
|
Minithumbnail *Minithumbnail `json:"minithumbnail"` // Photo minithumbnail; may be null
|
|
Sizes []PhotoSize `json:"sizes"` // Available variants of the photo, in different sizes
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Photo
|
|
func (photo *Photo) MessageType() string {
|
|
return "photo"
|
|
}
|
|
|
|
// NewPhoto creates a new Photo
|
|
//
|
|
// @param hasStickers True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets
|
|
// @param minithumbnail Photo minithumbnail; may be null
|
|
// @param sizes Available variants of the photo, in different sizes
|
|
func NewPhoto(hasStickers bool, minithumbnail *Minithumbnail, sizes []PhotoSize) *Photo {
|
|
photoTemp := Photo{
|
|
tdCommon: tdCommon{Type: "photo"},
|
|
HasStickers: hasStickers,
|
|
Minithumbnail: minithumbnail,
|
|
Sizes: sizes,
|
|
}
|
|
|
|
return &photoTemp
|
|
}
|
|
|
|
// Sticker Describes a sticker
|
|
type Sticker struct {
|
|
tdCommon
|
|
SetID JSONInt64 `json:"set_id"` // The identifier of the sticker set to which the sticker belongs; 0 if none
|
|
Width int32 `json:"width"` // Sticker width; as defined by the sender
|
|
Height int32 `json:"height"` // Sticker height; as defined by the sender
|
|
Emoji string `json:"emoji"` // Emoji corresponding to the sticker
|
|
IsAnimated bool `json:"is_animated"` // True, if the sticker is an animated sticker in TGS format
|
|
IsMask bool `json:"is_mask"` // True, if the sticker is a mask
|
|
MaskPosition *MaskPosition `json:"mask_position"` // Position where the mask should be placed; may be null
|
|
Outline []ClosedVectorPath `json:"outline"` // Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
|
|
Thumbnail *Thumbnail `json:"thumbnail"` // Sticker thumbnail in WEBP or JPEG format; may be null
|
|
Sticker *File `json:"sticker"` // File containing the sticker
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Sticker
|
|
func (sticker *Sticker) MessageType() string {
|
|
return "sticker"
|
|
}
|
|
|
|
// NewSticker creates a new Sticker
|
|
//
|
|
// @param setID The identifier of the sticker set to which the sticker belongs; 0 if none
|
|
// @param width Sticker width; as defined by the sender
|
|
// @param height Sticker height; as defined by the sender
|
|
// @param emoji Emoji corresponding to the sticker
|
|
// @param isAnimated True, if the sticker is an animated sticker in TGS format
|
|
// @param isMask True, if the sticker is a mask
|
|
// @param maskPosition Position where the mask should be placed; may be null
|
|
// @param outline Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
|
|
// @param thumbnail Sticker thumbnail in WEBP or JPEG format; may be null
|
|
// @param sticker File containing the sticker
|
|
func NewSticker(setID JSONInt64, width int32, height int32, emoji string, isAnimated bool, isMask bool, maskPosition *MaskPosition, outline []ClosedVectorPath, thumbnail *Thumbnail, sticker *File) *Sticker {
|
|
stickerTemp := Sticker{
|
|
tdCommon: tdCommon{Type: "sticker"},
|
|
SetID: setID,
|
|
Width: width,
|
|
Height: height,
|
|
Emoji: emoji,
|
|
IsAnimated: isAnimated,
|
|
IsMask: isMask,
|
|
MaskPosition: maskPosition,
|
|
Outline: outline,
|
|
Thumbnail: thumbnail,
|
|
Sticker: sticker,
|
|
}
|
|
|
|
return &stickerTemp
|
|
}
|
|
|
|
// Video Describes a video file
|
|
type Video struct {
|
|
tdCommon
|
|
Duration int32 `json:"duration"` // Duration of the video, in seconds; as defined by the sender
|
|
Width int32 `json:"width"` // Video width; as defined by the sender
|
|
Height int32 `json:"height"` // Video height; as defined by the sender
|
|
FileName string `json:"file_name"` // Original name of the file; as defined by the sender
|
|
MimeType string `json:"mime_type"` // MIME type of the file; as defined by the sender
|
|
HasStickers bool `json:"has_stickers"` // True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets
|
|
SupportsStreaming bool `json:"supports_streaming"` // True, if the video should be tried to be streamed
|
|
Minithumbnail *Minithumbnail `json:"minithumbnail"` // Video minithumbnail; may be null
|
|
Thumbnail *Thumbnail `json:"thumbnail"` // Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null
|
|
Video *File `json:"video"` // File containing the video
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Video
|
|
func (video *Video) MessageType() string {
|
|
return "video"
|
|
}
|
|
|
|
// NewVideo creates a new Video
|
|
//
|
|
// @param duration Duration of the video, in seconds; as defined by the sender
|
|
// @param width Video width; as defined by the sender
|
|
// @param height Video height; as defined by the sender
|
|
// @param fileName Original name of the file; as defined by the sender
|
|
// @param mimeType MIME type of the file; as defined by the sender
|
|
// @param hasStickers True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets
|
|
// @param supportsStreaming True, if the video should be tried to be streamed
|
|
// @param minithumbnail Video minithumbnail; may be null
|
|
// @param thumbnail Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null
|
|
// @param video File containing the video
|
|
func NewVideo(duration int32, width int32, height int32, fileName string, mimeType string, hasStickers bool, supportsStreaming bool, minithumbnail *Minithumbnail, thumbnail *Thumbnail, video *File) *Video {
|
|
videoTemp := Video{
|
|
tdCommon: tdCommon{Type: "video"},
|
|
Duration: duration,
|
|
Width: width,
|
|
Height: height,
|
|
FileName: fileName,
|
|
MimeType: mimeType,
|
|
HasStickers: hasStickers,
|
|
SupportsStreaming: supportsStreaming,
|
|
Minithumbnail: minithumbnail,
|
|
Thumbnail: thumbnail,
|
|
Video: video,
|
|
}
|
|
|
|
return &videoTemp
|
|
}
|
|
|
|
// VideoNote Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format
|
|
type VideoNote struct {
|
|
tdCommon
|
|
Duration int32 `json:"duration"` // Duration of the video, in seconds; as defined by the sender
|
|
Length int32 `json:"length"` // Video width and height; as defined by the sender
|
|
Minithumbnail *Minithumbnail `json:"minithumbnail"` // Video minithumbnail; may be null
|
|
Thumbnail *Thumbnail `json:"thumbnail"` // Video thumbnail in JPEG format; as defined by the sender; may be null
|
|
Video *File `json:"video"` // File containing the video
|
|
}
|
|
|
|
// MessageType return the string telegram-type of VideoNote
|
|
func (videoNote *VideoNote) MessageType() string {
|
|
return "videoNote"
|
|
}
|
|
|
|
// NewVideoNote creates a new VideoNote
|
|
//
|
|
// @param duration Duration of the video, in seconds; as defined by the sender
|
|
// @param length Video width and height; as defined by the sender
|
|
// @param minithumbnail Video minithumbnail; may be null
|
|
// @param thumbnail Video thumbnail in JPEG format; as defined by the sender; may be null
|
|
// @param video File containing the video
|
|
func NewVideoNote(duration int32, length int32, minithumbnail *Minithumbnail, thumbnail *Thumbnail, video *File) *VideoNote {
|
|
videoNoteTemp := VideoNote{
|
|
tdCommon: tdCommon{Type: "videoNote"},
|
|
Duration: duration,
|
|
Length: length,
|
|
Minithumbnail: minithumbnail,
|
|
Thumbnail: thumbnail,
|
|
Video: video,
|
|
}
|
|
|
|
return &videoNoteTemp
|
|
}
|
|
|
|
// VoiceNote Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel
|
|
type VoiceNote struct {
|
|
tdCommon
|
|
Duration int32 `json:"duration"` // Duration of the voice note, in seconds; as defined by the sender
|
|
Waveform []byte `json:"waveform"` // A waveform representation of the voice note in 5-bit format
|
|
MimeType string `json:"mime_type"` // MIME type of the file; as defined by the sender
|
|
Voice *File `json:"voice"` // File containing the voice note
|
|
}
|
|
|
|
// MessageType return the string telegram-type of VoiceNote
|
|
func (voiceNote *VoiceNote) MessageType() string {
|
|
return "voiceNote"
|
|
}
|
|
|
|
// NewVoiceNote creates a new VoiceNote
|
|
//
|
|
// @param duration Duration of the voice note, in seconds; as defined by the sender
|
|
// @param waveform A waveform representation of the voice note in 5-bit format
|
|
// @param mimeType MIME type of the file; as defined by the sender
|
|
// @param voice File containing the voice note
|
|
func NewVoiceNote(duration int32, waveform []byte, mimeType string, voice *File) *VoiceNote {
|
|
voiceNoteTemp := VoiceNote{
|
|
tdCommon: tdCommon{Type: "voiceNote"},
|
|
Duration: duration,
|
|
Waveform: waveform,
|
|
MimeType: mimeType,
|
|
Voice: voice,
|
|
}
|
|
|
|
return &voiceNoteTemp
|
|
}
|
|
|
|
// Contact Describes a user contact
|
|
type Contact struct {
|
|
tdCommon
|
|
PhoneNumber string `json:"phone_number"` // Phone number of the user
|
|
FirstName string `json:"first_name"` // First name of the user; 1-255 characters in length
|
|
LastName string `json:"last_name"` // Last name of the user
|
|
Vcard string `json:"vcard"` // Additional data about the user in a form of vCard; 0-2048 bytes in length
|
|
UserID int32 `json:"user_id"` // Identifier of the user, if known; otherwise 0
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Contact
|
|
func (contact *Contact) MessageType() string {
|
|
return "contact"
|
|
}
|
|
|
|
// NewContact creates a new Contact
|
|
//
|
|
// @param phoneNumber Phone number of the user
|
|
// @param firstName First name of the user; 1-255 characters in length
|
|
// @param lastName Last name of the user
|
|
// @param vcard Additional data about the user in a form of vCard; 0-2048 bytes in length
|
|
// @param userID Identifier of the user, if known; otherwise 0
|
|
func NewContact(phoneNumber string, firstName string, lastName string, vcard string, userID int32) *Contact {
|
|
contactTemp := Contact{
|
|
tdCommon: tdCommon{Type: "contact"},
|
|
PhoneNumber: phoneNumber,
|
|
FirstName: firstName,
|
|
LastName: lastName,
|
|
Vcard: vcard,
|
|
UserID: userID,
|
|
}
|
|
|
|
return &contactTemp
|
|
}
|
|
|
|
// Location Describes a location on planet Earth
|
|
type Location struct {
|
|
tdCommon
|
|
Latitude float64 `json:"latitude"` // Latitude of the location in degrees; as defined by the sender
|
|
Longitude float64 `json:"longitude"` // Longitude of the location, in degrees; as defined by the sender
|
|
HorizontalAccuracy float64 `json:"horizontal_accuracy"` // The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Location
|
|
func (location *Location) MessageType() string {
|
|
return "location"
|
|
}
|
|
|
|
// NewLocation creates a new Location
|
|
//
|
|
// @param latitude Latitude of the location in degrees; as defined by the sender
|
|
// @param longitude Longitude of the location, in degrees; as defined by the sender
|
|
// @param horizontalAccuracy The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown
|
|
func NewLocation(latitude float64, longitude float64, horizontalAccuracy float64) *Location {
|
|
locationTemp := Location{
|
|
tdCommon: tdCommon{Type: "location"},
|
|
Latitude: latitude,
|
|
Longitude: longitude,
|
|
HorizontalAccuracy: horizontalAccuracy,
|
|
}
|
|
|
|
return &locationTemp
|
|
}
|
|
|
|
// Venue Describes a venue
|
|
type Venue struct {
|
|
tdCommon
|
|
Location *Location `json:"location"` // Venue location; as defined by the sender
|
|
Title string `json:"title"` // Venue name; as defined by the sender
|
|
Address string `json:"address"` // Venue address; as defined by the sender
|
|
Provider string `json:"provider"` // Provider of the venue database; as defined by the sender. Currently only "foursquare" and "gplaces" (Google Places) need to be supported
|
|
ID string `json:"id"` // Identifier of the venue in the provider database; as defined by the sender
|
|
Type string `json:"type"` // Type of the venue in the provider database; as defined by the sender
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Venue
|
|
func (venue *Venue) MessageType() string {
|
|
return "venue"
|
|
}
|
|
|
|
// NewVenue creates a new Venue
|
|
//
|
|
// @param location Venue location; as defined by the sender
|
|
// @param title Venue name; as defined by the sender
|
|
// @param address Venue address; as defined by the sender
|
|
// @param provider Provider of the venue database; as defined by the sender. Currently only "foursquare" and "gplaces" (Google Places) need to be supported
|
|
// @param iD Identifier of the venue in the provider database; as defined by the sender
|
|
// @param typeParam Type of the venue in the provider database; as defined by the sender
|
|
func NewVenue(location *Location, title string, address string, provider string, iD string, typeParam string) *Venue {
|
|
venueTemp := Venue{
|
|
tdCommon: tdCommon{Type: "venue"},
|
|
Location: location,
|
|
Title: title,
|
|
Address: address,
|
|
Provider: provider,
|
|
ID: iD,
|
|
Type: typeParam,
|
|
}
|
|
|
|
return &venueTemp
|
|
}
|
|
|
|
// Game Describes a game
|
|
type Game struct {
|
|
tdCommon
|
|
ID JSONInt64 `json:"id"` // Game ID
|
|
ShortName string `json:"short_name"` // Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name}
|
|
Title string `json:"title"` // Game title
|
|
Text *FormattedText `json:"text"` // Game text, usually containing scoreboards for a game
|
|
Description string `json:"description"` //
|
|
Photo *Photo `json:"photo"` // Game photo
|
|
Animation *Animation `json:"animation"` // Game animation; may be null
|
|
}
|
|
|
|
// MessageType return the string telegram-type of Game
|
|
func (game *Game) MessageType() string {
|
|
return "game"
|
|
}
|
|
|
|
// NewGame creates a new Game
|
|
//
|
|
// @param iD Game ID
|
|
// @param shortName Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name}
|
|
// @param title Game title
|
|
// @param text Game text, usually containing scoreboards for a game
|
|
// @param description
|
|
// @param photo Game photo
|
|
// @param animation Game animation; may be null
|
|
func NewGame(iD JSONInt64, shortName string, title string, text *FormattedText, description string, photo *Photo, animation *Animation) *Game {
|
|
gameTemp := Game{
|
|
tdCommon: tdCommon{Type: "game"},
|
|
ID: iD,
|
|
ShortName: shortName,
|
|
Title: title,
|
|
Text: text,
|
|
Description: description,
|
|
Photo: photo,
|
|
Animation: animation,
|
|
}
|
|
|
|
return &gameTemp
|
|
}
|
|
|
|
// Poll Describes a poll
|
|
type Poll struct {
|
|
tdCommon
|
|
ID JSONInt64 `json:"id"` // Unique poll identifier
|
|
Question string `json:"question"` // Poll question; 1-300 characters
|
|