Update to TDLib 1.8.11

This commit is contained in:
c0re100 2023-02-05 06:54:46 +08:00
parent 7df275842c
commit 869b97df28
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 2270 additions and 160 deletions

View file

@ -71,7 +71,7 @@ type SetTdlibParametersRequest struct {
DatabaseDirectory string `json:"database_directory"`
// The path to the directory for storing files; if empty, database_directory will be used
FilesDirectory string `json:"files_directory"`
// Encryption key for the database
// Encryption key for the database. If the encryption key is invalid, then an error with code 401 will be returned
DatabaseEncryptionKey []byte `json:"database_encryption_key"`
// Pass true to keep information about downloaded and uploaded files between application restarts
UseFileDatabase bool `json:"use_file_database"`
@ -142,7 +142,7 @@ type SetAuthenticationPhoneNumberRequest struct {
Settings *PhoneNumberAuthenticationSettings `json:"settings"`
}
// Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
// Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
func (client *Client) SetAuthenticationPhoneNumber(req *SetAuthenticationPhoneNumberRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -266,7 +266,7 @@ type RequestQrCodeAuthenticationRequest struct {
OtherUserIds []int64 `json:"other_user_ids"`
}
// Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
// Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitEmailAddress, authorizationStateWaitEmailCode, authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
func (client *Client) RequestQrCodeAuthentication(req *RequestQrCodeAuthenticationRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -419,6 +419,32 @@ func (client *Client) RecoverAuthenticationPassword(req *RecoverAuthenticationPa
return UnmarshalOk(result.Data)
}
type SendAuthenticationFirebaseSmsRequest struct {
// SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
Token string `json:"token"`
}
// Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos
func (client *Client) SendAuthenticationFirebaseSms(req *SendAuthenticationFirebaseSmsRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "sendAuthenticationFirebaseSms",
},
Data: map[string]interface{}{
"token": req.Token,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type CheckAuthenticationBotTokenRequest struct {
// The bot token
Token string `json:"token"`
@ -1268,7 +1294,7 @@ type GetRepliedMessageRequest struct {
MessageId int64 `json:"message_id"`
}
// Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, the invoice message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, and topic messages without replied message respectively
// Returns information about a message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, and the topic creation message for messages of the types messagePinMessage, messageGameScore, messagePaymentSuccessful, and topic messages without replied message respectively
func (client *Client) GetRepliedMessage(req *GetRepliedMessageRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
@ -1553,7 +1579,7 @@ type SearchPublicChatRequest struct {
Username string `json:"username"`
}
// Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned
// Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise, an error is returned
func (client *Client) SearchPublicChat(req *SearchPublicChatRequest) (*Chat, error) {
result, err := client.Send(Request{
meta: meta{
@ -2815,22 +2841,19 @@ func (client *Client) GetMessageLinkInfo(req *GetMessageLinkInfoRequest) (*Messa
type TranslateTextRequest struct {
// Text to translate
Text string `json:"text"`
// A two-letter ISO 639-1 language code of the language from which the message is translated. If empty, the language will be detected automatically
FromLanguageCode string `json:"from_language_code"`
// A two-letter ISO 639-1 language code of the language to which the message is translated
Text *FormattedText `json:"text"`
// ISO language code of the language to which the message is translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
ToLanguageCode string `json:"to_language_code"`
}
// Translates a text to the given language. Returns a 404 error if the translation can't be performed
func (client *Client) TranslateText(req *TranslateTextRequest) (*Text, error) {
// Translates a text to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
func (client *Client) TranslateText(req *TranslateTextRequest) (*FormattedText, error) {
result, err := client.Send(Request{
meta: meta{
Type: "translateText",
},
Data: map[string]interface{}{
"text": req.Text,
"from_language_code": req.FromLanguageCode,
"to_language_code": req.ToLanguageCode,
},
})
@ -2842,7 +2865,39 @@ func (client *Client) TranslateText(req *TranslateTextRequest) (*Text, error) {
return nil, buildResponseError(result.Data)
}
return UnmarshalText(result.Data)
return UnmarshalFormattedText(result.Data)
}
type TranslateMessageTextRequest struct {
// Identifier of the chat to which the message belongs
ChatId int64 `json:"chat_id"`
// Identifier of the message
MessageId int64 `json:"message_id"`
// ISO language code of the language to which the message is translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be", "bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW", "zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr", "fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi", "hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk", "km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps", "fa", "pl", "pt", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh", "yi", "ji", "yo", "zu"
ToLanguageCode string `json:"to_language_code"`
}
// Extracts text or caption of the given message and translates it to the given language. If the current user is a Telegram Premium user, then text formatting is preserved
func (client *Client) TranslateMessageText(req *TranslateMessageTextRequest) (*FormattedText, error) {
result, err := client.Send(Request{
meta: meta{
Type: "translateMessageText",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"to_language_code": req.ToLanguageCode,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalFormattedText(result.Data)
}
type RecognizeSpeechRequest struct {
@ -4919,6 +4974,82 @@ func (client *Client) GetLoginUrl(req *GetLoginUrlRequest) (*HttpUrl, error) {
return UnmarshalHttpUrl(result.Data)
}
type ShareUserWithBotRequest struct {
// Identifier of the chat with the bot
ChatId int64 `json:"chat_id"`
// Identifier of the message with the button
MessageId int64 `json:"message_id"`
// Identifier of the button
ButtonId int32 `json:"button_id"`
// Identifier of the shared user
SharedUserId int64 `json:"shared_user_id"`
// Pass true to check that the user can be shared by the button instead of actually sharing them
OnlyCheck bool `json:"only_check"`
}
// Shares a user after pressing a keyboardButtonTypeRequestUser button with the bot
func (client *Client) ShareUserWithBot(req *ShareUserWithBotRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "shareUserWithBot",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"button_id": req.ButtonId,
"shared_user_id": req.SharedUserId,
"only_check": req.OnlyCheck,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type ShareChatWithBotRequest struct {
// Identifier of the chat with the bot
ChatId int64 `json:"chat_id"`
// Identifier of the message with the button
MessageId int64 `json:"message_id"`
// Identifier of the button
ButtonId int32 `json:"button_id"`
// Identifier of the shared chat
SharedChatId int64 `json:"shared_chat_id"`
// Pass true to check that the chat can be shared by the button instead of actually sharing it. Doesn't check bot_is_member and bot_administrator_rights restrictions. If the bot must be a member, then all chats from getGroupsInCommon and all chats, where the user can add the bot, are suitable. In the latter case the bot will be automatically added to the chat. If the bot must be an administrator, then all chats, where the bot already has requested rights or can be added to administrators by the user, are suitable. In the latter case the bot will be automatically granted requested rights
OnlyCheck bool `json:"only_check"`
}
// Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot
func (client *Client) ShareChatWithBot(req *ShareChatWithBotRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "shareChatWithBot",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"button_id": req.ButtonId,
"shared_chat_id": req.SharedChatId,
"only_check": req.OnlyCheck,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type GetInlineQueryResultsRequest struct {
// The identifier of the target bot
BotUserId int64 `json:"bot_user_id"`
@ -6103,7 +6234,9 @@ func (client *Client) CreateNewBasicGroupChat(req *CreateNewBasicGroupChatReques
type CreateNewSupergroupChatRequest struct {
// Title of the new chat; 1-128 characters
Title string `json:"title"`
// Pass true to create a channel chat
// Pass true to create a forum supergroup chat
IsForum bool `json:"is_forum"`
// Pass true to create a channel chat; ignored if a forum is created
IsChannel bool `json:"is_channel"`
// Chat description; 0-255 characters
Description string `json:"description"`
@ -6123,6 +6256,7 @@ func (client *Client) CreateNewSupergroupChat(req *CreateNewSupergroupChatReques
},
Data: map[string]interface{}{
"title": req.Title,
"is_forum": req.IsForum,
"is_channel": req.IsChannel,
"description": req.Description,
"location": req.Location,
@ -6669,6 +6803,35 @@ func (client *Client) ToggleChatHasProtectedContent(req *ToggleChatHasProtectedC
return UnmarshalOk(result.Data)
}
type ToggleChatIsTranslatableRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
// New value of is_translatable
IsTranslatable bool `json:"is_translatable"`
}
// Changes the tranlatable state of a chat; for Telegram Premium users only
func (client *Client) ToggleChatIsTranslatable(req *ToggleChatIsTranslatableRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "toggleChatIsTranslatable",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"is_translatable": req.IsTranslatable,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type ToggleChatIsMarkedAsUnreadRequest struct {
// Chat identifier
ChatId int64 `json:"chat_id"`
@ -10413,7 +10576,7 @@ func (client *Client) GetUserProfilePhotos(req *GetUserProfilePhotosRequest) (*C
type GetStickersRequest struct {
// Type of the stickers to return
StickerType StickerType `json:"sticker_type"`
// Search query; an emoji or a keyword prefix. If empty, returns all known installed stickers
// Search query; a space-separated list of emoji or a keyword prefix. If empty, returns all known installed stickers
Query string `json:"query"`
// The maximum number of stickers to be returned
Limit int32 `json:"limit"`
@ -10421,7 +10584,7 @@ type GetStickersRequest struct {
ChatId int64 `json:"chat_id"`
}
// Returns stickers from the installed sticker sets that correspond to a given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned
// Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords. If the query is non-empty, then favorite, recently used or trending stickers may also be returned
func (client *Client) GetStickers(req *GetStickersRequest) (*Stickers, error) {
result, err := client.Send(Request{
meta: meta{
@ -10446,20 +10609,23 @@ func (client *Client) GetStickers(req *GetStickersRequest) (*Stickers, error) {
}
type SearchStickersRequest struct {
// String representation of emoji; must be non-empty
Emoji string `json:"emoji"`
// Type of the stickers to return
StickerType StickerType `json:"sticker_type"`
// Space-separated list of emoji to search for; must be non-empty
Emojis string `json:"emojis"`
// The maximum number of stickers to be returned; 0-100
Limit int32 `json:"limit"`
}
// Searches for stickers from public sticker sets that correspond to a given emoji
// Searches for stickers from public sticker sets that correspond to any of the given emoji
func (client *Client) SearchStickers(req *SearchStickersRequest) (*Stickers, error) {
result, err := client.Send(Request{
meta: meta{
Type: "searchStickers",
},
Data: map[string]interface{}{
"emoji": req.Emoji,
"sticker_type": req.StickerType,
"emojis": req.Emojis,
"limit": req.Limit,
},
})
@ -11052,6 +11218,32 @@ func (client *Client) SearchEmojis(req *SearchEmojisRequest) (*Emojis, error) {
return UnmarshalEmojis(result.Data)
}
type GetEmojiCategoriesRequest struct {
// Type of emoji categories to return; pass null to get default emoji categories
Type EmojiCategoryType `json:"type"`
}
// Returns available emojis categories
func (client *Client) GetEmojiCategories(req *GetEmojiCategoriesRequest) (*EmojiCategories, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getEmojiCategories",
},
Data: map[string]interface{}{
"type": req.Type,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalEmojiCategories(result.Data)
}
type GetAnimatedEmojiRequest struct {
// The emoji
Emoji string `json:"emoji"`
@ -11130,6 +11322,44 @@ func (client *Client) GetCustomEmojiStickers(req *GetCustomEmojiStickersRequest)
return UnmarshalStickers(result.Data)
}
// Returns default list of custom emoji stickers for placing on a chat photo
func (client *Client) GetDefaultChatPhotoCustomEmojiStickers() (*Stickers, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getDefaultChatPhotoCustomEmojiStickers",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStickers(result.Data)
}
// Returns default list of custom emoji stickers for placing on a profile photo
func (client *Client) GetDefaultProfilePhotoCustomEmojiStickers() (*Stickers, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getDefaultProfilePhotoCustomEmojiStickers",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStickers(result.Data)
}
// Returns saved animations
func (client *Client) GetSavedAnimations() (*Animations, error) {
result, err := client.Send(Request{
@ -11763,7 +11993,7 @@ type GetCommandsRequest struct {
LanguageCode string `json:"language_code"`
}
// Returns the list of commands supported by the bot for the given user scope and language; for bots only
// Returns list of commands supported by the bot for the given user scope and language; for bots only
func (client *Client) GetCommands(req *GetCommandsRequest) (*BotCommands, error) {
result, err := client.Send(Request{
meta: meta{
@ -12426,11 +12656,11 @@ func (client *Client) ToggleSupergroupHasAggressiveAntiSpamEnabled(req *ToggleSu
type ToggleSupergroupIsForumRequest struct {
// Identifier of the supergroup
SupergroupId int64 `json:"supergroup_id"`
// New value of is_forum. A supergroup can be converted to a forum, only if it has at least getOption("forum_member_count_min") members
// New value of is_forum
IsForum bool `json:"is_forum"`
}
// Toggles whether the supergroup is a forum; requires owner privileges in the supergroup
// Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums
func (client *Client) ToggleSupergroupIsForum(req *ToggleSupergroupIsForumRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -14134,6 +14364,73 @@ func (client *Client) SetAutoDownloadSettings(req *SetAutoDownloadSettingsReques
return UnmarshalOk(result.Data)
}
// Returns autosave settings for the current user
func (client *Client) GetAutosaveSettings() (*AutosaveSettings, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getAutosaveSettings",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalAutosaveSettings(result.Data)
}
type SetAutosaveSettingsRequest struct {
// Autosave settings scope
Scope AutosaveSettingsScope `json:"scope"`
// New autosave settings for the scope; pass null to set autosave settings to default
Settings *ScopeAutosaveSettings `json:"settings"`
}
// Sets autosave settings for the given scope
func (client *Client) SetAutosaveSettings(req *SetAutosaveSettingsRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setAutosaveSettings",
},
Data: map[string]interface{}{
"scope": req.Scope,
"settings": req.Settings,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
// Clears the list of all autosave settings exceptions
func (client *Client) ClearAutosaveSettingsExceptions() (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "clearAutosaveSettingsExceptions",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type GetBankCardInfoRequest struct {
// The bank card number
BankCardNumber string `json:"bank_card_number"`
@ -16511,14 +16808,17 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateChatHasProtectedContent:
return UnmarshalUpdateChatHasProtectedContent(result.Data)
case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatHasScheduledMessages(result.Data)
case TypeUpdateChatIsTranslatable:
return UnmarshalUpdateChatIsTranslatable(result.Data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(result.Data)
case TypeUpdateChatIsBlocked:
return UnmarshalUpdateChatIsBlocked(result.Data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(result.Data)
case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatHasScheduledMessages(result.Data)
case TypeUpdateChatFilters:
return UnmarshalUpdateChatFilters(result.Data)
@ -16685,6 +16985,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateSuggestedActions:
return UnmarshalUpdateSuggestedActions(result.Data)
case TypeUpdateAutosaveSettings:
return UnmarshalUpdateAutosaveSettings(result.Data)
case TypeUpdateNewInlineQuery:
return UnmarshalUpdateNewInlineQuery(result.Data)

File diff suppressed because it is too large Load diff

View file

@ -34,6 +34,12 @@ func UnmarshalAuthenticationCodeType(data json.RawMessage) (AuthenticationCodeTy
case TypeAuthenticationCodeTypeFragment:
return UnmarshalAuthenticationCodeTypeFragment(data)
case TypeAuthenticationCodeTypeFirebaseAndroid:
return UnmarshalAuthenticationCodeTypeFirebaseAndroid(data)
case TypeAuthenticationCodeTypeFirebaseIos:
return UnmarshalAuthenticationCodeTypeFirebaseIos(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -468,6 +474,40 @@ func UnmarshalListOfUserType(dataList []json.RawMessage) ([]UserType, error) {
return list, nil
}
func UnmarshalChatPhotoStickerType(data json.RawMessage) (ChatPhotoStickerType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeChatPhotoStickerTypeRegularOrMask:
return UnmarshalChatPhotoStickerTypeRegularOrMask(data)
case TypeChatPhotoStickerTypeCustomEmoji:
return UnmarshalChatPhotoStickerTypeCustomEmoji(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfChatPhotoStickerType(dataList []json.RawMessage) ([]ChatPhotoStickerType, error) {
list := []ChatPhotoStickerType{}
for _, data := range dataList {
entity, err := UnmarshalChatPhotoStickerType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalInputChatPhoto(data json.RawMessage) (InputChatPhoto, error) {
var meta meta
@ -486,6 +526,9 @@ func UnmarshalInputChatPhoto(data json.RawMessage) (InputChatPhoto, error) {
case TypeInputChatPhotoAnimation:
return UnmarshalInputChatPhotoAnimation(data)
case TypeInputChatPhotoSticker:
return UnmarshalInputChatPhotoSticker(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -1120,6 +1163,12 @@ func UnmarshalKeyboardButtonType(data json.RawMessage) (KeyboardButtonType, erro
case TypeKeyboardButtonTypeRequestPoll:
return UnmarshalKeyboardButtonTypeRequestPoll(data)
case TypeKeyboardButtonTypeRequestUser:
return UnmarshalKeyboardButtonTypeRequestUser(data)
case TypeKeyboardButtonTypeRequestChat:
return UnmarshalKeyboardButtonTypeRequestChat(data)
case TypeKeyboardButtonTypeWebApp:
return UnmarshalKeyboardButtonTypeWebApp(data)
@ -2160,6 +2209,12 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data)
case TypeMessageUserShared:
return UnmarshalMessageUserShared(data)
case TypeMessageChatShared:
return UnmarshalMessageChatShared(data)
case TypeMessageWebsiteConnected:
return UnmarshalMessageWebsiteConnected(data)
@ -2602,6 +2657,43 @@ func UnmarshalListOfUserStatus(dataList []json.RawMessage) ([]UserStatus, error)
return list, nil
}
func UnmarshalEmojiCategoryType(data json.RawMessage) (EmojiCategoryType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeEmojiCategoryTypeDefault:
return UnmarshalEmojiCategoryTypeDefault(data)
case TypeEmojiCategoryTypeEmojiStatus:
return UnmarshalEmojiCategoryTypeEmojiStatus(data)
case TypeEmojiCategoryTypeChatPhoto:
return UnmarshalEmojiCategoryTypeChatPhoto(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfEmojiCategoryType(dataList []json.RawMessage) ([]EmojiCategoryType, error) {
list := []EmojiCategoryType{}
for _, data := range dataList {
entity, err := UnmarshalEmojiCategoryType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalCallDiscardReason(data json.RawMessage) (CallDiscardReason, error) {
var meta meta
@ -2817,6 +2909,40 @@ func UnmarshalListOfCallProblem(dataList []json.RawMessage) ([]CallProblem, erro
return list, nil
}
func UnmarshalFirebaseAuthenticationSettings(data json.RawMessage) (FirebaseAuthenticationSettings, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeFirebaseAuthenticationSettingsAndroid:
return UnmarshalFirebaseAuthenticationSettingsAndroid(data)
case TypeFirebaseAuthenticationSettingsIos:
return UnmarshalFirebaseAuthenticationSettingsIos(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfFirebaseAuthenticationSettings(dataList []json.RawMessage) ([]FirebaseAuthenticationSettings, error) {
list := []FirebaseAuthenticationSettings{}
for _, data := range dataList {
entity, err := UnmarshalFirebaseAuthenticationSettings(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalDiceStickers(data json.RawMessage) (DiceStickers, error) {
var meta meta
@ -3359,6 +3485,9 @@ func UnmarshalPremiumFeature(data json.RawMessage) (PremiumFeature, error) {
case TypePremiumFeatureAppIcons:
return UnmarshalPremiumFeatureAppIcons(data)
case TypePremiumFeatureRealTimeChatTranslation:
return UnmarshalPremiumFeatureRealTimeChatTranslation(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -3494,6 +3623,9 @@ func UnmarshalDeviceToken(data json.RawMessage) (DeviceToken, error) {
case TypeDeviceTokenTizenPush:
return UnmarshalDeviceTokenTizenPush(data)
case TypeDeviceTokenHuaweiPush:
return UnmarshalDeviceTokenHuaweiPush(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -4675,6 +4807,46 @@ func UnmarshalListOfNetworkStatisticsEntry(dataList []json.RawMessage) ([]Networ
return list, nil
}
func UnmarshalAutosaveSettingsScope(data json.RawMessage) (AutosaveSettingsScope, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeAutosaveSettingsScopePrivateChats:
return UnmarshalAutosaveSettingsScopePrivateChats(data)
case TypeAutosaveSettingsScopeGroupChats:
return UnmarshalAutosaveSettingsScopeGroupChats(data)
case TypeAutosaveSettingsScopeChannelChats:
return UnmarshalAutosaveSettingsScopeChannelChats(data)
case TypeAutosaveSettingsScopeChat:
return UnmarshalAutosaveSettingsScopeChat(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfAutosaveSettingsScope(dataList []json.RawMessage) ([]AutosaveSettingsScope, error) {
list := []AutosaveSettingsScope{}
for _, data := range dataList {
entity, err := UnmarshalAutosaveSettingsScope(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalConnectionState(data json.RawMessage) (ConnectionState, error) {
var meta meta
@ -4834,6 +5006,12 @@ func UnmarshalSuggestedAction(data json.RawMessage) (SuggestedAction, error) {
case TypeSuggestedActionSetPassword:
return UnmarshalSuggestedActionSetPassword(data)
case TypeSuggestedActionUpgradePremium:
return UnmarshalSuggestedActionUpgradePremium(data)
case TypeSuggestedActionSubscribeToAnnualPremium:
return UnmarshalSuggestedActionSubscribeToAnnualPremium(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -5192,14 +5370,17 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateChatHasProtectedContent:
return UnmarshalUpdateChatHasProtectedContent(data)
case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatHasScheduledMessages(data)
case TypeUpdateChatIsTranslatable:
return UnmarshalUpdateChatIsTranslatable(data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(data)
case TypeUpdateChatIsBlocked:
return UnmarshalUpdateChatIsBlocked(data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(data)
case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatHasScheduledMessages(data)
case TypeUpdateChatFilters:
return UnmarshalUpdateChatFilters(data)
@ -5366,6 +5547,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateSuggestedActions:
return UnmarshalUpdateSuggestedActions(data)
case TypeUpdateAutosaveSettings:
return UnmarshalUpdateAutosaveSettings(data)
case TypeUpdateNewInlineQuery:
return UnmarshalUpdateNewInlineQuery(data)
@ -5522,6 +5706,22 @@ func UnmarshalAuthenticationCodeTypeFragment(data json.RawMessage) (*Authenticat
return &resp, err
}
func UnmarshalAuthenticationCodeTypeFirebaseAndroid(data json.RawMessage) (*AuthenticationCodeTypeFirebaseAndroid, error) {
var resp AuthenticationCodeTypeFirebaseAndroid
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAuthenticationCodeTypeFirebaseIos(data json.RawMessage) (*AuthenticationCodeTypeFirebaseIos, error) {
var resp AuthenticationCodeTypeFirebaseIos
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAuthenticationCodeInfo(data json.RawMessage) (*AuthenticationCodeInfo, error) {
var resp AuthenticationCodeInfo
@ -6186,6 +6386,30 @@ func UnmarshalChatLocation(data json.RawMessage) (*ChatLocation, error) {
return &resp, err
}
func UnmarshalChatPhotoStickerTypeRegularOrMask(data json.RawMessage) (*ChatPhotoStickerTypeRegularOrMask, error) {
var resp ChatPhotoStickerTypeRegularOrMask
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatPhotoStickerTypeCustomEmoji(data json.RawMessage) (*ChatPhotoStickerTypeCustomEmoji, error) {
var resp ChatPhotoStickerTypeCustomEmoji
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatPhotoSticker(data json.RawMessage) (*ChatPhotoSticker, error) {
var resp ChatPhotoSticker
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAnimatedChatPhoto(data json.RawMessage) (*AnimatedChatPhoto, error) {
var resp AnimatedChatPhoto
@ -6234,6 +6458,14 @@ func UnmarshalInputChatPhotoAnimation(data json.RawMessage) (*InputChatPhotoAnim
return &resp, err
}
func UnmarshalInputChatPhotoSticker(data json.RawMessage) (*InputChatPhotoSticker, error) {
var resp InputChatPhotoSticker
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatPermissions(data json.RawMessage) (*ChatPermissions, error) {
var resp ChatPermissions
@ -6258,6 +6490,14 @@ func UnmarshalPremiumPaymentOption(data json.RawMessage) (*PremiumPaymentOption,
return &resp, err
}
func UnmarshalPremiumStatePaymentOption(data json.RawMessage) (*PremiumStatePaymentOption, error) {
var resp PremiumStatePaymentOption
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiStatus(data json.RawMessage) (*EmojiStatus, error) {
var resp EmojiStatus
@ -7242,6 +7482,22 @@ func UnmarshalKeyboardButtonTypeRequestPoll(data json.RawMessage) (*KeyboardButt
return &resp, err
}
func UnmarshalKeyboardButtonTypeRequestUser(data json.RawMessage) (*KeyboardButtonTypeRequestUser, error) {
var resp KeyboardButtonTypeRequestUser
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalKeyboardButtonTypeRequestChat(data json.RawMessage) (*KeyboardButtonTypeRequestChat, error) {
var resp KeyboardButtonTypeRequestChat
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalKeyboardButtonTypeWebApp(data json.RawMessage) (*KeyboardButtonTypeWebApp, error) {
var resp KeyboardButtonTypeWebApp
@ -9122,6 +9378,22 @@ func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactReg
return &resp, err
}
func UnmarshalMessageUserShared(data json.RawMessage) (*MessageUserShared, error) {
var resp MessageUserShared
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageChatShared(data json.RawMessage) (*MessageChatShared, error) {
var resp MessageChatShared
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageWebsiteConnected(data json.RawMessage) (*MessageWebsiteConnected, error) {
var resp MessageWebsiteConnected
@ -9874,6 +10146,46 @@ func UnmarshalTrendingStickerSets(data json.RawMessage) (*TrendingStickerSets, e
return &resp, err
}
func UnmarshalEmojiCategory(data json.RawMessage) (*EmojiCategory, error) {
var resp EmojiCategory
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiCategories(data json.RawMessage) (*EmojiCategories, error) {
var resp EmojiCategories
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiCategoryTypeDefault(data json.RawMessage) (*EmojiCategoryTypeDefault, error) {
var resp EmojiCategoryTypeDefault
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiCategoryTypeEmojiStatus(data json.RawMessage) (*EmojiCategoryTypeEmojiStatus, error) {
var resp EmojiCategoryTypeEmojiStatus
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalEmojiCategoryTypeChatPhoto(data json.RawMessage) (*EmojiCategoryTypeChatPhoto, error) {
var resp EmojiCategoryTypeChatPhoto
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalCallDiscardReasonEmpty(data json.RawMessage) (*CallDiscardReasonEmpty, error) {
var resp CallDiscardReasonEmpty
@ -10178,6 +10490,22 @@ func UnmarshalCall(data json.RawMessage) (*Call, error) {
return &resp, err
}
func UnmarshalFirebaseAuthenticationSettingsAndroid(data json.RawMessage) (*FirebaseAuthenticationSettingsAndroid, error) {
var resp FirebaseAuthenticationSettingsAndroid
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalFirebaseAuthenticationSettingsIos(data json.RawMessage) (*FirebaseAuthenticationSettingsIos, error) {
var resp FirebaseAuthenticationSettingsIos
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPhoneNumberAuthenticationSettings(data json.RawMessage) (*PhoneNumberAuthenticationSettings, error) {
var resp PhoneNumberAuthenticationSettings
@ -11202,6 +11530,14 @@ func UnmarshalPremiumFeatureAppIcons(data json.RawMessage) (*PremiumFeatureAppIc
return &resp, err
}
func UnmarshalPremiumFeatureRealTimeChatTranslation(data json.RawMessage) (*PremiumFeatureRealTimeChatTranslation, error) {
var resp PremiumFeatureRealTimeChatTranslation
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPremiumLimit(data json.RawMessage) (*PremiumLimit, error) {
var resp PremiumLimit
@ -11282,6 +11618,14 @@ func UnmarshalStorePaymentPurposeGiftedPremium(data json.RawMessage) (*StorePaym
return &resp, err
}
func Unmarshal//-To(data json.RawMessage) (*//-To, error) {
var resp //-To
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) {
var resp DeviceTokenFirebaseCloudMessaging
@ -11370,6 +11714,14 @@ func UnmarshalDeviceTokenTizenPush(data json.RawMessage) (*DeviceTokenTizenPush,
return &resp, err
}
func UnmarshalDeviceTokenHuaweiPush(data json.RawMessage) (*DeviceTokenHuaweiPush, error) {
var resp DeviceTokenHuaweiPush
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPushReceiverId(data json.RawMessage) (*PushReceiverId, error) {
var resp PushReceiverId
@ -13058,6 +13410,62 @@ func UnmarshalAutoDownloadSettingsPresets(data json.RawMessage) (*AutoDownloadSe
return &resp, err
}
func UnmarshalAutosaveSettingsScopePrivateChats(data json.RawMessage) (*AutosaveSettingsScopePrivateChats, error) {
var resp AutosaveSettingsScopePrivateChats
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettingsScopeGroupChats(data json.RawMessage) (*AutosaveSettingsScopeGroupChats, error) {
var resp AutosaveSettingsScopeGroupChats
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettingsScopeChannelChats(data json.RawMessage) (*AutosaveSettingsScopeChannelChats, error) {
var resp AutosaveSettingsScopeChannelChats
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettingsScopeChat(data json.RawMessage) (*AutosaveSettingsScopeChat, error) {
var resp AutosaveSettingsScopeChat
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalScopeAutosaveSettings(data json.RawMessage) (*ScopeAutosaveSettings, error) {
var resp ScopeAutosaveSettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettingsException(data json.RawMessage) (*AutosaveSettingsException, error) {
var resp AutosaveSettingsException
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAutosaveSettings(data json.RawMessage) (*AutosaveSettings, error) {
var resp AutosaveSettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalConnectionStateWaitingForNetwork(data json.RawMessage) (*ConnectionStateWaitingForNetwork, error) {
var resp ConnectionStateWaitingForNetwork
@ -13250,6 +13658,22 @@ func UnmarshalSuggestedActionSetPassword(data json.RawMessage) (*SuggestedAction
return &resp, err
}
func UnmarshalSuggestedActionUpgradePremium(data json.RawMessage) (*SuggestedActionUpgradePremium, error) {
var resp SuggestedActionUpgradePremium
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalSuggestedActionSubscribeToAnnualPremium(data json.RawMessage) (*SuggestedActionSubscribeToAnnualPremium, error) {
var resp SuggestedActionSubscribeToAnnualPremium
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalCount(data json.RawMessage) (*Count, error) {
var resp Count
@ -13810,8 +14234,16 @@ func UnmarshalUpdateChatHasProtectedContent(data json.RawMessage) (*UpdateChatHa
return &resp, err
}
func UnmarshalUpdateChatHasScheduledMessages(data json.RawMessage) (*UpdateChatHasScheduledMessages, error) {
var resp UpdateChatHasScheduledMessages
func UnmarshalUpdateChatIsTranslatable(data json.RawMessage) (*UpdateChatIsTranslatable, error) {
var resp UpdateChatIsTranslatable
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateChatIsMarkedAsUnread(data json.RawMessage) (*UpdateChatIsMarkedAsUnread, error) {
var resp UpdateChatIsMarkedAsUnread
err := json.Unmarshal(data, &resp)
@ -13826,8 +14258,8 @@ func UnmarshalUpdateChatIsBlocked(data json.RawMessage) (*UpdateChatIsBlocked, e
return &resp, err
}
func UnmarshalUpdateChatIsMarkedAsUnread(data json.RawMessage) (*UpdateChatIsMarkedAsUnread, error) {
var resp UpdateChatIsMarkedAsUnread
func UnmarshalUpdateChatHasScheduledMessages(data json.RawMessage) (*UpdateChatHasScheduledMessages, error) {
var resp UpdateChatHasScheduledMessages
err := json.Unmarshal(data, &resp)
@ -14274,6 +14706,14 @@ func UnmarshalUpdateSuggestedActions(data json.RawMessage) (*UpdateSuggestedActi
return &resp, err
}
func UnmarshalUpdateAutosaveSettings(data json.RawMessage) (*UpdateAutosaveSettings, error) {
var resp UpdateAutosaveSettings
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateNewInlineQuery(data json.RawMessage) (*UpdateNewInlineQuery, error) {
var resp UpdateNewInlineQuery
@ -14515,6 +14955,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeAuthenticationCodeTypeFragment:
return UnmarshalAuthenticationCodeTypeFragment(data)
case TypeAuthenticationCodeTypeFirebaseAndroid:
return UnmarshalAuthenticationCodeTypeFirebaseAndroid(data)
case TypeAuthenticationCodeTypeFirebaseIos:
return UnmarshalAuthenticationCodeTypeFirebaseIos(data)
case TypeAuthenticationCodeInfo:
return UnmarshalAuthenticationCodeInfo(data)
@ -14764,6 +15210,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatLocation:
return UnmarshalChatLocation(data)
case TypeChatPhotoStickerTypeRegularOrMask:
return UnmarshalChatPhotoStickerTypeRegularOrMask(data)
case TypeChatPhotoStickerTypeCustomEmoji:
return UnmarshalChatPhotoStickerTypeCustomEmoji(data)
case TypeChatPhotoSticker:
return UnmarshalChatPhotoSticker(data)
case TypeAnimatedChatPhoto:
return UnmarshalAnimatedChatPhoto(data)
@ -14782,6 +15237,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInputChatPhotoAnimation:
return UnmarshalInputChatPhotoAnimation(data)
case TypeInputChatPhotoSticker:
return UnmarshalInputChatPhotoSticker(data)
case TypeChatPermissions:
return UnmarshalChatPermissions(data)
@ -14791,6 +15249,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePremiumPaymentOption:
return UnmarshalPremiumPaymentOption(data)
case TypePremiumStatePaymentOption:
return UnmarshalPremiumStatePaymentOption(data)
case TypeEmojiStatus:
return UnmarshalEmojiStatus(data)
@ -15160,6 +15621,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeKeyboardButtonTypeRequestPoll:
return UnmarshalKeyboardButtonTypeRequestPoll(data)
case TypeKeyboardButtonTypeRequestUser:
return UnmarshalKeyboardButtonTypeRequestUser(data)
case TypeKeyboardButtonTypeRequestChat:
return UnmarshalKeyboardButtonTypeRequestChat(data)
case TypeKeyboardButtonTypeWebApp:
return UnmarshalKeyboardButtonTypeWebApp(data)
@ -15865,6 +16332,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageContactRegistered:
return UnmarshalMessageContactRegistered(data)
case TypeMessageUserShared:
return UnmarshalMessageUserShared(data)
case TypeMessageChatShared:
return UnmarshalMessageChatShared(data)
case TypeMessageWebsiteConnected:
return UnmarshalMessageWebsiteConnected(data)
@ -16147,6 +16620,21 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeTrendingStickerSets:
return UnmarshalTrendingStickerSets(data)
case TypeEmojiCategory:
return UnmarshalEmojiCategory(data)
case TypeEmojiCategories:
return UnmarshalEmojiCategories(data)
case TypeEmojiCategoryTypeDefault:
return UnmarshalEmojiCategoryTypeDefault(data)
case TypeEmojiCategoryTypeEmojiStatus:
return UnmarshalEmojiCategoryTypeEmojiStatus(data)
case TypeEmojiCategoryTypeChatPhoto:
return UnmarshalEmojiCategoryTypeChatPhoto(data)
case TypeCallDiscardReasonEmpty:
return UnmarshalCallDiscardReasonEmpty(data)
@ -16261,6 +16749,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeCall:
return UnmarshalCall(data)
case TypeFirebaseAuthenticationSettingsAndroid:
return UnmarshalFirebaseAuthenticationSettingsAndroid(data)
case TypeFirebaseAuthenticationSettingsIos:
return UnmarshalFirebaseAuthenticationSettingsIos(data)
case TypePhoneNumberAuthenticationSettings:
return UnmarshalPhoneNumberAuthenticationSettings(data)
@ -16645,6 +17139,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePremiumFeatureAppIcons:
return UnmarshalPremiumFeatureAppIcons(data)
case TypePremiumFeatureRealTimeChatTranslation:
return UnmarshalPremiumFeatureRealTimeChatTranslation(data)
case TypePremiumLimit:
return UnmarshalPremiumLimit(data)
@ -16675,6 +17172,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStorePaymentPurposeGiftedPremium:
return UnmarshalStorePaymentPurposeGiftedPremium(data)
case Type//-To:
return Unmarshal//-To(data)
case TypeDeviceTokenFirebaseCloudMessaging:
return UnmarshalDeviceTokenFirebaseCloudMessaging(data)
@ -16708,6 +17208,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeDeviceTokenTizenPush:
return UnmarshalDeviceTokenTizenPush(data)
case TypeDeviceTokenHuaweiPush:
return UnmarshalDeviceTokenHuaweiPush(data)
case TypePushReceiverId:
return UnmarshalPushReceiverId(data)
@ -17341,6 +17844,27 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeAutoDownloadSettingsPresets:
return UnmarshalAutoDownloadSettingsPresets(data)
case TypeAutosaveSettingsScopePrivateChats:
return UnmarshalAutosaveSettingsScopePrivateChats(data)
case TypeAutosaveSettingsScopeGroupChats:
return UnmarshalAutosaveSettingsScopeGroupChats(data)
case TypeAutosaveSettingsScopeChannelChats:
return UnmarshalAutosaveSettingsScopeChannelChats(data)
case TypeAutosaveSettingsScopeChat:
return UnmarshalAutosaveSettingsScopeChat(data)
case TypeScopeAutosaveSettings:
return UnmarshalScopeAutosaveSettings(data)
case TypeAutosaveSettingsException:
return UnmarshalAutosaveSettingsException(data)
case TypeAutosaveSettings:
return UnmarshalAutosaveSettings(data)
case TypeConnectionStateWaitingForNetwork:
return UnmarshalConnectionStateWaitingForNetwork(data)
@ -17413,6 +17937,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeSuggestedActionSetPassword:
return UnmarshalSuggestedActionSetPassword(data)
case TypeSuggestedActionUpgradePremium:
return UnmarshalSuggestedActionUpgradePremium(data)
case TypeSuggestedActionSubscribeToAnnualPremium:
return UnmarshalSuggestedActionSubscribeToAnnualPremium(data)
case TypeCount:
return UnmarshalCount(data)
@ -17623,14 +18153,17 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateChatHasProtectedContent:
return UnmarshalUpdateChatHasProtectedContent(data)
case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatHasScheduledMessages(data)
case TypeUpdateChatIsTranslatable:
return UnmarshalUpdateChatIsTranslatable(data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(data)
case TypeUpdateChatIsBlocked:
return UnmarshalUpdateChatIsBlocked(data)
case TypeUpdateChatIsMarkedAsUnread:
return UnmarshalUpdateChatIsMarkedAsUnread(data)
case TypeUpdateChatHasScheduledMessages:
return UnmarshalUpdateChatHasScheduledMessages(data)
case TypeUpdateChatFilters:
return UnmarshalUpdateChatFilters(data)
@ -17797,6 +18330,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateSuggestedActions:
return UnmarshalUpdateSuggestedActions(data)
case TypeUpdateAutosaveSettings:
return UnmarshalUpdateAutosaveSettings(data)
case TypeUpdateNewInlineQuery:
return UnmarshalUpdateNewInlineQuery(data)