Package ai.tock.bot.engine.action
Class Action
-
-
Field Summary
Fields Modifier and Type Field Description private final PlayerIdplayerIdprivate final PlayerIdrecipientIdprivate final ActionMetadatametadataprivate final StringapplicationIdprivate final Id<out Event>idprivate final Instantdateprivate final EventStatestate
-
Constructor Summary
Constructors Constructor Description Action(PlayerId playerId, PlayerId recipientId, String applicationId, Id<Action> id, Instant date, EventState state, ActionMetadata metadata)
-
Method Summary
Modifier and Type Method Description final PlayerIdgetPlayerId()final PlayerIdgetRecipientId()final ActionMetadatagetMetadata()abstract MessagetoMessage()final Id<Action>toActionId()final Stringchoice(ParameterKey key)Returns the value of the specified choice parameter, null if the user action is not a SendChoice or if this parameter is not set. final BooleanbooleanChoice(ParameterKey key)Returns true if the specified choice as the "true" value, false either. final <T extends Any> TjsonChoice(ParameterKey key)Returns the value of the specified choice parameter, null if the user action is not a SendChoice or if this parameter is not set. -
-
Constructor Detail
-
Action
Action(PlayerId playerId, PlayerId recipientId, String applicationId, Id<Action> id, Instant date, EventState state, ActionMetadata metadata)
-
-
Method Detail
-
getPlayerId
final PlayerId getPlayerId()
-
getRecipientId
final PlayerId getRecipientId()
-
getMetadata
final ActionMetadata getMetadata()
-
toActionId
final Id<Action> toActionId()
-
choice
final String choice(ParameterKey key)
Returns the value of the specified choice parameter, null if the user action is not a SendChoice or if this parameter is not set.
-
booleanChoice
final Boolean booleanChoice(ParameterKey key)
Returns true if the specified choice as the "true" value, false either.
-
jsonChoice
final <T extends Any> T jsonChoice(ParameterKey key)
Returns the value of the specified choice parameter, null if the user action is not a SendChoice or if this parameter is not set.
-
-
-
-