public class PutSessionRequest extends AmazonWebServiceRequest implements java.io.Serializable
Creates a new session or modifies an existing session with an Amazon Lex bot. Use this operation to enable your application to set the state of the bot.
For more information, see Managing Sessions.
Constructor and Description |
---|
PutSessionRequest() |
Modifier and Type | Method and Description |
---|---|
PutSessionRequest |
addsessionAttributesEntry(java.lang.String key,
java.lang.String value)
Map of key/value pairs representing the session-specific context
information.
|
PutSessionRequest |
clearsessionAttributesEntries()
Removes all the entries added into sessionAttributes.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAccept()
The message that Amazon Lex returns in the response can be either text or
speech based depending on the value of this field.
|
java.lang.String |
getBotAlias()
The alias in use for the bot that contains the session data.
|
java.lang.String |
getBotName()
The name of the bot that contains the session data.
|
DialogAction |
getDialogAction()
Sets the next action that the bot should take to fulfill the
conversation.
|
java.util.List<IntentSummary> |
getRecentIntentSummaryView()
A summary of the recent intents for the bot.
|
java.util.Map<java.lang.String,java.lang.String> |
getSessionAttributes()
Map of key/value pairs representing the session-specific context
information.
|
java.lang.String |
getUserId()
The ID of the client application user.
|
int |
hashCode() |
void |
setAccept(java.lang.String accept)
The message that Amazon Lex returns in the response can be either text or
speech based depending on the value of this field.
|
void |
setBotAlias(java.lang.String botAlias)
The alias in use for the bot that contains the session data.
|
void |
setBotName(java.lang.String botName)
The name of the bot that contains the session data.
|
void |
setDialogAction(DialogAction dialogAction)
Sets the next action that the bot should take to fulfill the
conversation.
|
void |
setRecentIntentSummaryView(java.util.Collection<IntentSummary> recentIntentSummaryView)
A summary of the recent intents for the bot.
|
void |
setSessionAttributes(java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
Map of key/value pairs representing the session-specific context
information.
|
void |
setUserId(java.lang.String userId)
The ID of the client application user.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutSessionRequest |
withAccept(java.lang.String accept)
The message that Amazon Lex returns in the response can be either text or
speech based depending on the value of this field.
|
PutSessionRequest |
withBotAlias(java.lang.String botAlias)
The alias in use for the bot that contains the session data.
|
PutSessionRequest |
withBotName(java.lang.String botName)
The name of the bot that contains the session data.
|
PutSessionRequest |
withDialogAction(DialogAction dialogAction)
Sets the next action that the bot should take to fulfill the
conversation.
|
PutSessionRequest |
withRecentIntentSummaryView(java.util.Collection<IntentSummary> recentIntentSummaryView)
A summary of the recent intents for the bot.
|
PutSessionRequest |
withRecentIntentSummaryView(IntentSummary... recentIntentSummaryView)
A summary of the recent intents for the bot.
|
PutSessionRequest |
withSessionAttributes(java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
Map of key/value pairs representing the session-specific context
information.
|
PutSessionRequest |
withUserId(java.lang.String userId)
The ID of the client application user.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getBotName()
The name of the bot that contains the session data.
The name of the bot that contains the session data.
public void setBotName(java.lang.String botName)
The name of the bot that contains the session data.
botName
- The name of the bot that contains the session data.
public PutSessionRequest withBotName(java.lang.String botName)
The name of the bot that contains the session data.
Returns a reference to this object so that method calls can be chained together.
botName
- The name of the bot that contains the session data.
public java.lang.String getBotAlias()
The alias in use for the bot that contains the session data.
The alias in use for the bot that contains the session data.
public void setBotAlias(java.lang.String botAlias)
The alias in use for the bot that contains the session data.
botAlias
- The alias in use for the bot that contains the session data.
public PutSessionRequest withBotAlias(java.lang.String botAlias)
The alias in use for the bot that contains the session data.
Returns a reference to this object so that method calls can be chained together.
botAlias
- The alias in use for the bot that contains the session data.
public java.lang.String getUserId()
The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.
Constraints:
Length: 2 - 100
Pattern: [0-9a-zA-Z._:-]+
The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.
public void setUserId(java.lang.String userId)
The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.
Constraints:
Length: 2 - 100
Pattern: [0-9a-zA-Z._:-]+
userId
- The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.
public PutSessionRequest withUserId(java.lang.String userId)
The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 2 - 100
Pattern: [0-9a-zA-Z._:-]+
userId
- The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot.
public java.util.Map<java.lang.String,java.lang.String> getSessionAttributes()
Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.
Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.
public void setSessionAttributes(java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.
sessionAttributes
- Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.
public PutSessionRequest withSessionAttributes(java.util.Map<java.lang.String,java.lang.String> sessionAttributes)
Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.
Returns a reference to this object so that method calls can be chained together.
sessionAttributes
- Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.
public PutSessionRequest addsessionAttributesEntry(java.lang.String key, java.lang.String value)
Map of key/value pairs representing the session-specific context information. It contains application information passed between Amazon Lex and a client application.
The method adds a new key-value pair into sessionAttributes parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into sessionAttributes.value
- The corresponding value of the entry to be added into
sessionAttributes.public PutSessionRequest clearsessionAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public DialogAction getDialogAction()
Sets the next action that the bot should take to fulfill the conversation.
Sets the next action that the bot should take to fulfill the conversation.
public void setDialogAction(DialogAction dialogAction)
Sets the next action that the bot should take to fulfill the conversation.
dialogAction
- Sets the next action that the bot should take to fulfill the conversation.
public PutSessionRequest withDialogAction(DialogAction dialogAction)
Sets the next action that the bot should take to fulfill the conversation.
Returns a reference to this object so that method calls can be chained together.
dialogAction
- Sets the next action that the bot should take to fulfill the conversation.
public java.util.List<IntentSummary> getRecentIntentSummaryView()
A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.
An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:
intentName
slot names
slotToElict
If you send the recentIntentSummaryView
parameter in a
PutSession
request, the contents of the new summary view
replaces the old summary view. For example, if a GetSession
request returns three intents in the summary view and you call
PutSession
with one intent in the summary view, the next
call to GetSession
will only return one intent.
A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.
An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:
intentName
slot names
slotToElict
If you send the recentIntentSummaryView
parameter in
a PutSession
request, the contents of the new
summary view replaces the old summary view. For example, if a
GetSession
request returns three intents in the
summary view and you call PutSession
with one intent
in the summary view, the next call to GetSession
will only return one intent.
public void setRecentIntentSummaryView(java.util.Collection<IntentSummary> recentIntentSummaryView)
A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.
An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:
intentName
slot names
slotToElict
If you send the recentIntentSummaryView
parameter in a
PutSession
request, the contents of the new summary view
replaces the old summary view. For example, if a GetSession
request returns three intents in the summary view and you call
PutSession
with one intent in the summary view, the next
call to GetSession
will only return one intent.
recentIntentSummaryView
- A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.
An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:
intentName
slot names
slotToElict
If you send the recentIntentSummaryView
parameter
in a PutSession
request, the contents of the new
summary view replaces the old summary view. For example, if a
GetSession
request returns three intents in the
summary view and you call PutSession
with one
intent in the summary view, the next call to
GetSession
will only return one intent.
public PutSessionRequest withRecentIntentSummaryView(IntentSummary... recentIntentSummaryView)
A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.
An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:
intentName
slot names
slotToElict
If you send the recentIntentSummaryView
parameter in a
PutSession
request, the contents of the new summary view
replaces the old summary view. For example, if a GetSession
request returns three intents in the summary view and you call
PutSession
with one intent in the summary view, the next
call to GetSession
will only return one intent.
Returns a reference to this object so that method calls can be chained together.
recentIntentSummaryView
- A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.
An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:
intentName
slot names
slotToElict
If you send the recentIntentSummaryView
parameter
in a PutSession
request, the contents of the new
summary view replaces the old summary view. For example, if a
GetSession
request returns three intents in the
summary view and you call PutSession
with one
intent in the summary view, the next call to
GetSession
will only return one intent.
public PutSessionRequest withRecentIntentSummaryView(java.util.Collection<IntentSummary> recentIntentSummaryView)
A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.
An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:
intentName
slot names
slotToElict
If you send the recentIntentSummaryView
parameter in a
PutSession
request, the contents of the new summary view
replaces the old summary view. For example, if a GetSession
request returns three intents in the summary view and you call
PutSession
with one intent in the summary view, the next
call to GetSession
will only return one intent.
Returns a reference to this object so that method calls can be chained together.
recentIntentSummaryView
- A summary of the recent intents for the bot. You can use the intent summary view to set a checkpoint label on an intent and modify attributes of intents. You can also use it to remove or add intent summary objects to the list.
An intent that you modify or add to the list must make sense for the bot. For example, the intent name must be valid for the bot. You must provide valid values for:
intentName
slot names
slotToElict
If you send the recentIntentSummaryView
parameter
in a PutSession
request, the contents of the new
summary view replaces the old summary view. For example, if a
GetSession
request returns three intents in the
summary view and you call PutSession
with one
intent in the summary view, the next call to
GetSession
will only return one intent.
public java.lang.String getAccept()
The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.
If the value is text/plain; charset=utf-8
, Amazon Lex
returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech
in the response. Amazon Lex uses Amazon Polly to generate the speech in
the configuration that you specify. For example, if you specify
audio/mpeg
as the value, Amazon Lex returns speech in the
MPEG format.
If the value is audio/pcm
, the speech is returned as
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
The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.
If the value is text/plain; charset=utf-8
, Amazon
Lex returns text in the response.
If the value begins with audio/
, Amazon Lex returns
speech in the response. Amazon Lex uses Amazon Polly to generate
the speech in the configuration that you specify. For example, if
you specify audio/mpeg
as the value, Amazon Lex
returns speech in the MPEG format.
If the value is audio/pcm
, the speech is returned as
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
public void setAccept(java.lang.String accept)
The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.
If the value is text/plain; charset=utf-8
, Amazon Lex
returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech
in the response. Amazon Lex uses Amazon Polly to generate the speech in
the configuration that you specify. For example, if you specify
audio/mpeg
as the value, Amazon Lex returns speech in the
MPEG format.
If the value is audio/pcm
, the speech is returned as
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
accept
- The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.
If the value is text/plain; charset=utf-8
, Amazon
Lex returns text in the response.
If the value begins with audio/
, Amazon Lex
returns speech in the response. Amazon Lex uses Amazon Polly
to generate the speech in the configuration that you specify.
For example, if you specify audio/mpeg
as the
value, Amazon Lex returns speech in the MPEG format.
If the value is audio/pcm
, the speech is returned
as 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
public PutSessionRequest withAccept(java.lang.String accept)
The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.
If the value is text/plain; charset=utf-8
, Amazon Lex
returns text in the response.
If the value begins with audio/
, Amazon Lex returns speech
in the response. Amazon Lex uses Amazon Polly to generate the speech in
the configuration that you specify. For example, if you specify
audio/mpeg
as the value, Amazon Lex returns speech in the
MPEG format.
If the value is audio/pcm
, the speech is returned as
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 a reference to this object so that method calls can be chained together.
accept
- The message that Amazon Lex returns in the response can be either text or speech based depending on the value of this field.
If the value is text/plain; charset=utf-8
, Amazon
Lex returns text in the response.
If the value begins with audio/
, Amazon Lex
returns speech in the response. Amazon Lex uses Amazon Polly
to generate the speech in the configuration that you specify.
For example, if you specify audio/mpeg
as the
value, Amazon Lex returns speech in the MPEG format.
If the value is audio/pcm
, the speech is returned
as 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
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.