Class AudioResponseEvent
- java.lang.Object
-
- software.amazon.awssdk.services.lexruntimev2.model.AudioResponseEvent
-
- All Implemented Interfaces:
Serializable,SdkPojo,StartConversationResponseEventStream,ToCopyableBuilder<AudioResponseEvent.Builder,AudioResponseEvent>
- Direct Known Subclasses:
DefaultAudioResponseEvent
@Generated("software.amazon.awssdk:codegen") public class AudioResponseEvent extends Object implements SdkPojo, Serializable, ToCopyableBuilder<AudioResponseEvent.Builder,AudioResponseEvent>, StartConversationResponseEventStream
An event sent from Amazon Lex V2 to your client application containing audio to play to the user.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAudioResponseEvent.Builderprotected static classAudioResponseEvent.BuilderImpl-
Nested classes/interfaces inherited from interface software.amazon.awssdk.services.lexruntimev2.model.StartConversationResponseEventStream
StartConversationResponseEventStream.EventType
-
-
Field Summary
-
Fields inherited from interface software.amazon.awssdk.services.lexruntimev2.model.StartConversationResponseEventStream
UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAudioResponseEvent(AudioResponseEvent.BuilderImpl builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StartConversationResponseHandler.Visitor visitor)Calls the appropriate visit method depending on the subtype ofAudioResponseEvent.SdkBytesaudioChunk()A chunk of the audio to play.static AudioResponseEvent.Builderbuilder()StringcontentType()The encoding of the audio chunk.AudioResponseEventcopy(Consumer<? super AudioResponseEvent.Builder> modifier)booleanequals(Object obj)booleanequalsBySdkFields(Object obj)StringeventId()A unique identifier of the event sent by Amazon Lex V2.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends AudioResponseEvent.Builder>serializableBuilderClass()AudioResponseEvent.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.services.lexruntimev2.model.StartConversationResponseEventStream
sdkEventType
-
-
-
-
Constructor Detail
-
AudioResponseEvent
protected AudioResponseEvent(AudioResponseEvent.BuilderImpl builder)
-
-
Method Detail
-
audioChunk
public final SdkBytes audioChunk()
A chunk of the audio to play.
- Returns:
- A chunk of the audio to play.
-
contentType
public final String contentType()
The encoding of the audio chunk. This is the same as the encoding configure in the
contentTypefield of theConfigurationEvent.- Returns:
- The encoding of the audio chunk. This is the same as the encoding configure in the
contentTypefield of theConfigurationEvent.
-
eventId
public final String eventId()
A unique identifier of the event sent by Amazon Lex V2. The identifier is in the form
RESPONSE-N, where N is a number starting with one and incremented for each event sent by Amazon Lex V2 in the current session.- Returns:
- A unique identifier of the event sent by Amazon Lex V2. The identifier is in the form
RESPONSE-N, where N is a number starting with one and incremented for each event sent by Amazon Lex V2 in the current session.
-
toBuilder
public AudioResponseEvent.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<AudioResponseEvent.Builder,AudioResponseEvent>
-
builder
public static AudioResponseEvent.Builder builder()
-
serializableBuilderClass
public static Class<? extends AudioResponseEvent.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.
-
copy
public final AudioResponseEvent copy(Consumer<? super AudioResponseEvent.Builder> modifier)
- Specified by:
copyin interfaceToCopyableBuilder<AudioResponseEvent.Builder,AudioResponseEvent>
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
accept
public void accept(StartConversationResponseHandler.Visitor visitor)
Calls the appropriate visit method depending on the subtype ofAudioResponseEvent.- Specified by:
acceptin interfaceStartConversationResponseEventStream- Parameters:
visitor- Visitor to invoke.
-
-