Update.fromJson constructor

Update.fromJson(
  1. Map<String, dynamic> json
)

a Update return type can be :

Implementation

factory Update.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case UpdateAuthorizationState.CONSTRUCTOR:
      return UpdateAuthorizationState.fromJson(json);
    case UpdateNewMessage.CONSTRUCTOR:
      return UpdateNewMessage.fromJson(json);
    case UpdateMessageSendAcknowledged.CONSTRUCTOR:
      return UpdateMessageSendAcknowledged.fromJson(json);
    case UpdateMessageSendSucceeded.CONSTRUCTOR:
      return UpdateMessageSendSucceeded.fromJson(json);
    case UpdateMessageSendFailed.CONSTRUCTOR:
      return UpdateMessageSendFailed.fromJson(json);
    case UpdateMessageContent.CONSTRUCTOR:
      return UpdateMessageContent.fromJson(json);
    case UpdateMessageEdited.CONSTRUCTOR:
      return UpdateMessageEdited.fromJson(json);
    case UpdateMessageIsPinned.CONSTRUCTOR:
      return UpdateMessageIsPinned.fromJson(json);
    case UpdateMessageInteractionInfo.CONSTRUCTOR:
      return UpdateMessageInteractionInfo.fromJson(json);
    case UpdateMessageContentOpened.CONSTRUCTOR:
      return UpdateMessageContentOpened.fromJson(json);
    case UpdateMessageMentionRead.CONSTRUCTOR:
      return UpdateMessageMentionRead.fromJson(json);
    case UpdateMessageUnreadReactions.CONSTRUCTOR:
      return UpdateMessageUnreadReactions.fromJson(json);
    case UpdateMessageLiveLocationViewed.CONSTRUCTOR:
      return UpdateMessageLiveLocationViewed.fromJson(json);
    case UpdateNewChat.CONSTRUCTOR:
      return UpdateNewChat.fromJson(json);
    case UpdateChatTitle.CONSTRUCTOR:
      return UpdateChatTitle.fromJson(json);
    case UpdateChatPhoto.CONSTRUCTOR:
      return UpdateChatPhoto.fromJson(json);
    case UpdateChatPermissions.CONSTRUCTOR:
      return UpdateChatPermissions.fromJson(json);
    case UpdateChatLastMessage.CONSTRUCTOR:
      return UpdateChatLastMessage.fromJson(json);
    case UpdateChatPosition.CONSTRUCTOR:
      return UpdateChatPosition.fromJson(json);
    case UpdateChatReadInbox.CONSTRUCTOR:
      return UpdateChatReadInbox.fromJson(json);
    case UpdateChatReadOutbox.CONSTRUCTOR:
      return UpdateChatReadOutbox.fromJson(json);
    case UpdateChatActionBar.CONSTRUCTOR:
      return UpdateChatActionBar.fromJson(json);
    case UpdateChatAvailableReactions.CONSTRUCTOR:
      return UpdateChatAvailableReactions.fromJson(json);
    case UpdateChatDraftMessage.CONSTRUCTOR:
      return UpdateChatDraftMessage.fromJson(json);
    case UpdateChatMessageSender.CONSTRUCTOR:
      return UpdateChatMessageSender.fromJson(json);
    case UpdateChatMessageAutoDeleteTime.CONSTRUCTOR:
      return UpdateChatMessageAutoDeleteTime.fromJson(json);
    case UpdateChatNotificationSettings.CONSTRUCTOR:
      return UpdateChatNotificationSettings.fromJson(json);
    case UpdateChatPendingJoinRequests.CONSTRUCTOR:
      return UpdateChatPendingJoinRequests.fromJson(json);
    case UpdateChatReplyMarkup.CONSTRUCTOR:
      return UpdateChatReplyMarkup.fromJson(json);
    case UpdateChatBackground.CONSTRUCTOR:
      return UpdateChatBackground.fromJson(json);
    case UpdateChatTheme.CONSTRUCTOR:
      return UpdateChatTheme.fromJson(json);
    case UpdateChatUnreadMentionCount.CONSTRUCTOR:
      return UpdateChatUnreadMentionCount.fromJson(json);
    case UpdateChatUnreadReactionCount.CONSTRUCTOR:
      return UpdateChatUnreadReactionCount.fromJson(json);
    case UpdateChatVideoChat.CONSTRUCTOR:
      return UpdateChatVideoChat.fromJson(json);
    case UpdateChatDefaultDisableNotification.CONSTRUCTOR:
      return UpdateChatDefaultDisableNotification.fromJson(json);
    case UpdateChatHasProtectedContent.CONSTRUCTOR:
      return UpdateChatHasProtectedContent.fromJson(json);
    case UpdateChatIsTranslatable.CONSTRUCTOR:
      return UpdateChatIsTranslatable.fromJson(json);
    case UpdateChatIsMarkedAsUnread.CONSTRUCTOR:
      return UpdateChatIsMarkedAsUnread.fromJson(json);
    case UpdateChatIsBlocked.CONSTRUCTOR:
      return UpdateChatIsBlocked.fromJson(json);
    case UpdateChatHasScheduledMessages.CONSTRUCTOR:
      return UpdateChatHasScheduledMessages.fromJson(json);
    case UpdateChatFolders.CONSTRUCTOR:
      return UpdateChatFolders.fromJson(json);
    case UpdateChatOnlineMemberCount.CONSTRUCTOR:
      return UpdateChatOnlineMemberCount.fromJson(json);
    case UpdateForumTopicInfo.CONSTRUCTOR:
      return UpdateForumTopicInfo.fromJson(json);
    case UpdateScopeNotificationSettings.CONSTRUCTOR:
      return UpdateScopeNotificationSettings.fromJson(json);
    case UpdateNotification.CONSTRUCTOR:
      return UpdateNotification.fromJson(json);
    case UpdateNotificationGroup.CONSTRUCTOR:
      return UpdateNotificationGroup.fromJson(json);
    case UpdateActiveNotifications.CONSTRUCTOR:
      return UpdateActiveNotifications.fromJson(json);
    case UpdateHavePendingNotifications.CONSTRUCTOR:
      return UpdateHavePendingNotifications.fromJson(json);
    case UpdateDeleteMessages.CONSTRUCTOR:
      return UpdateDeleteMessages.fromJson(json);
    case UpdateChatAction.CONSTRUCTOR:
      return UpdateChatAction.fromJson(json);
    case UpdateUserStatus.CONSTRUCTOR:
      return UpdateUserStatus.fromJson(json);
    case UpdateUser.CONSTRUCTOR:
      return UpdateUser.fromJson(json);
    case UpdateBasicGroup.CONSTRUCTOR:
      return UpdateBasicGroup.fromJson(json);
    case UpdateSupergroup.CONSTRUCTOR:
      return UpdateSupergroup.fromJson(json);
    case UpdateSecretChat.CONSTRUCTOR:
      return UpdateSecretChat.fromJson(json);
    case UpdateUserFullInfo.CONSTRUCTOR:
      return UpdateUserFullInfo.fromJson(json);
    case UpdateBasicGroupFullInfo.CONSTRUCTOR:
      return UpdateBasicGroupFullInfo.fromJson(json);
    case UpdateSupergroupFullInfo.CONSTRUCTOR:
      return UpdateSupergroupFullInfo.fromJson(json);
    case UpdateServiceNotification.CONSTRUCTOR:
      return UpdateServiceNotification.fromJson(json);
    case UpdateFile.CONSTRUCTOR:
      return UpdateFile.fromJson(json);
    case UpdateFileGenerationStart.CONSTRUCTOR:
      return UpdateFileGenerationStart.fromJson(json);
    case UpdateFileGenerationStop.CONSTRUCTOR:
      return UpdateFileGenerationStop.fromJson(json);
    case UpdateFileDownloads.CONSTRUCTOR:
      return UpdateFileDownloads.fromJson(json);
    case UpdateFileAddedToDownloads.CONSTRUCTOR:
      return UpdateFileAddedToDownloads.fromJson(json);
    case UpdateFileDownload.CONSTRUCTOR:
      return UpdateFileDownload.fromJson(json);
    case UpdateFileRemovedFromDownloads.CONSTRUCTOR:
      return UpdateFileRemovedFromDownloads.fromJson(json);
    case UpdateCall.CONSTRUCTOR:
      return UpdateCall.fromJson(json);
    case UpdateGroupCall.CONSTRUCTOR:
      return UpdateGroupCall.fromJson(json);
    case UpdateGroupCallParticipant.CONSTRUCTOR:
      return UpdateGroupCallParticipant.fromJson(json);
    case UpdateNewCallSignalingData.CONSTRUCTOR:
      return UpdateNewCallSignalingData.fromJson(json);
    case UpdateUserPrivacySettingRules.CONSTRUCTOR:
      return UpdateUserPrivacySettingRules.fromJson(json);
    case UpdateUnreadMessageCount.CONSTRUCTOR:
      return UpdateUnreadMessageCount.fromJson(json);
    case UpdateUnreadChatCount.CONSTRUCTOR:
      return UpdateUnreadChatCount.fromJson(json);
    case UpdateStory.CONSTRUCTOR:
      return UpdateStory.fromJson(json);
    case UpdateStoryDeleted.CONSTRUCTOR:
      return UpdateStoryDeleted.fromJson(json);
    case UpdateChatActiveStories.CONSTRUCTOR:
      return UpdateChatActiveStories.fromJson(json);
    case UpdateStoryListChatCount.CONSTRUCTOR:
      return UpdateStoryListChatCount.fromJson(json);
    case UpdateOption.CONSTRUCTOR:
      return UpdateOption.fromJson(json);
    case UpdateStickerSet.CONSTRUCTOR:
      return UpdateStickerSet.fromJson(json);
    case UpdateInstalledStickerSets.CONSTRUCTOR:
      return UpdateInstalledStickerSets.fromJson(json);
    case UpdateTrendingStickerSets.CONSTRUCTOR:
      return UpdateTrendingStickerSets.fromJson(json);
    case UpdateRecentStickers.CONSTRUCTOR:
      return UpdateRecentStickers.fromJson(json);
    case UpdateFavoriteStickers.CONSTRUCTOR:
      return UpdateFavoriteStickers.fromJson(json);
    case UpdateSavedAnimations.CONSTRUCTOR:
      return UpdateSavedAnimations.fromJson(json);
    case UpdateSavedNotificationSounds.CONSTRUCTOR:
      return UpdateSavedNotificationSounds.fromJson(json);
    case UpdateSelectedBackground.CONSTRUCTOR:
      return UpdateSelectedBackground.fromJson(json);
    case UpdateChatThemes.CONSTRUCTOR:
      return UpdateChatThemes.fromJson(json);
    case UpdateLanguagePackStrings.CONSTRUCTOR:
      return UpdateLanguagePackStrings.fromJson(json);
    case UpdateConnectionState.CONSTRUCTOR:
      return UpdateConnectionState.fromJson(json);
    case UpdateTermsOfService.CONSTRUCTOR:
      return UpdateTermsOfService.fromJson(json);
    case UpdateUsersNearby.CONSTRUCTOR:
      return UpdateUsersNearby.fromJson(json);
    case UpdateAttachmentMenuBots.CONSTRUCTOR:
      return UpdateAttachmentMenuBots.fromJson(json);
    case UpdateWebAppMessageSent.CONSTRUCTOR:
      return UpdateWebAppMessageSent.fromJson(json);
    case UpdateActiveEmojiReactions.CONSTRUCTOR:
      return UpdateActiveEmojiReactions.fromJson(json);
    case UpdateDefaultReactionType.CONSTRUCTOR:
      return UpdateDefaultReactionType.fromJson(json);
    case UpdateDiceEmojis.CONSTRUCTOR:
      return UpdateDiceEmojis.fromJson(json);
    case UpdateAnimatedEmojiMessageClicked.CONSTRUCTOR:
      return UpdateAnimatedEmojiMessageClicked.fromJson(json);
    case UpdateAnimationSearchParameters.CONSTRUCTOR:
      return UpdateAnimationSearchParameters.fromJson(json);
    case UpdateSuggestedActions.CONSTRUCTOR:
      return UpdateSuggestedActions.fromJson(json);
    case UpdateAddChatMembersPrivacyForbidden.CONSTRUCTOR:
      return UpdateAddChatMembersPrivacyForbidden.fromJson(json);
    case UpdateAutosaveSettings.CONSTRUCTOR:
      return UpdateAutosaveSettings.fromJson(json);
    case UpdateNewInlineQuery.CONSTRUCTOR:
      return UpdateNewInlineQuery.fromJson(json);
    case UpdateNewChosenInlineResult.CONSTRUCTOR:
      return UpdateNewChosenInlineResult.fromJson(json);
    case UpdateNewCallbackQuery.CONSTRUCTOR:
      return UpdateNewCallbackQuery.fromJson(json);
    case UpdateNewInlineCallbackQuery.CONSTRUCTOR:
      return UpdateNewInlineCallbackQuery.fromJson(json);
    case UpdateNewShippingQuery.CONSTRUCTOR:
      return UpdateNewShippingQuery.fromJson(json);
    case UpdateNewPreCheckoutQuery.CONSTRUCTOR:
      return UpdateNewPreCheckoutQuery.fromJson(json);
    case UpdateNewCustomEvent.CONSTRUCTOR:
      return UpdateNewCustomEvent.fromJson(json);
    case UpdateNewCustomQuery.CONSTRUCTOR:
      return UpdateNewCustomQuery.fromJson(json);
    case UpdatePoll.CONSTRUCTOR:
      return UpdatePoll.fromJson(json);
    case UpdatePollAnswer.CONSTRUCTOR:
      return UpdatePollAnswer.fromJson(json);
    case UpdateChatMember.CONSTRUCTOR:
      return UpdateChatMember.fromJson(json);
    case UpdateNewChatJoinRequest.CONSTRUCTOR:
      return UpdateNewChatJoinRequest.fromJson(json);
    default:
      return const Update();
  }
}