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 String
The name of the intent that the utterance is associated to.final String
The name of the slot that the utterance is associated to.final Long
The duration in milliseconds of the audio associated with the utterance.final String
The identifier of the alias of the bot that the utterance was made to.final String
The 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 String
The version of the bot that the utterance was made to.builder()
final String
channel()
The channel that is integrated with the bot that the utterance was made to.final Instant
The date and time when the conversation in which the utterance took place ended.final Instant
The date and time when the conversation in which the utterance took place began.final String
The type of dialog action that the utterance is associated to.final boolean
final boolean
equalsBySdkFields
(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 boolean
For responses, this returns true if the service returned a value for the BotResponses property.final int
hashCode()
final String
The input type of the utterance.final IntentState
The state of the intent that the utterance is associated to.final String
The state of the intent that the utterance is associated to.final String
localeId()
The locale of the bot that the utterance was made to.final AnalyticsModality
mode()
The mode of the session.final String
The mode of the session.final String
The output type of the utterance.static Class
<? extends UtteranceSpecification.Builder> final String
The identifier of the session that the utterance was made in.final String
The 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 String
toString()
Returns a string representation of this object.final String
The text of the utterance.final String
The identifier of the request associated with the utterance.final Instant
The date and time when the utterance took place.final Boolean
Specifies 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,
mode
will 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,
mode
will 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
sessionId
and 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
sessionId
and 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
sessionId
and 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
sessionId
and 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,
intentState
will 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,
intentState
will 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
type
field in DialogAction for more information.- Returns:
- The type of dialog action that the utterance is associated to. See the
type
field 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:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<UtteranceSpecification.Builder,
UtteranceSpecification> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in 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:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-