/* * Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.lexrts.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *
* 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. *
*/ public class PutSessionRequest extends AmazonWebServiceRequest implements Serializable { /** ** The name of the bot that contains the session data. *
*/ private String botName; /** ** The alias in use for the bot that contains the session data. *
*/ private String botAlias; /** ** 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._:-]+
*/
private String userId;
/**
*
* Map of key/value pairs representing the session-specific context * information. It contains application information passed between Amazon * Lex and a client application. *
*/ private java.util.Map* Sets the next action that the bot should take to fulfill the * conversation. *
*/ private DialogAction dialogAction; /** ** 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.
*
* 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
*
* A list of contexts active for the request. A context can be activated * when a previous intent is fulfilled, or by including the context in the * request, *
** If you don't specify a list of contexts, Amazon Lex will use the current * list of contexts for the session. If you specify an empty list, all * contexts for the session are cleared. *
*/ private java.util.List* The name of the bot that contains the session data. *
* * @return* The name of the bot that contains the session data. *
*/ public String getBotName() { return botName; } /** ** The name of the bot that contains the session data. *
* * @param botName* The name of the bot that contains the session data. *
*/ public void setBotName(String botName) { this.botName = 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. * * @param botName
* The name of the bot that contains the session data. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withBotName(String botName) { this.botName = botName; return this; } /** ** The alias in use for the bot that contains the session data. *
* * @return* The alias in use for the bot that contains the session data. *
*/ public String getBotAlias() { return botAlias; } /** ** The alias in use for the bot that contains the session data. *
* * @param botAlias* The alias in use for the bot that contains the session data. *
*/ public void setBotAlias(String botAlias) { this.botAlias = 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. * * @param botAlias
* The alias in use for the bot that contains the session data. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withBotAlias(String botAlias) { this.botAlias = botAlias; return this; } /** ** 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._:-]+
*
* @return
* The ID of the client application user. Amazon Lex uses this to * identify a user's conversation with your bot. *
*/ public String getUserId() { return 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._:-]+
*
* @param userId
* The ID of the client application user. Amazon Lex uses this to * identify a user's conversation with your bot. *
*/ public void setUserId(String userId) { this.userId = 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._:-]+
*
* @param userId
* The ID of the client application user. Amazon Lex uses this to * identify a user's conversation with your bot. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withUserId(String userId) { this.userId = userId; return this; } /** ** Map of key/value pairs representing the session-specific context * information. It contains application information passed between Amazon * Lex and a client application. *
* * @return* Map of key/value pairs representing the session-specific context * information. It contains application information passed between * Amazon Lex and a client application. *
*/ public java.util.Map* Map of key/value pairs representing the session-specific context * information. It contains application information passed between Amazon * Lex and a client application. *
* * @param 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 void setSessionAttributes(java.util.Map* 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. * * @param sessionAttributes
* Map of key/value pairs representing the session-specific * context information. It contains application information * passed between Amazon Lex and a client application. *
* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withSessionAttributes(java.util.Map* 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.
*
* @param key The key of the entry to be added into sessionAttributes.
* @param value The corresponding value of the entry to be added into
* sessionAttributes.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public PutSessionRequest addsessionAttributesEntry(String key, String value) {
if (null == this.sessionAttributes) {
this.sessionAttributes = new java.util.HashMap
* Returns a reference to this object so that method calls can be chained
* together.
*/
public PutSessionRequest clearsessionAttributesEntries() {
this.sessionAttributes = null;
return this;
}
/**
*
* 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.
*
* 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.
*
* 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.
*
* @param dialogAction
* Sets the next action that the bot should take to fulfill the
* conversation.
*
* 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:
*
*
* slot names
*
*
* If you send the
* 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:
*
*
* slot names
*
*
* If you send the
* 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:
*
*
* slot names
*
*
* If you send the
* 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:
*
*
* slot names
*
*
* If you send the
* 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:
*
*
* slot names
*
*
* If you send the
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param 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:
*
*
* slot names
*
*
* If you send the
* 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:
*
*
* slot names
*
*
* If you send the
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param 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:
*
*
* slot names
*
*
* If you send the
* 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
* If the value begins with
* If the value is
* The following are the accepted values:
*
*
*
*
*
*
* 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
* If the value begins with
* If the value is
* The following are the accepted values:
*
*
*
*
*
*
* 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
* If the value begins with
* If the value is
* The following are the accepted values:
*
*
*
*
*
*
* 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
* If the value begins with
* If the value is
* The following are the accepted values:
*
*
*
*
*
*
* 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
* If the value begins with
* If the value is
* The following are the accepted values:
*
*
*
*
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param 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
* If the value begins with
* If the value is
* The following are the accepted values:
*
*
*
*
*
*
* A list of contexts active for the request. A context can be activated
* when a previous intent is fulfilled, or by including the context in the
* request,
*
* If you don't specify a list of contexts, Amazon Lex will use the current
* list of contexts for the session. If you specify an empty list, all
* contexts for the session are cleared.
*
* A list of contexts active for the request. A context can be
* activated when a previous intent is fulfilled, or by including
* the context in the request,
*
* If you don't specify a list of contexts, Amazon Lex will use the
* current list of contexts for the session. If you specify an empty
* list, all contexts for the session are cleared.
*
* A list of contexts active for the request. A context can be activated
* when a previous intent is fulfilled, or by including the context in the
* request,
*
* If you don't specify a list of contexts, Amazon Lex will use the current
* list of contexts for the session. If you specify an empty list, all
* contexts for the session are cleared.
*
* A list of contexts active for the request. A context can be
* activated when a previous intent is fulfilled, or by including
* the context in the request,
*
* If you don't specify a list of contexts, Amazon Lex will use
* the current list of contexts for the session. If you specify
* an empty list, all contexts for the session are cleared.
*
* A list of contexts active for the request. A context can be activated
* when a previous intent is fulfilled, or by including the context in the
* request,
*
* If you don't specify a list of contexts, Amazon Lex will use the current
* list of contexts for the session. If you specify an empty list, all
* contexts for the session are cleared.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param activeContexts
* A list of contexts active for the request. A context can be
* activated when a previous intent is fulfilled, or by including
* the context in the request,
*
* If you don't specify a list of contexts, Amazon Lex will use
* the current list of contexts for the session. If you specify
* an empty list, all contexts for the session are cleared.
*
* A list of contexts active for the request. A context can be activated
* when a previous intent is fulfilled, or by including the context in the
* request,
*
* If you don't specify a list of contexts, Amazon Lex will use the current
* list of contexts for the session. If you specify an empty list, all
* contexts for the session are cleared.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param activeContexts
* A list of contexts active for the request. A context can be
* activated when a previous intent is fulfilled, or by including
* the context in the request,
*
* If you don't specify a list of contexts, Amazon Lex will use
* the current list of contexts for the session. If you specify
* an empty list, all contexts for the session are cleared.
*
*
* intentName
* slotToElict
* 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.
*
*
* intentName
* slotToElict
* 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.
*
*
* intentName
* slotToElict
* 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.
*
*
* intentName
* slotToElict
* 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.
*
*
* intentName
* slotToElict
* 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.
*
*
* intentName
* slotToElict
* 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.
*
*
* intentName
* slotToElict
* 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.
*
*
* intentName
* slotToElict
* 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.
*
*
*
* @return text/plain; charset=utf-8
, Amazon Lex
* returns text in the response.
* 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.
* audio/pcm
, the speech is returned as
* audio/pcm
in 16-bit, little endian format.
*
*
* audio/mpeg
* audio/ogg
* audio/pcm
* audio/*
(defaults to mpeg)
* text/plain; charset=utf-8
*
*
*/
public String getAccept() {
return accept;
}
/**
* text/plain; charset=utf-8
, Amazon
* Lex returns text in the response.
* 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.
* audio/pcm
, the speech is returned as
* audio/pcm
in 16-bit, little endian format.
*
*
* audio/mpeg
* audio/ogg
* audio/pcm
* audio/*
(defaults to mpeg)
* text/plain; charset=utf-8
*
*
*
* @param accept text/plain; charset=utf-8
, Amazon Lex
* returns text in the response.
* 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.
* audio/pcm
, the speech is returned as
* audio/pcm
in 16-bit, little endian format.
*
*
* audio/mpeg
* audio/ogg
* audio/pcm
* audio/*
(defaults to mpeg)
* text/plain; charset=utf-8
*
*
*/
public void setAccept(String accept) {
this.accept = accept;
}
/**
* text/plain; charset=utf-8
, Amazon
* Lex returns text in the response.
* 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.
* audio/pcm
, the speech is returned
* as audio/pcm
in 16-bit, little endian format.
*
*
* audio/mpeg
* audio/ogg
* audio/pcm
* audio/*
(defaults to mpeg)
* text/plain; charset=utf-8
*
*
* text/plain; charset=utf-8
, Amazon Lex
* returns text in the response.
* 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.
* audio/pcm
, the speech is returned as
* audio/pcm
in 16-bit, little endian format.
*
*
* audio/mpeg
* audio/ogg
* audio/pcm
* audio/*
(defaults to mpeg)
* text/plain; charset=utf-8
*
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public PutSessionRequest withAccept(String accept) {
this.accept = accept;
return this;
}
/**
* text/plain; charset=utf-8
, Amazon
* Lex returns text in the response.
* 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.
* audio/pcm
, the speech is returned
* as audio/pcm
in 16-bit, little endian format.
*
*
* audio/mpeg
* audio/ogg
* audio/pcm
* audio/*
(defaults to mpeg)
* text/plain; charset=utf-8
*