Package 

Class AlexaTockMapper


  • 
    public class AlexaTockMapper
    
                        

    An Alexa model to Tock model mapper. Provided via addAlexaConnector.alexaTockMapper parameter.

    • Method Summary

      Modifier and Type Method Description
      String alexaIntentToTockIntent(IntentRequest request, BotDefinition botDefinition) Returns a Tock intent from an Alexa intent.
      Entity alexaEntityToTockEntity(IntentRequest request, String intent, String slot, BotDefinition botDefinition) Returns a Tock entity from an Alexa slot.
      NlpEntityValue alexaEntityToTockEntityValue(IntentRequest request, String intent, Slot slot, BotDefinition botDefinition, Integer index) Returns a Tock NlpEntityValue from an Alexa slot.
      Map<String, Slot> getSlots(IntentRequest request) Gets slots from the intent request.
      StartSessionEvent toStartSessionEvent(SpeechletRequestEnvelope<SessionStartedRequest> requestEnvelope) Returns a StartSessionEvent from an Alexa SessionStartedRequest.
      EndSessionEvent toEndSessionEvent(SpeechletRequestEnvelope<SessionEndedRequest> requestEnvelope) Returns a EndSessionEvent from an Alexa SessionEndedRequest.
      Event toEvent(String userId, IntentRequest request, BotDefinition botDefinition) Returns an Event from an Alexa IntentRequest.
      final String getApplicationId()
      • Methods inherited from class ai.tock.bot.connector.alexa.AlexaTockMapper

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AlexaTockMapper

        AlexaTockMapper(String applicationId)
    • Method Detail

      • alexaIntentToTockIntent

         String alexaIntentToTockIntent(IntentRequest request, BotDefinition botDefinition)

        Returns a Tock intent from an Alexa intent.

      • alexaEntityToTockEntity

         Entity alexaEntityToTockEntity(IntentRequest request, String intent, String slot, BotDefinition botDefinition)

        Returns a Tock entity from an Alexa slot.

      • alexaEntityToTockEntityValue

         NlpEntityValue alexaEntityToTockEntityValue(IntentRequest request, String intent, Slot slot, BotDefinition botDefinition, Integer index)

        Returns a Tock NlpEntityValue from an Alexa slot.

      • getSlots

         Map<String, Slot> getSlots(IntentRequest request)

        Gets slots from the intent request.

      • toStartSessionEvent

         StartSessionEvent toStartSessionEvent(SpeechletRequestEnvelope<SessionStartedRequest> requestEnvelope)

        Returns a StartSessionEvent from an Alexa SessionStartedRequest.

      • toEndSessionEvent

         EndSessionEvent toEndSessionEvent(SpeechletRequestEnvelope<SessionEndedRequest> requestEnvelope)

        Returns a EndSessionEvent from an Alexa SessionEndedRequest.

      • toEvent

         Event toEvent(String userId, IntentRequest request, BotDefinition botDefinition)

        Returns an Event from an Alexa IntentRequest.