Interface UtteranceSpecification.Builder

    • Method Detail

      • botAliasId

        UtteranceSpecification.Builder botAliasId​(String botAliasId)

        The identifier of the alias of the bot that the utterance was made to.

        Parameters:
        botAliasId - The identifier of the alias of the bot that the utterance was made to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • botVersion

        UtteranceSpecification.Builder botVersion​(String botVersion)

        The version of the bot that the utterance was made to.

        Parameters:
        botVersion - The version of the bot that the utterance was made to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • localeId

        UtteranceSpecification.Builder localeId​(String localeId)

        The locale of the bot that the utterance was made to.

        Parameters:
        localeId - The locale of the bot that the utterance was made to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • sessionId

        UtteranceSpecification.Builder sessionId​(String sessionId)

        The identifier of the session that the utterance was made in.

        Parameters:
        sessionId - The identifier of the session that the utterance was made in.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • channel

        UtteranceSpecification.Builder channel​(String channel)

        The channel that is integrated with the bot that the utterance was made to.

        Parameters:
        channel - The channel that is integrated with the bot that the utterance was made to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • mode

        UtteranceSpecification.Builder mode​(String mode)

        The mode of the session. The possible values are as follows:

        • Speech – The session consisted of spoken dialogue.

        • Text – The session consisted of written dialogue.

        • DTMF – The session consisted of touch-tone keypad (Dual Tone Multi-Frequency) key presses.

        • MultiMode – The session consisted of multiple modes.

        Parameters:
        mode - The mode of the session. The possible values are as follows:

        • Speech – The session consisted of spoken dialogue.

        • Text – The session consisted of written dialogue.

        • DTMF – The session consisted of touch-tone keypad (Dual Tone Multi-Frequency) key presses.

        • MultiMode – The session consisted of multiple modes.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        AnalyticsModality, AnalyticsModality
      • mode

        UtteranceSpecification.Builder mode​(AnalyticsModality mode)

        The mode of the session. The possible values are as follows:

        • Speech – The session consisted of spoken dialogue.

        • Text – The session consisted of written dialogue.

        • DTMF – The session consisted of touch-tone keypad (Dual Tone Multi-Frequency) key presses.

        • MultiMode – The session consisted of multiple modes.

        Parameters:
        mode - The mode of the session. The possible values are as follows:

        • Speech – The session consisted of spoken dialogue.

        • Text – The session consisted of written dialogue.

        • DTMF – The session consisted of touch-tone keypad (Dual Tone Multi-Frequency) key presses.

        • MultiMode – The session consisted of multiple modes.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        AnalyticsModality, AnalyticsModality
      • conversationStartTime

        UtteranceSpecification.Builder conversationStartTime​(Instant conversationStartTime)

        The date and time when the conversation in which the utterance took place began. A conversation is defined as a unique combination of a sessionId and an originatingRequestId.

        Parameters:
        conversationStartTime - The date and time when the conversation in which the utterance took place began. A conversation is defined as a unique combination of a sessionId and an originatingRequestId.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • conversationEndTime

        UtteranceSpecification.Builder conversationEndTime​(Instant conversationEndTime)

        The date and time when the conversation in which the utterance took place ended. A conversation is defined as a unique combination of a sessionId and an originatingRequestId.

        Parameters:
        conversationEndTime - The date and time when the conversation in which the utterance took place ended. A conversation is defined as a unique combination of a sessionId and an originatingRequestId.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • utterance

        UtteranceSpecification.Builder utterance​(String utterance)

        The text of the utterance.

        Parameters:
        utterance - The text of the utterance.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • utteranceTimestamp

        UtteranceSpecification.Builder utteranceTimestamp​(Instant utteranceTimestamp)

        The date and time when the utterance took place.

        Parameters:
        utteranceTimestamp - The date and time when the utterance took place.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • audioVoiceDurationMillis

        UtteranceSpecification.Builder audioVoiceDurationMillis​(Long audioVoiceDurationMillis)

        The duration in milliseconds of the audio associated with the utterance.

        Parameters:
        audioVoiceDurationMillis - The duration in milliseconds of the audio associated with the utterance.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • utteranceUnderstood

        UtteranceSpecification.Builder utteranceUnderstood​(Boolean utteranceUnderstood)

        Specifies whether the bot understood the utterance or not.

        Parameters:
        utteranceUnderstood - Specifies whether the bot understood the utterance or not.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • inputType

        UtteranceSpecification.Builder inputType​(String inputType)

        The input type of the utterance. The possible values are as follows:

        • PCM format: audio data must be in little-endian byte order.

          • audio/l16; rate=16000; channels=1

          • audio/x-l16; sample-rate=16000; channel-count=1

          • audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false

        • Opus format

          • audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4

        • Text format

          • text/plain; charset=utf-8

        Parameters:
        inputType - The input type of the utterance. The possible values are as follows:

        • PCM format: audio data must be in little-endian byte order.

          • audio/l16; rate=16000; channels=1

          • audio/x-l16; sample-rate=16000; channel-count=1

          • audio/lpcm; sample-rate=8000; sample-size-bits=16; channel-count=1; is-big-endian=false

        • Opus format

          • audio/x-cbr-opus-with-preamble;preamble-size=0;bit-rate=256000;frame-size-milliseconds=4

        • Text format

          • text/plain; charset=utf-8

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • outputType

        UtteranceSpecification.Builder outputType​(String outputType)

        The output type of the utterance. The possible values are as follows:

        • audio/mpeg

        • audio/ogg

        • audio/pcm (16 KHz)

        • audio/ (defaults to mpeg)

        • text/plain; charset=utf-8

        Parameters:
        outputType - The output type of the utterance. The possible values are as follows:

        • audio/mpeg

        • audio/ogg

        • audio/pcm (16 KHz)

        • audio/ (defaults to mpeg)

        • text/plain; charset=utf-8

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • associatedIntentName

        UtteranceSpecification.Builder associatedIntentName​(String associatedIntentName)

        The name of the intent that the utterance is associated to.

        Parameters:
        associatedIntentName - The name of the intent that the utterance is associated to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • associatedSlotName

        UtteranceSpecification.Builder associatedSlotName​(String associatedSlotName)

        The name of the slot that the utterance is associated to.

        Parameters:
        associatedSlotName - The name of the slot that the utterance is associated to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • intentState

        UtteranceSpecification.Builder intentState​(String intentState)

        The state of the intent that the utterance is associated to.

        Parameters:
        intentState - The state of the intent that the utterance is associated to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        IntentState, IntentState
      • intentState

        UtteranceSpecification.Builder intentState​(IntentState intentState)

        The state of the intent that the utterance is associated to.

        Parameters:
        intentState - The state of the intent that the utterance is associated to.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        IntentState, IntentState
      • dialogActionType

        UtteranceSpecification.Builder dialogActionType​(String dialogActionType)

        The type of dialog action that the utterance is associated to. See the type field in DialogAction for more information.

        Parameters:
        dialogActionType - The type of dialog action that the utterance is associated to. See the type field in DialogAction for more information.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • botResponseAudioVoiceId

        UtteranceSpecification.Builder botResponseAudioVoiceId​(String botResponseAudioVoiceId)

        The identifier for the audio of the bot response.

        Parameters:
        botResponseAudioVoiceId - The identifier for the audio of the bot response.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • slotsFilledInSession

        UtteranceSpecification.Builder slotsFilledInSession​(String slotsFilledInSession)

        The slots that have been filled in the session by the time of the utterance.

        Parameters:
        slotsFilledInSession - The slots that have been filled in the session by the time of the utterance.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • utteranceRequestId

        UtteranceSpecification.Builder utteranceRequestId​(String utteranceRequestId)

        The identifier of the request associated with the utterance.

        Parameters:
        utteranceRequestId - The identifier of the request associated with the utterance.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • botResponses

        UtteranceSpecification.Builder botResponses​(Collection<UtteranceBotResponse> botResponses)

        A list of objects containing information about the bot response to the utterance.

        Parameters:
        botResponses - A list of objects containing information about the bot response to the utterance.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • botResponses

        UtteranceSpecification.Builder botResponses​(UtteranceBotResponse... botResponses)

        A list of objects containing information about the bot response to the utterance.

        Parameters:
        botResponses - A list of objects containing information about the bot response to the utterance.
        Returns:
        Returns a reference to this object so that method calls can be chained together.