/* * Copyright 2018-2023 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.lexruntime.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutSessionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* 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. *
*/ 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. *
* * @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. *
* * @return The name of the bot that contains the session data. */ public String getBotName() { return this.botName; } /** ** The name of the bot that contains the session data. *
* * @param botName * The name of the bot that contains the session data. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSessionRequest withBotName(String botName) { setBotName(botName); return this; } /** ** 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. *
* * @return The alias in use for the bot that contains the session data. */ public String getBotAlias() { return this.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. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSessionRequest withBotAlias(String botAlias) { setBotAlias(botAlias); return this; } /** ** The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. *
* * @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. *
* * @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 this.userId; } /** ** The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. *
* * @param userId * The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your * bot. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSessionRequest withUserId(String userId) { setUserId(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. *
* * @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 Returns a reference to this object so that method calls can be chained together. */ public PutSessionRequest withSessionAttributes(java.util.Map* Sets the next action that the bot should take to fulfill the conversation. *
* * @param dialogAction * Sets the next action that the bot should take to fulfill the conversation. */ public void setDialogAction(DialogAction dialogAction) { this.dialogAction = dialogAction; } /** ** Sets the next action that the bot should take to fulfill the conversation. *
* * @return Sets the next action that the bot should take to fulfill the conversation. */ public DialogAction getDialogAction() { return this.dialogAction; } /** ** Sets the next action that the bot should take to fulfill the conversation. *
* * @param dialogAction * Sets the next action that the bot should take to fulfill the conversation. * @return Returns a reference to this object so that method calls can be chained together. */ public PutSessionRequest withDialogAction(DialogAction dialogAction) { setDialogAction(dialogAction); return this; } /** ** 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.
*
* 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
* 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 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.util.List
*
* 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.
*
* 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
* 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
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRecentIntentSummaryView(java.util.Collection)} or
* {@link #withRecentIntentSummaryView(java.util.Collection)} if you want to override the existing values.
* 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
*
* 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.
*
* 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
* 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 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 Returns a reference to this object so that method calls can be chained together.
*/
public PutSessionRequest withRecentIntentSummaryView(IntentSummary... recentIntentSummaryView) {
if (this.recentIntentSummaryView == null) {
setRecentIntentSummaryView(new java.util.ArrayList
*
* 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.
*
* 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
* 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:
*
*
*
*
*
* 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 Returns a reference to this object so that method calls can be chained together.
*/
public PutSessionRequest withRecentIntentSummaryView(java.util.Collection
*
*
* @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.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
*
* 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
*
* 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
*
* 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. *
* * @return 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.
*/
public java.util.List
* 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.
*
* 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.
*/
public void setActiveContexts(java.util.Collection
* 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.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setActiveContexts(java.util.Collection)} or {@link #withActiveContexts(java.util.Collection)} if you want
* to override the existing values.
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSessionRequest withActiveContexts(ActiveContext... activeContexts) {
if (this.activeContexts == null) {
setActiveContexts(new java.util.ArrayList
* 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.
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSessionRequest withActiveContexts(java.util.Collection