maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult isInline(
- BotSettingIsInline value
- TResult inlineQueryPlaceholder()?,
- TResult needLocation(
- BotSettingNeedLocation value
- TResult inlineFeedback(
- BotSettingInlineFeedback value
- TResult canJoinGroups(
- BotSettingCanJoinGroups value
- TResult canReadAllGroupMessages()?,
- TResult canConnectToBusiness()?,
- TResult canManageBots(
- BotSettingCanManageBots value
- TResult supportsGuestQueries()?,
- TResult isGuard(
- BotSettingIsGuard value
- TResult hasTopics(
- BotSettingHasTopics value
- TResult allowsUsersToCreateTopics()?,
- TResult hasTopicSidebar()?,
- TResult canCommunicateWithBots()?,
- TResult callbackQueryMode()?,
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(BotSettingIsInline value)? isInline,
TResult Function(BotSettingInlineQueryPlaceholder value)?
inlineQueryPlaceholder,
TResult Function(BotSettingNeedLocation value)? needLocation,
TResult Function(BotSettingInlineFeedback value)? inlineFeedback,
TResult Function(BotSettingCanJoinGroups value)? canJoinGroups,
TResult Function(BotSettingCanReadAllGroupMessages value)?
canReadAllGroupMessages,
TResult Function(BotSettingCanConnectToBusiness value)?
canConnectToBusiness,
TResult Function(BotSettingCanManageBots value)? canManageBots,
TResult Function(BotSettingSupportsGuestQueries value)?
supportsGuestQueries,
TResult Function(BotSettingIsGuard value)? isGuard,
TResult Function(BotSettingHasTopics value)? hasTopics,
TResult Function(BotSettingAllowsUsersToCreateTopics value)?
allowsUsersToCreateTopics,
TResult Function(BotSettingHasTopicSidebar value)? hasTopicSidebar,
TResult Function(BotSettingCanCommunicateWithBots value)?
canCommunicateWithBots,
TResult Function(BotSettingCallbackQueryMode value)? callbackQueryMode,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case BotSettingIsInline.constructor:
if (isInline != null) {
return isInline.call(this as BotSettingIsInline);
}
break;
case BotSettingInlineQueryPlaceholder.constructor:
if (inlineQueryPlaceholder != null) {
return inlineQueryPlaceholder
.call(this as BotSettingInlineQueryPlaceholder);
}
break;
case BotSettingNeedLocation.constructor:
if (needLocation != null) {
return needLocation.call(this as BotSettingNeedLocation);
}
break;
case BotSettingInlineFeedback.constructor:
if (inlineFeedback != null) {
return inlineFeedback.call(this as BotSettingInlineFeedback);
}
break;
case BotSettingCanJoinGroups.constructor:
if (canJoinGroups != null) {
return canJoinGroups.call(this as BotSettingCanJoinGroups);
}
break;
case BotSettingCanReadAllGroupMessages.constructor:
if (canReadAllGroupMessages != null) {
return canReadAllGroupMessages
.call(this as BotSettingCanReadAllGroupMessages);
}
break;
case BotSettingCanConnectToBusiness.constructor:
if (canConnectToBusiness != null) {
return canConnectToBusiness
.call(this as BotSettingCanConnectToBusiness);
}
break;
case BotSettingCanManageBots.constructor:
if (canManageBots != null) {
return canManageBots.call(this as BotSettingCanManageBots);
}
break;
case BotSettingSupportsGuestQueries.constructor:
if (supportsGuestQueries != null) {
return supportsGuestQueries
.call(this as BotSettingSupportsGuestQueries);
}
break;
case BotSettingIsGuard.constructor:
if (isGuard != null) {
return isGuard.call(this as BotSettingIsGuard);
}
break;
case BotSettingHasTopics.constructor:
if (hasTopics != null) {
return hasTopics.call(this as BotSettingHasTopics);
}
break;
case BotSettingAllowsUsersToCreateTopics.constructor:
if (allowsUsersToCreateTopics != null) {
return allowsUsersToCreateTopics
.call(this as BotSettingAllowsUsersToCreateTopics);
}
break;
case BotSettingHasTopicSidebar.constructor:
if (hasTopicSidebar != null) {
return hasTopicSidebar.call(this as BotSettingHasTopicSidebar);
}
break;
case BotSettingCanCommunicateWithBots.constructor:
if (canCommunicateWithBots != null) {
return canCommunicateWithBots
.call(this as BotSettingCanCommunicateWithBots);
}
break;
case BotSettingCallbackQueryMode.constructor:
if (callbackQueryMode != null) {
return callbackQueryMode.call(this as BotSettingCallbackQueryMode);
}
break;
}
return orElse.call();
}