Class UtteranceSpecification
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<UtteranceSpecification.Builder,UtteranceSpecification>
An object containing information about a specific utterance.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal StringThe name of the intent that the utterance is associated to.final StringThe name of the slot that the utterance is associated to.final LongThe duration in milliseconds of the audio associated with the utterance.final StringThe identifier of the alias of the bot that the utterance was made to.final StringThe identifier for the audio of the bot response.final List<UtteranceBotResponse> A list of objects containing information about the bot response to the utterance.final StringThe version of the bot that the utterance was made to.builder()final Stringchannel()The channel that is integrated with the bot that the utterance was made to.final InstantThe date and time when the conversation in which the utterance took place ended.final InstantThe date and time when the conversation in which the utterance took place began.final StringThe type of dialog action that the utterance is associated to.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the BotResponses property.final inthashCode()final StringThe input type of the utterance.final IntentStateThe state of the intent that the utterance is associated to.final StringThe state of the intent that the utterance is associated to.final StringlocaleId()The locale of the bot that the utterance was made to.final AnalyticsModalitymode()The mode of the session.final StringThe mode of the session.final StringThe output type of the utterance.static Class<? extends UtteranceSpecification.Builder> final StringThe identifier of the session that the utterance was made in.final StringThe slots that have been filled in the session by the time of the utterance.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final StringThe text of the utterance.final StringThe identifier of the request associated with the utterance.final InstantThe date and time when the utterance took place.final BooleanSpecifies whether the bot understood the utterance or not.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
botAliasId
The identifier of the alias of the bot that the utterance was made to.
- Returns:
- The identifier of the alias of the bot that the utterance was made to.
-
botVersion
The version of the bot that the utterance was made to.
- Returns:
- The version of the bot that the utterance was made to.
-
localeId
The locale of the bot that the utterance was made to.
- Returns:
- The locale of the bot that the utterance was made to.
-
sessionId
The identifier of the session that the utterance was made in.
- Returns:
- The identifier of the session that the utterance was made in.
-
channel
The channel that is integrated with the bot that the utterance was made to.
- Returns:
- The channel that is integrated with the bot that the utterance was made to.
-
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.
If the service returns an enum value that is not available in the current SDK version,
modewill returnAnalyticsModality.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frommodeAsString().- Returns:
- 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.
-
- See Also:
-
-
modeAsString
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.
If the service returns an enum value that is not available in the current SDK version,
modewill returnAnalyticsModality.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frommodeAsString().- Returns:
- 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.
-
- See Also:
-
-
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
sessionIdand anoriginatingRequestId.- Returns:
- The date and time when the conversation in which the utterance took place began. A conversation is
defined as a unique combination of a
sessionIdand anoriginatingRequestId.
-
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
sessionIdand anoriginatingRequestId.- Returns:
- The date and time when the conversation in which the utterance took place ended. A conversation is
defined as a unique combination of a
sessionIdand anoriginatingRequestId.
-
utterance
-
utteranceTimestamp
The date and time when the utterance took place.
- Returns:
- The date and time when the utterance took place.
-
audioVoiceDurationMillis
The duration in milliseconds of the audio associated with the utterance.
- Returns:
- The duration in milliseconds of the audio associated with the utterance.
-
utteranceUnderstood
Specifies whether the bot understood the utterance or not.
- Returns:
- Specifies whether the bot understood the utterance or not.
-
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:
- 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
-
-
-
-
outputType
The output type of the utterance. The possible values are as follows:
-
audio/mpeg -
audio/ogg -
audio/pcm (16 KHz) -
audio/(defaults tompeg) -
text/plain; charset=utf-8
- Returns:
- The output type of the utterance. The possible values are as follows:
-
audio/mpeg -
audio/ogg -
audio/pcm (16 KHz) -
audio/(defaults tompeg) -
text/plain; charset=utf-8
-
-
-
associatedIntentName
The name of the intent that the utterance is associated to.
- Returns:
- The name of the intent that the utterance is associated to.
-
associatedSlotName
The name of the slot that the utterance is associated to.
- Returns:
- The name of the slot that the utterance is associated to.
-
intentState
The state of the intent that the utterance is associated to.
If the service returns an enum value that is not available in the current SDK version,
intentStatewill returnIntentState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromintentStateAsString().- Returns:
- The state of the intent that the utterance is associated to.
- See Also:
-
intentStateAsString
The state of the intent that the utterance is associated to.
If the service returns an enum value that is not available in the current SDK version,
intentStatewill returnIntentState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromintentStateAsString().- Returns:
- The state of the intent that the utterance is associated to.
- See Also:
-
dialogActionType
The type of dialog action that the utterance is associated to. See the
typefield in DialogAction for more information.- Returns:
- The type of dialog action that the utterance is associated to. See the
typefield in DialogAction for more information.
-
botResponseAudioVoiceId
The identifier for the audio of the bot response.
- Returns:
- The identifier for the audio of the bot response.
-
slotsFilledInSession
The slots that have been filled in the session by the time of the utterance.
- Returns:
- The slots that have been filled in the session by the time of the utterance.
-
utteranceRequestId
The identifier of the request associated with the utterance.
- Returns:
- The identifier of the request associated with the utterance.
-
hasBotResponses
public final boolean hasBotResponses()For responses, this returns true if the service returned a value for the BotResponses property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
botResponses
A list of objects containing information about the bot response to the utterance.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasBotResponses()method.- Returns:
- A list of objects containing information about the bot response to the utterance.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<UtteranceSpecification.Builder,UtteranceSpecification> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-