/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace LexRuntimeService { namespace Model { /** *

A context is a variable that contains information about the current state of * the conversation between a user and Amazon Lex. Context can be set automatically * by Amazon Lex when an intent is fulfilled, or it can be set at runtime using the * PutContent, PutText, or PutSession * operation.

See Also:

AWS * API Reference

*/ class ActiveContext { public: AWS_LEXRUNTIMESERVICE_API ActiveContext(); AWS_LEXRUNTIMESERVICE_API ActiveContext(Aws::Utils::Json::JsonView jsonValue); AWS_LEXRUNTIMESERVICE_API ActiveContext& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_LEXRUNTIMESERVICE_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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;} /** *

The length of time or number of turns that a context remains active.

*/ inline const ActiveContextTimeToLive& GetTimeToLive() const{ return m_timeToLive; } /** *

The length of time or number of turns that a context remains active.

*/ inline bool TimeToLiveHasBeenSet() const { return m_timeToLiveHasBeenSet; } /** *

The length of time or number of turns that a context remains active.

*/ inline void SetTimeToLive(const ActiveContextTimeToLive& value) { m_timeToLiveHasBeenSet = true; m_timeToLive = value; } /** *

The length of time or number of turns that a context remains active.

*/ inline void SetTimeToLive(ActiveContextTimeToLive&& value) { m_timeToLiveHasBeenSet = true; m_timeToLive = std::move(value); } /** *

The length of time or number of turns that a context remains active.

*/ inline ActiveContext& WithTimeToLive(const ActiveContextTimeToLive& value) { SetTimeToLive(value); return *this;} /** *

The length of time or number of turns that a context remains active.

*/ inline ActiveContext& WithTimeToLive(ActiveContextTimeToLive&& value) { SetTimeToLive(std::move(value)); return *this;} /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline const Aws::Map& GetParameters() const{ return m_parameters; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline void SetParameters(const Aws::Map& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline void SetParameters(Aws::Map&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& WithParameters(const Aws::Map& value) { SetParameters(value); return *this;} /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& WithParameters(Aws::Map&& value) { SetParameters(std::move(value)); return *this;} /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& AddParameters(const Aws::String& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& AddParameters(Aws::String&& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& AddParameters(const Aws::String& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& AddParameters(Aws::String&& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), std::move(value)); return *this; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& AddParameters(const char* key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& AddParameters(Aws::String&& key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

State variables for the current context. You can use these values as default * values for slots in subsequent events.

*/ inline ActiveContext& AddParameters(const char* key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; ActiveContextTimeToLive m_timeToLive; bool m_timeToLiveHasBeenSet = false; Aws::Map m_parameters; bool m_parametersHasBeenSet = false; }; } // namespace Model } // namespace LexRuntimeService } // namespace Aws