/** * 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 LexRuntimeService { namespace Model { /** *

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

See Also:

AWS * API Reference

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

The number of seconds that the context should be active after it is first * sent in a PostContent or PostText response. You can * set the value between 5 and 86,400 seconds (24 hours).

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

The number of seconds that the context should be active after it is first * sent in a PostContent or PostText response. You can * set the value between 5 and 86,400 seconds (24 hours).

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

The number of seconds that the context should be active after it is first * sent in a PostContent or PostText response. You can * set the value between 5 and 86,400 seconds (24 hours).

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

The number of seconds that the context should be active after it is first * sent in a PostContent or PostText response. You can * set the value between 5 and 86,400 seconds (24 hours).

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

The number of conversation turns that the context should be active. A * conversation turn is one PostContent or PostText * request and the corresponding response from Amazon Lex.

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

The number of conversation turns that the context should be active. A * conversation turn is one PostContent or PostText * request and the corresponding response from Amazon Lex.

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

The number of conversation turns that the context should be active. A * conversation turn is one PostContent or PostText * request and the corresponding response from Amazon Lex.

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

The number of conversation turns that the context should be active. A * conversation turn is one PostContent or PostText * request and the corresponding response from Amazon Lex.

*/ 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 LexRuntimeService } // namespace Aws