/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include 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.See Also:
AWS
* API Reference
The name of the context.
*/ inline const Aws::String& GetName() const{ return m_name; } /** *The name of the context.
*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *The name of the context.
*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *The name of the context.
*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *The name of the context.
*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *The name of the context.
*/ inline ActiveContext& WithName(const Aws::String& value) { SetName(value); return *this;} /** *The name of the context.
*/ inline ActiveContext& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *The name of the context.
*/ inline ActiveContext& WithName(const char* value) { SetName(value); 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.
*/ inline const ActiveContextTimeToLive& GetTimeToLive() const{ return m_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.
*/ inline bool TimeToLiveHasBeenSet() const { return m_timeToLiveHasBeenSet; } /** *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.
*/ inline void SetTimeToLive(const ActiveContextTimeToLive& value) { m_timeToLiveHasBeenSet = true; m_timeToLive = value; } /** *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.
*/ inline void SetTimeToLive(ActiveContextTimeToLive&& value) { m_timeToLiveHasBeenSet = true; m_timeToLive = std::move(value); } /** *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.
*/ inline ActiveContext& WithTimeToLive(const ActiveContextTimeToLive& value) { SetTimeToLive(value); 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.
*/ inline ActiveContext& WithTimeToLive(ActiveContextTimeToLive&& value) { SetTimeToLive(std::move(value)); 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.
*/ inline const Aws::MapA 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.
*/ inline bool ContextAttributesHasBeenSet() const { return m_contextAttributesHasBeenSet; } /** *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.
*/ inline void SetContextAttributes(const Aws::MapA 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.
*/ inline void SetContextAttributes(Aws::MapA 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.
*/ inline ActiveContext& WithContextAttributes(const Aws::MapA 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.
*/ inline ActiveContext& WithContextAttributes(Aws::MapA 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.
*/ inline ActiveContext& AddContextAttributes(const Aws::String& key, const Aws::String& value) { m_contextAttributesHasBeenSet = true; m_contextAttributes.emplace(key, value); 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.
*/ inline ActiveContext& AddContextAttributes(Aws::String&& key, const Aws::String& value) { m_contextAttributesHasBeenSet = true; m_contextAttributes.emplace(std::move(key), value); 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.
*/ inline ActiveContext& AddContextAttributes(const Aws::String& key, Aws::String&& value) { m_contextAttributesHasBeenSet = true; m_contextAttributes.emplace(key, std::move(value)); 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.
*/ inline ActiveContext& AddContextAttributes(Aws::String&& key, Aws::String&& value) { m_contextAttributesHasBeenSet = true; m_contextAttributes.emplace(std::move(key), std::move(value)); 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.
*/ inline ActiveContext& AddContextAttributes(const char* key, Aws::String&& value) { m_contextAttributesHasBeenSet = true; m_contextAttributes.emplace(key, std::move(value)); 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.
*/ inline ActiveContext& AddContextAttributes(Aws::String&& key, const char* value) { m_contextAttributesHasBeenSet = true; m_contextAttributes.emplace(std::move(key), value); 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.
*/ inline ActiveContext& AddContextAttributes(const char* key, const char* value) { m_contextAttributesHasBeenSet = true; m_contextAttributes.emplace(key, value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; ActiveContextTimeToLive m_timeToLive; bool m_timeToLiveHasBeenSet = false; Aws::Map