map<TResult extends Object?> method

TResult map<TResult extends Object?>({
  1. required TResult activeStoryCount(
    1. PremiumLimitTypeActiveStoryCount value
    ),
  2. required TResult bioLength(
    1. PremiumLimitTypeBioLength value
    ),
  3. required TResult captionLength(
    1. PremiumLimitTypeCaptionLength value
    ),
  4. required TResult chatFolderChosenChatCount(
    1. PremiumLimitTypeChatFolderChosenChatCount value
    ),
  5. required TResult chatFolderCount(
    1. PremiumLimitTypeChatFolderCount value
    ),
  6. required TResult chatFolderInviteLinkCount(
    1. PremiumLimitTypeChatFolderInviteLinkCount value
    ),
  7. required TResult createdPublicChatCount(
    1. PremiumLimitTypeCreatedPublicChatCount value
    ),
  8. required TResult customTextCompositionStyleCount(
    1. PremiumLimitTypeCustomTextCompositionStyleCount value
    ),
  9. required TResult favoriteStickerCount(
    1. PremiumLimitTypeFavoriteStickerCount value
    ),
  10. required TResult messageTextLength(
    1. PremiumLimitTypeMessageTextLength value
    ),
  11. required TResult monthlyPostedStoryCount(
    1. PremiumLimitTypeMonthlyPostedStoryCount value
    ),
  12. required TResult ownedBotCount(
    1. PremiumLimitTypeOwnedBotCount value
    ),
  13. required TResult pinnedArchivedChatCount(
    1. PremiumLimitTypePinnedArchivedChatCount value
    ),
  14. required TResult pinnedChatCount(
    1. PremiumLimitTypePinnedChatCount value
    ),
  15. required TResult pinnedSavedMessagesTopicCount(
    1. PremiumLimitTypePinnedSavedMessagesTopicCount value
    ),
  16. required TResult savedAnimationCount(
    1. PremiumLimitTypeSavedAnimationCount value
    ),
  17. required TResult shareableChatFolderCount(
    1. PremiumLimitTypeShareableChatFolderCount value
    ),
  18. required TResult similarChatCount(
    1. PremiumLimitTypeSimilarChatCount value
    ),
  19. required TResult storyCaptionLength(
    1. PremiumLimitTypeStoryCaptionLength value
    ),
  20. required TResult storySuggestedReactionAreaCount(
    1. PremiumLimitTypeStorySuggestedReactionAreaCount value
    ),
  21. required TResult supergroupCount(
    1. PremiumLimitTypeSupergroupCount value
    ),
  22. required TResult weeklyPostedStoryCount(
    1. PremiumLimitTypeWeeklyPostedStoryCount value
    ),
})

Implementation

