1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/lexv2-models/LexModelsV2_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <utility>
10 
11 namespace Aws
12 {
13 namespace Utils
14 {
15 namespace Json
16 {
17   class JsonValue;
18   class JsonView;
19 } // namespace Json
20 } // namespace Utils
21 namespace LexModelsV2
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Describes a session context that is activated when an intent is
28    * fulfilled.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/models.lex.v2-2020-08-07/OutputContext">AWS
30    * API Reference</a></p>
31    */
32   class AWS_LEXMODELSV2_API OutputContext
33   {
34   public:
35     OutputContext();
36     OutputContext(Aws::Utils::Json::JsonView jsonValue);
37     OutputContext& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41     /**
42      * <p>The name of the output context.</p>
43      */
GetName()44     inline const Aws::String& GetName() const{ return m_name; }
45 
46     /**
47      * <p>The name of the output context.</p>
48      */
NameHasBeenSet()49     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
50 
51     /**
52      * <p>The name of the output context.</p>
53      */
SetName(const Aws::String & value)54     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
55 
56     /**
57      * <p>The name of the output context.</p>
58      */
SetName(Aws::String && value)59     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
60 
61     /**
62      * <p>The name of the output context.</p>
63      */
SetName(const char * value)64     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
65 
66     /**
67      * <p>The name of the output context.</p>
68      */
WithName(const Aws::String & value)69     inline OutputContext& WithName(const Aws::String& value) { SetName(value); return *this;}
70 
71     /**
72      * <p>The name of the output context.</p>
73      */
WithName(Aws::String && value)74     inline OutputContext& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
75 
76     /**
77      * <p>The name of the output context.</p>
78      */
WithName(const char * value)79     inline OutputContext& WithName(const char* value) { SetName(value); return *this;}
80 
81 
82     /**
83      * <p>The amount of time, in seconds, that the output context should remain active.
84      * The time is figured from the first time the context is sent to the user.</p>
85      */
GetTimeToLiveInSeconds()86     inline int GetTimeToLiveInSeconds() const{ return m_timeToLiveInSeconds; }
87 
88     /**
89      * <p>The amount of time, in seconds, that the output context should remain active.
90      * The time is figured from the first time the context is sent to the user.</p>
91      */
TimeToLiveInSecondsHasBeenSet()92     inline bool TimeToLiveInSecondsHasBeenSet() const { return m_timeToLiveInSecondsHasBeenSet; }
93 
94     /**
95      * <p>The amount of time, in seconds, that the output context should remain active.
96      * The time is figured from the first time the context is sent to the user.</p>
97      */
SetTimeToLiveInSeconds(int value)98     inline void SetTimeToLiveInSeconds(int value) { m_timeToLiveInSecondsHasBeenSet = true; m_timeToLiveInSeconds = value; }
99 
100     /**
101      * <p>The amount of time, in seconds, that the output context should remain active.
102      * The time is figured from the first time the context is sent to the user.</p>
103      */
WithTimeToLiveInSeconds(int value)104     inline OutputContext& WithTimeToLiveInSeconds(int value) { SetTimeToLiveInSeconds(value); return *this;}
105 
106 
107     /**
108      * <p>The number of conversation turns that the output context should remain
109      * active. The number of turns is counted from the first time that the context is
110      * sent to the user.</p>
111      */
GetTurnsToLive()112     inline int GetTurnsToLive() const{ return m_turnsToLive; }
113 
114     /**
115      * <p>The number of conversation turns that the output context should remain
116      * active. The number of turns is counted from the first time that the context is
117      * sent to the user.</p>
118      */
TurnsToLiveHasBeenSet()119     inline bool TurnsToLiveHasBeenSet() const { return m_turnsToLiveHasBeenSet; }
120 
121     /**
122      * <p>The number of conversation turns that the output context should remain
123      * active. The number of turns is counted from the first time that the context is
124      * sent to the user.</p>
125      */
SetTurnsToLive(int value)126     inline void SetTurnsToLive(int value) { m_turnsToLiveHasBeenSet = true; m_turnsToLive = value; }
127 
128     /**
129      * <p>The number of conversation turns that the output context should remain
130      * active. The number of turns is counted from the first time that the context is
131      * sent to the user.</p>
132      */
WithTurnsToLive(int value)133     inline OutputContext& WithTurnsToLive(int value) { SetTurnsToLive(value); return *this;}
134 
135   private:
136 
137     Aws::String m_name;
138     bool m_nameHasBeenSet;
139 
140     int m_timeToLiveInSeconds;
141     bool m_timeToLiveInSecondsHasBeenSet;
142 
143     int m_turnsToLive;
144     bool m_turnsToLiveHasBeenSet;
145   };
146 
147 } // namespace Model
148 } // namespace LexModelsV2
149 } // namespace Aws
150