Class ConfigurationEvent.BuilderImpl
- java.lang.Object
-
- software.amazon.awssdk.services.lexruntimev2.model.ConfigurationEvent.BuilderImpl
-
- All Implemented Interfaces:
SdkPojo,ConfigurationEvent.Builder,Buildable,CopyableBuilder<ConfigurationEvent.Builder,ConfigurationEvent>,SdkBuilder<ConfigurationEvent.Builder,ConfigurationEvent>
- Enclosing class:
- ConfigurationEvent
protected static class ConfigurationEvent.BuilderImpl extends Object implements ConfigurationEvent.Builder
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilderImpl()protectedBuilderImpl(ConfigurationEvent model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurationEventbuild()ConfigurationEvent.BuilderclientTimestampMillis(Long clientTimestampMillis)A timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.ConfigurationEvent.BuilderdisablePlayback(Boolean disablePlayback)Determines whether Amazon Lex V2 should send audio responses to the client application.ConfigurationEvent.BuildereventId(String eventId)A unique identifier that your application assigns to the event.LonggetClientTimestampMillis()BooleangetDisablePlayback()StringgetEventId()Map<String,String>getRequestAttributes()StringgetResponseContentType()SessionState.BuildergetSessionState()List<Message.Builder>getWelcomeMessages()ConfigurationEvent.BuilderrequestAttributes(Map<String,String> requestAttributes)Request-specific information passed between the client application and Amazon Lex V2.ConfigurationEvent.BuilderresponseContentType(String responseContentType)The message that Amazon Lex V2 returns in the response can be either text or speech based on theresponseContentTypevalue.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()ConfigurationEvent.BuildersessionState(SessionState sessionState)Sets the value of the SessionState property for this object.voidsetClientTimestampMillis(Long clientTimestampMillis)voidsetDisablePlayback(Boolean disablePlayback)voidsetEventId(String eventId)voidsetRequestAttributes(Map<String,String> requestAttributes)voidsetResponseContentType(String responseContentType)voidsetSessionState(software.amazon.awssdk.services.lexruntimev2.model.SessionState.BuilderImpl sessionState)voidsetWelcomeMessages(Collection<software.amazon.awssdk.services.lexruntimev2.model.Message.BuilderImpl> welcomeMessages)ConfigurationEvent.BuilderwelcomeMessages(Collection<Message> welcomeMessages)A list of messages to send to the user.ConfigurationEvent.BuilderwelcomeMessages(Consumer<Message.Builder>... welcomeMessages)A list of messages to send to the user.ConfigurationEvent.BuilderwelcomeMessages(Message... welcomeMessages)A list of messages to send to the user.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.services.lexruntimev2.model.ConfigurationEvent.Builder
sessionState
-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields
-
-
-
-
Constructor Detail
-
BuilderImpl
protected BuilderImpl()
-
BuilderImpl
protected BuilderImpl(ConfigurationEvent model)
-
-
Method Detail
-
requestAttributes
public final ConfigurationEvent.Builder requestAttributes(Map<String,String> requestAttributes)
Description copied from interface:ConfigurationEvent.BuilderRequest-specific information passed between the client application and Amazon Lex V2.
The namespace
x-amz-lex:is reserved for special attributes. Don't create any request attributes for prefixx-amz-lex:.- Specified by:
requestAttributesin interfaceConfigurationEvent.Builder- Parameters:
requestAttributes- Request-specific information passed between the client application and Amazon Lex V2.The namespace
x-amz-lex:is reserved for special attributes. Don't create any request attributes for prefixx-amz-lex:.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getResponseContentType
public final String getResponseContentType()
-
setResponseContentType
public final void setResponseContentType(String responseContentType)
-
responseContentType
public final ConfigurationEvent.Builder responseContentType(String responseContentType)
Description copied from interface:ConfigurationEvent.BuilderThe message that Amazon Lex V2 returns in the response can be either text or speech based on the
responseContentTypevalue.-
If the value is
text/plain;charset=utf-8, Amazon Lex V2 returns text in the response. -
If the value begins with
audio/, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech using the configuration that you specified in therequestContentTypeparameter. For example, if you specifyaudio/mpegas the value, Amazon Lex V2 returns speech in the MPEG format. -
If the value is
audio/pcm, the speech returned is audio/pcm in 16-bit, little-endian format. -
The following are the accepted values:
-
audio/mpeg
-
audio/ogg
-
audio/pcm
-
audio/* (defaults to mpeg)
-
text/plain; charset=utf-8
-
- Specified by:
responseContentTypein interfaceConfigurationEvent.Builder- Parameters:
responseContentType- The message that Amazon Lex V2 returns in the response can be either text or speech based on theresponseContentTypevalue.-
If the value is
text/plain;charset=utf-8, Amazon Lex V2 returns text in the response. -
If the value begins with
audio/, Amazon Lex V2 returns speech in the response. Amazon Lex V2 uses Amazon Polly to generate the speech using the configuration that you specified in therequestContentTypeparameter. For example, if you specifyaudio/mpegas the value, Amazon Lex V2 returns speech in the MPEG format. -
If the value is
audio/pcm, the speech returned is audio/pcm in 16-bit, little-endian format. -
The following are the accepted values:
-
audio/mpeg
-
audio/ogg
-
audio/pcm
-
audio/* (defaults to mpeg)
-
text/plain; charset=utf-8
-
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
getSessionState
public final SessionState.Builder getSessionState()
-
setSessionState
public final void setSessionState(software.amazon.awssdk.services.lexruntimev2.model.SessionState.BuilderImpl sessionState)
-
sessionState
public final ConfigurationEvent.Builder sessionState(SessionState sessionState)
Description copied from interface:ConfigurationEvent.BuilderSets the value of the SessionState property for this object.- Specified by:
sessionStatein interfaceConfigurationEvent.Builder- Parameters:
sessionState- The new value for the SessionState property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getWelcomeMessages
public final List<Message.Builder> getWelcomeMessages()
-
setWelcomeMessages
public final void setWelcomeMessages(Collection<software.amazon.awssdk.services.lexruntimev2.model.Message.BuilderImpl> welcomeMessages)
-
welcomeMessages
public final ConfigurationEvent.Builder welcomeMessages(Collection<Message> welcomeMessages)
Description copied from interface:ConfigurationEvent.BuilderA list of messages to send to the user.
If you set the
welcomeMessagefield, you must also set theDialogActionstructure'stypefield.- Specified by:
welcomeMessagesin interfaceConfigurationEvent.Builder- Parameters:
welcomeMessages- A list of messages to send to the user.If you set the
welcomeMessagefield, you must also set theDialogActionstructure'stypefield.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
welcomeMessages
@SafeVarargs public final ConfigurationEvent.Builder welcomeMessages(Message... welcomeMessages)
Description copied from interface:ConfigurationEvent.BuilderA list of messages to send to the user.
If you set the
welcomeMessagefield, you must also set theDialogActionstructure'stypefield.- Specified by:
welcomeMessagesin interfaceConfigurationEvent.Builder- Parameters:
welcomeMessages- A list of messages to send to the user.If you set the
welcomeMessagefield, you must also set theDialogActionstructure'stypefield.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
welcomeMessages
@SafeVarargs public final ConfigurationEvent.Builder welcomeMessages(Consumer<Message.Builder>... welcomeMessages)
Description copied from interface:ConfigurationEvent.BuilderA list of messages to send to the user.
If you set the
This is a convenience method that creates an instance of thewelcomeMessagefield, you must also set theDialogActionstructure'stypefield.Message.Builderavoiding the need to create one manually viaMessage.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#welcomeMessages(List.) - Specified by:
welcomeMessagesin interfaceConfigurationEvent.Builder- Parameters:
welcomeMessages- a consumer that will call methods onMessage.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#welcomeMessages(java.util.Collection)
-
getDisablePlayback
public final Boolean getDisablePlayback()
-
setDisablePlayback
public final void setDisablePlayback(Boolean disablePlayback)
-
disablePlayback
public final ConfigurationEvent.Builder disablePlayback(Boolean disablePlayback)
Description copied from interface:ConfigurationEvent.BuilderDetermines whether Amazon Lex V2 should send audio responses to the client application.
Set this field to false when the client is operating in a playback mode where audio responses are played to the user. If the client isn't operating in playback mode, such as a text chat application, set this to true so that Amazon Lex V2 doesn't wait for the prompt to finish playing on the client.
- Specified by:
disablePlaybackin interfaceConfigurationEvent.Builder- Parameters:
disablePlayback- Determines whether Amazon Lex V2 should send audio responses to the client application.Set this field to false when the client is operating in a playback mode where audio responses are played to the user. If the client isn't operating in playback mode, such as a text chat application, set this to true so that Amazon Lex V2 doesn't wait for the prompt to finish playing on the client.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getEventId
public final String getEventId()
-
setEventId
public final void setEventId(String eventId)
-
eventId
public final ConfigurationEvent.Builder eventId(String eventId)
Description copied from interface:ConfigurationEvent.BuilderA unique identifier that your application assigns to the event. You can use this to identify events in logs.
- Specified by:
eventIdin interfaceConfigurationEvent.Builder- Parameters:
eventId- A unique identifier that your application assigns to the event. You can use this to identify events in logs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getClientTimestampMillis
public final Long getClientTimestampMillis()
-
setClientTimestampMillis
public final void setClientTimestampMillis(Long clientTimestampMillis)
-
clientTimestampMillis
public final ConfigurationEvent.Builder clientTimestampMillis(Long clientTimestampMillis)
Description copied from interface:ConfigurationEvent.BuilderA timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.
- Specified by:
clientTimestampMillisin interfaceConfigurationEvent.Builder- Parameters:
clientTimestampMillis- A timestamp set by the client of the date and time that the event was sent to Amazon Lex V2.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
build
public ConfigurationEvent build()
- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<ConfigurationEvent.Builder,ConfigurationEvent>
-
sdkFieldNameToField
public Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-