maybeMap<TResult extends Object?> method

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

Implementation

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