TResult map<TResult extends Object?>({
  required TResult Function(PremiumLimitTypeActiveStoryCount value)
  activeStoryCount,
  required TResult Function(PremiumLimitTypeBioLength value) bioLength,
  required TResult Function(PremiumLimitTypeCaptionLength value)
  captionLength,
  required TResult Function(PremiumLimitTypeChatFolderChosenChatCount value)
  chatFolderChosenChatCount,
  required TResult Function(PremiumLimitTypeChatFolderCount value)
  chatFolderCount,
  required TResult Function(PremiumLimitTypeChatFolderInviteLinkCount value)
  chatFolderInviteLinkCount,
  required TResult Function(PremiumLimitTypeCreatedPublicChatCount value)
  createdPublicChatCount,
  required TResult Function(
    PremiumLimitTypeCustomTextCompositionStyleCount value,
  )
  customTextCompositionStyleCount,
  required TResult Function(PremiumLimitTypeFavoriteStickerCount value)
  favoriteStickerCount,
  required TResult Function(PremiumLimitTypeMessageTextLength value)
  messageTextLength,
  required TResult Function(PremiumLimitTypeMonthlyPostedStoryCount value)
  monthlyPostedStoryCount,
  required TResult Function(PremiumLimitTypeOwnedBotCount value)
  ownedBotCount,
  required TResult Function(PremiumLimitTypePinnedArchivedChatCount value)
  pinnedArchivedChatCount,
  required TResult Function(PremiumLimitTypePinnedChatCount value)
  pinnedChatCount,
  required TResult Function(
    PremiumLimitTypePinnedSavedMessagesTopicCount value,
  )
  pinnedSavedMessagesTopicCount,
  required TResult Function(PremiumLimitTypeSavedAnimationCount value)
  savedAnimationCount,
  required TResult Function(PremiumLimitTypeShareableChatFolderCount value)
  shareableChatFolderCount,
  required TResult Function(PremiumLimitTypeSimilarChatCount value)
  similarChatCount,
  required TResult Function(PremiumLimitTypeStoryCaptionLength value)
  storyCaptionLength,
  required TResult Function(
    PremiumLimitTypeStorySuggestedReactionAreaCount value,
  )
  storySuggestedReactionAreaCount,
  required TResult Function(PremiumLimitTypeSupergroupCount value)
  supergroupCount,
  required TResult Function(PremiumLimitTypeWeeklyPostedStoryCount value)
  weeklyPostedStoryCount,
}) {
  switch (getConstructor()) {
    case PremiumLimitTypeActiveStoryCount.constructor:
      return activeStoryCount.call(this as PremiumLimitTypeActiveStoryCount);
    case PremiumLimitTypeBioLength.constructor:
      return bioLength.call(this as PremiumLimitTypeBioLength);
    case PremiumLimitTypeCaptionLength.constructor:
      return captionLength.call(this as PremiumLimitTypeCaptionLength);
    case PremiumLimitTypeChatFolderChosenChatCount.constructor:
      return chatFolderChosenChatCount.call(
        this as PremiumLimitTypeChatFolderChosenChatCount,
      );
    case PremiumLimitTypeChatFolderCount.constructor:
      return chatFolderCount.call(this as PremiumLimitTypeChatFolderCount);
    case PremiumLimitTypeChatFolderInviteLinkCount.constructor:
      return chatFolderInviteLinkCount.call(
        this as PremiumLimitTypeChatFolderInviteLinkCount,
      );
    case PremiumLimitTypeCreatedPublicChatCount.constructor:
      return createdPublicChatCount.call(
        this as PremiumLimitTypeCreatedPublicChatCount,
      );
    case PremiumLimitTypeCustomTextCompositionStyleCount.constructor:
      return customTextCompositionStyleCount.call(
        this as PremiumLimitTypeCustomTextCompositionStyleCount,
      );
    case PremiumLimitTypeFavoriteStickerCount.constructor:
      return favoriteStickerCount.call(
        this as PremiumLimitTypeFavoriteStickerCount,
      );
    case PremiumLimitTypeMessageTextLength.constructor:
      return messageTextLength.call(
        this as PremiumLimitTypeMessageTextLength,
      );
    case PremiumLimitTypeMonthlyPostedStoryCount.constructor:
      return monthlyPostedStoryCount.call(
        this as PremiumLimitTypeMonthlyPostedStoryCount,
      );
    case PremiumLimitTypeOwnedBotCount.constructor:
      return ownedBotCount.call(this as PremiumLimitTypeOwnedBotCount);
    case PremiumLimitTypePinnedArchivedChatCount.constructor:
      return pinnedArchivedChatCount.call(
        this as PremiumLimitTypePinnedArchivedChatCount,
      );
    case PremiumLimitTypePinnedChatCount.constructor:
      return pinnedChatCount.call(this as PremiumLimitTypePinnedChatCount);
    case PremiumLimitTypePinnedSavedMessagesTopicCount.constructor:
      return pinnedSavedMessagesTopicCount.call(
        this as PremiumLimitTypePinnedSavedMessagesTopicCount,
      );
    case PremiumLimitTypeSavedAnimationCount.constructor:
      return savedAnimationCount.call(
        this as PremiumLimitTypeSavedAnimationCount,
      );
    case PremiumLimitTypeShareableChatFolderCount.constructor:
      return shareableChatFolderCount.call(
        this as PremiumLimitTypeShareableChatFolderCount,
      );
    case PremiumLimitTypeSimilarChatCount.constructor:
      return similarChatCount.call(this as PremiumLimitTypeSimilarChatCount);
    case PremiumLimitTypeStoryCaptionLength.constructor:
      return storyCaptionLength.call(
        this as PremiumLimitTypeStoryCaptionLength,
      );
    case PremiumLimitTypeStorySuggestedReactionAreaCount.constructor:
      return storySuggestedReactionAreaCount.call(
        this as PremiumLimitTypeStorySuggestedReactionAreaCount,
      );
    case PremiumLimitTypeSupergroupCount.constructor:
      return supergroupCount.call(this as PremiumLimitTypeSupergroupCount);
    case PremiumLimitTypeWeeklyPostedStoryCount.constructor:
      return weeklyPostedStoryCount.call(
        this as PremiumLimitTypeWeeklyPostedStoryCount,
      );
  }
  throw StateError('not handled type Generator');
}