Class UtteranceSpecification
- java.lang.Object
-
- software.amazon.awssdk.services.lexmodelsv2.model.UtteranceSpecification
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<UtteranceSpecification.Builder,UtteranceSpecification>
@Generated("software.amazon.awssdk:codegen") public final class UtteranceSpecification extends Object implements SdkPojo, Serializable, ToCopyableBuilder<UtteranceSpecification.Builder,UtteranceSpecification>
An object containing information about a specific utterance.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceUtteranceSpecification.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringassociatedIntentName()The name of the intent that the utterance is associated to.StringassociatedSlotName()The name of the slot that the utterance is associated to.LongaudioVoiceDurationMillis()The duration in milliseconds of the audio associated with the utterance.StringbotAliasId()The identifier of the alias of the bot that the utterance was made to.StringbotResponseAudioVoiceId()The identifier for the audio of the bot response.List<UtteranceBotResponse>botResponses()A list of objects containing information about the bot response to the utterance.StringbotVersion()The version of the bot that the utterance was made to.static UtteranceSpecification.Builderbuilder()Stringchannel()The channel that is integrated with the bot that the utterance was made to.InstantconversationEndTime()The date and time when the conversation in which the utterance took place ended.InstantconversationStartTime()The date and time when the conversation in which the utterance took place began.StringdialogActionType()The type of dialog action that the utterance is associated to.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasBotResponses()For responses, this returns true if the service returned a value for the BotResponses property.inthashCode()StringinputType()The input type of the utterance.IntentStateintentState()The state of the intent that the utterance is associated to.StringintentStateAsString()The state of the intent that the utterance is associated to.StringlocaleId()The locale of the bot that the utterance was made to.AnalyticsModalitymode()The mode of the session.StringmodeAsString()The mode of the session.StringoutputType()The output type of the utterance.List<SdkField<?>>sdkFields()static Class<? extends UtteranceSpecification.Builder>serializableBuilderClass()StringsessionId()The identifier of the session that the utterance was made in.StringslotsFilledInSession()The slots that have been filled in the session by the time of the utterance.UtteranceSpecification.BuildertoBuilder()StringtoString()Returns a string representation of this object.Stringutterance()The text of the utterance.StringutteranceRequestId()The identifier of the request associated with the utterance.InstantutteranceTimestamp()The date and time when the utterance took place.BooleanutteranceUnderstood()Specifies whether the bot understood the utterance or not.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
botAliasId
public final String 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
public final String 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
public final String 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
public final String 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
public final String 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
public final 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.
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:
AnalyticsModality
-
-
modeAsString
public final String 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:
AnalyticsModality
-
-
conversationStartTime
public final 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
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
public final 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
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
public final String utterance()
The text of the utterance.
- Returns:
- The text of the utterance.
-
utteranceTimestamp
public final Instant utteranceTimestamp()
The date and time when the utterance took place.
- Returns:
- The date and time when the utterance took place.
-
audioVoiceDurationMillis
public final Long 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
public final Boolean utteranceUnderstood()
Specifies whether the bot understood the utterance or not.
- Returns:
- Specifies whether the bot understood the utterance or not.
-
inputType
public final 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
-
- 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
public final String 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
public final String 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
public final String 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
public final IntentState 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:
IntentState
-
intentStateAsString
public final String 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:
IntentState
-
dialogActionType
public final String 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
public final String botResponseAudioVoiceId()
The identifier for the audio of the bot response.
- Returns:
- The identifier for the audio of the bot response.
-
slotsFilledInSession
public final String 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
public final String 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
public final List<UtteranceBotResponse> 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
public UtteranceSpecification.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<UtteranceSpecification.Builder,UtteranceSpecification>
-
builder
public static UtteranceSpecification.Builder builder()
-
serializableBuilderClass
public static Class<? extends UtteranceSpecification.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-