public class AlexaTockMapper
An Alexa model to Tock model mapper. Provided via addAlexaConnector.alexaTockMapper parameter.
public AlexaTockMapper(@NotNull
java.lang.String applicationId)
An Alexa model to Tock model mapper. Provided via addAlexaConnector.alexaTockMapper parameter.
@NotNull
public java.lang.String alexaIntentToTockIntent(@NotNull
com.amazon.speech.speechlet.IntentRequest request,
@NotNull
ai.tock.bot.definition.BotDefinition botDefinition)
Returns a Tock intent from an Alexa intent.
@Nullable
public ai.tock.nlp.api.client.model.Entity alexaEntityToTockEntity(@NotNull
com.amazon.speech.speechlet.IntentRequest request,
@NotNull
java.lang.String intent,
@NotNull
java.lang.String slot,
@NotNull
ai.tock.bot.definition.BotDefinition botDefinition)
Returns a Tock entity from an Alexa slot.
@NotNull
public ai.tock.nlp.api.client.model.NlpEntityValue alexaEntityToTockEntityValue(@NotNull
com.amazon.speech.speechlet.IntentRequest request,
@NotNull
java.lang.String intent,
@NotNull
com.amazon.speech.slu.Slot slot,
@NotNull
ai.tock.bot.definition.BotDefinition botDefinition,
int index)
Returns a Tock NlpEntityValue from an Alexa slot.
@Nullable
public java.util.Map<java.lang.String,com.amazon.speech.slu.Slot> getSlots(@NotNull
com.amazon.speech.speechlet.IntentRequest request)
Gets slots from the intent request.
@NotNull
public ai.tock.bot.engine.event.StartSessionEvent toStartSessionEvent(@NotNull
com.amazon.speech.json.SpeechletRequestEnvelope<com.amazon.speech.speechlet.SessionStartedRequest> requestEnvelope)
Returns a StartSessionEvent from an Alexa SessionStartedRequest.
@NotNull
public ai.tock.bot.engine.event.EndSessionEvent toEndSessionEvent(@NotNull
com.amazon.speech.json.SpeechletRequestEnvelope<com.amazon.speech.speechlet.SessionEndedRequest> requestEnvelope)
Returns a EndSessionEvent from an Alexa SessionEndedRequest.
@NotNull
public ai.tock.bot.engine.event.Event toEvent(@NotNull
java.lang.String userId,
@NotNull
com.amazon.speech.speechlet.IntentRequest request,
@NotNull
ai.tock.bot.definition.BotDefinition botDefinition)
Returns an Event from an Alexa IntentRequest.
@NotNull public java.lang.String getApplicationId()