fromJson static method

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

Implementation

static PremiumLimitType? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case PremiumLimitTypeActiveStoryCount.constructor:
      return PremiumLimitTypeActiveStoryCount.fromJson(json);

    case PremiumLimitTypeBioLength.constructor:
      return PremiumLimitTypeBioLength.fromJson(json);

    case PremiumLimitTypeCaptionLength.constructor:
      return PremiumLimitTypeCaptionLength.fromJson(json);

    case PremiumLimitTypeChatFolderChosenChatCount.constructor:
      return PremiumLimitTypeChatFolderChosenChatCount.fromJson(json);

    case PremiumLimitTypeChatFolderCount.constructor:
      return PremiumLimitTypeChatFolderCount.fromJson(json);

    case PremiumLimitTypeChatFolderInviteLinkCount.constructor:
      return PremiumLimitTypeChatFolderInviteLinkCount.fromJson(json);

    case PremiumLimitTypeCreatedPublicChatCount.constructor:
      return PremiumLimitTypeCreatedPublicChatCount.fromJson(json);

    case PremiumLimitTypeCustomTextCompositionStyleCount.constructor:
      return PremiumLimitTypeCustomTextCompositionStyleCount.fromJson(json);

    case PremiumLimitTypeFavoriteStickerCount.constructor:
      return PremiumLimitTypeFavoriteStickerCount.fromJson(json);

    case PremiumLimitTypeMessageTextLength.constructor:
      return PremiumLimitTypeMessageTextLength.fromJson(json);

    case PremiumLimitTypeMonthlyPostedStoryCount.constructor:
      return PremiumLimitTypeMonthlyPostedStoryCount.fromJson(json);

    case PremiumLimitTypeOwnedBotCount.constructor:
      return PremiumLimitTypeOwnedBotCount.fromJson(json);

    case PremiumLimitTypePinnedArchivedChatCount.constructor:
      return PremiumLimitTypePinnedArchivedChatCount.fromJson(json);

    case PremiumLimitTypePinnedChatCount.constructor:
      return PremiumLimitTypePinnedChatCount.fromJson(json);

    case PremiumLimitTypePinnedSavedMessagesTopicCount.constructor:
      return PremiumLimitTypePinnedSavedMessagesTopicCount.fromJson(json);

    case PremiumLimitTypeSavedAnimationCount.constructor:
      return PremiumLimitTypeSavedAnimationCount.fromJson(json);

    case PremiumLimitTypeShareableChatFolderCount.constructor:
      return PremiumLimitTypeShareableChatFolderCount.fromJson(json);

    case PremiumLimitTypeSimilarChatCount.constructor:
      return PremiumLimitTypeSimilarChatCount.fromJson(json);

    case PremiumLimitTypeStoryCaptionLength.constructor:
      return PremiumLimitTypeStoryCaptionLength.fromJson(json);

    case PremiumLimitTypeStorySuggestedReactionAreaCount.constructor:
      return PremiumLimitTypeStorySuggestedReactionAreaCount.fromJson(json);

    case PremiumLimitTypeSupergroupCount.constructor:
      return PremiumLimitTypeSupergroupCount.fromJson(json);

    case PremiumLimitTypeWeeklyPostedStoryCount.constructor:
      return PremiumLimitTypeWeeklyPostedStoryCount.fromJson(json);

    default:
      return null;
  }
}