@NotNull public ClientStoryDefinition story
The current story.
public TockClientBus(@NotNull
ClientBotDefinition botDefinition,
@NotNull
java.lang.String requestId,
@NotNull
ai.tock.bot.api.model.UserRequest request,
@NotNull
kotlin.jvm.functions.Function1<? super ai.tock.bot.api.model.BotResponse,kotlin.Unit> sendAnswer)
botDefinition - The bot definition.public TockClientBus(@NotNull
ClientBotDefinition botDefinition,
@NotNull
ai.tock.bot.api.model.websocket.RequestData data,
@NotNull
kotlin.jvm.functions.Function1<? super ai.tock.bot.api.model.BotResponse,kotlin.Unit> sendAnswer)
@NotNull public java.lang.String getApplicationId()
@NotNull public ai.tock.bot.engine.user.PlayerId getUserId()
@NotNull public ai.tock.bot.engine.user.PlayerId getBotId()
@Nullable public ai.tock.bot.definition.IntentAware getIntent()
public boolean getTest()
@NotNull public java.util.Locale getUserLocale()
@NotNull public ai.tock.translator.UserInterfaceType getUserInterfaceType()
@NotNull public ai.tock.bot.connector.ConnectorType getTargetConnectorType()
@Nullable public java.lang.String getContextId()
public int getCurrentAnswerIndex()
@NotNull public java.util.List<ai.tock.bot.api.model.context.Entity> getEntities()
The entity list.
@NotNull public ai.tock.bot.api.model.message.user.UserMessage getMessage()
The user message.
@NotNull public ClientStoryDefinition getStory()
The current story.
public void setStory(@NotNull
ClientStoryDefinition p)
The current story.
@Nullable public ClientStep getStep()
The current step.
public void setStep(@Nullable
ClientStep p)
The current step.
@Nullable public java.lang.String getStepName()
public void handle()
Handles the current request.
public long defaultDelay(int answerIndex)
@NotNull public ClientBus endRawText(@Nullable java.lang.CharSequence plainText, long delay)
@NotNull public ClientBus sendRawText(@Nullable java.lang.CharSequence plainText, long delay)
@NotNull public ClientBus send(@NotNull java.lang.CharSequence i18nText, @NotNull java.util.List<ai.tock.bot.api.model.message.bot.Suggestion> suggestions, long delay, @NotNull java.lang.Object... i18nArgs)
Sends a text with suggestions.
@NotNull public ClientBus end(@NotNull java.lang.CharSequence i18nText, @NotNull java.util.List<ai.tock.bot.api.model.message.bot.Suggestion> suggestions, long delay, @NotNull java.lang.Object... i18nArgs)
Sends a text with suggestions as last bot answer.
@NotNull public ClientBus end(@NotNull ai.tock.bot.api.model.message.bot.Card card)
Sends a Card as last bot answer.
@NotNull public ClientBus end(@NotNull ai.tock.bot.api.model.message.bot.Carousel carousel)
Sends a [Carousel as last bot answer.
@NotNull public ClientBus send(@NotNull ai.tock.bot.api.model.message.bot.Carousel carousel)
Sends a Carousel.
@NotNull public ClientBus send(@NotNull ai.tock.bot.api.model.message.bot.Card card)
Sends a Card.
@NotNull public ClientBus withMessage(@NotNull ai.tock.bot.connector.ConnectorType connectorType, @NotNull kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.ConnectorMessage> messageProvider)
@NotNull public ClientBus withMessage(@NotNull ai.tock.bot.connector.ConnectorType connectorType, @NotNull java.lang.String connectorId, @NotNull kotlin.jvm.functions.Function0<? extends ai.tock.bot.connector.ConnectorMessage> messageProvider)
@NotNull
public ai.tock.translator.I18nLabelValue i18n(@NotNull
java.lang.CharSequence defaultLabel,
@NotNull
java.util.List<? extends java.lang.Object> args)
@NotNull public ClientBotDefinition getBotDefinition()
The bot definition.
@NotNull public java.lang.String getRequestId()
@NotNull public ai.tock.bot.api.model.UserRequest getRequest()
@NotNull public kotlin.jvm.functions.Function1<ai.tock.bot.api.model.BotResponse,kotlin.Unit> getSendAnswer()