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

The time that a context is active. You can specify the time to live in * seconds or in conversation turns.

See Also:

AWS * API Reference

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

The number of seconds that the context is active. You can specify between 5 * and 86400 seconds (24 hours).

*/ inline int GetTimeToLiveInSeconds() const{ return m_timeToLiveInSeconds; } /** *

The number of seconds that the context is active. You can specify between 5 * and 86400 seconds (24 hours).

*/ inline bool TimeToLiveInSecondsHasBeenSet() const { return m_timeToLiveInSecondsHasBeenSet; } /** *

The number of seconds that the context is active. You can specify between 5 * and 86400 seconds (24 hours).

*/ inline void SetTimeToLiveInSeconds(int value) { m_timeToLiveInSecondsHasBeenSet = true; m_timeToLiveInSeconds = value; } /** *

The number of seconds that the context is active. You can specify between 5 * and 86400 seconds (24 hours).

*/ inline ActiveContextTimeToLive& WithTimeToLiveInSeconds(int value) { SetTimeToLiveInSeconds(value); return *this;} /** *

The number of turns that the context is active. You can specify up to 20 * turns. Each request and response from the bot is a turn.

*/ inline int GetTurnsToLive() const{ return m_turnsToLive; } /** *

The number of turns that the context is active. You can specify up to 20 * turns. Each request and response from the bot is a turn.

*/ inline bool TurnsToLiveHasBeenSet() const { return m_turnsToLiveHasBeenSet; } /** *

The number of turns that the context is active. You can specify up to 20 * turns. Each request and response from the bot is a turn.

*/ inline void SetTurnsToLive(int value) { m_turnsToLiveHasBeenSet = true; m_turnsToLive = value; } /** *

The number of turns that the context is active. You can specify up to 20 * turns. Each request and response from the bot is a turn.

*/ inline ActiveContextTimeToLive& WithTurnsToLive(int value) { SetTurnsToLive(value); return *this;} private: int m_timeToLiveInSeconds; bool m_timeToLiveInSecondsHasBeenSet = false; int m_turnsToLive; bool m_turnsToLiveHasBeenSet = false; }; } // namespace Model } // namespace LexRuntimeV2 } // namespace Aws