/* * 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.lexruntimev2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information about the contexts that a user is using in a session. You can configure Amazon Lex V2 to set a * context when an intent is fulfilled, or you can set a context using the , , or operations. *
*
* Use a context to indicate to Amazon Lex V2 intents that should be used as follow-up intents. For example, if the
* active context is order-fulfilled
, only intents that have order-fulfilled
configured as a
* trigger are considered for follow up.
*
* The name of the context. *
*/ private String name; /** ** Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context * is no longer returned in a response. *
*/ private ActiveContextTimeToLive timeToLive; /** ** 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 V2 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.Map* The name of the context. *
* * @param name * The name of the context. */ public void setName(String name) { this.name = name; } /** ** The name of the context. *
* * @return The name of the context. */ public String getName() { return this.name; } /** ** The name of the context. *
* * @param name * The name of the context. * @return Returns a reference to this object so that method calls can be chained together. */ public ActiveContext withName(String name) { setName(name); return this; } /** ** Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context * is no longer returned in a response. *
* * @param timeToLive * Indicates the number of turns or seconds that the context is active. Once the time to live expires, the * context is no longer returned in a response. */ public void setTimeToLive(ActiveContextTimeToLive timeToLive) { this.timeToLive = timeToLive; } /** ** Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context * is no longer returned in a response. *
* * @return Indicates the number of turns or seconds that the context is active. Once the time to live expires, the * context is no longer returned in a response. */ public ActiveContextTimeToLive getTimeToLive() { return this.timeToLive; } /** ** Indicates the number of turns or seconds that the context is active. Once the time to live expires, the context * is no longer returned in a response. *
* * @param timeToLive * Indicates the number of turns or seconds that the context is active. Once the time to live expires, the * context is no longer returned in a response. * @return Returns a reference to this object so that method calls can be chained together. */ public ActiveContext withTimeToLive(ActiveContextTimeToLive timeToLive) { setTimeToLive(timeToLive); return this; } /** ** 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 V2 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 V2 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.Map
* 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 V2 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 V2 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 setContextAttributes(java.util.Map
* 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 V2 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 V2 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 ActiveContext withContextAttributes(java.util.Map