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/lex-models/LexModelBuildingService_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 LexModelBuildingService
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>The specification of an output context that is set when an intent is
28    * fulfilled.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/OutputContext">AWS
30    * API Reference</a></p>
31    */
32   class AWS_LEXMODELBUILDINGSERVICE_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 context.</p>
43      */
GetName()44     inline const Aws::String& GetName() const{ return m_name; }
45 
46     /**
47      * <p>The name of the context.</p>
48      */
NameHasBeenSet()49     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
50 
51     /**
52      * <p>The name of the 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 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 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 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 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 context.</p>
78      */
WithName(const char * value)79     inline OutputContext& WithName(const char* value) { SetName(value); return *this;}
80 
81 
82     /**
83      * <p>The number of seconds that the context should be active after it is first
84      * sent in a <code>PostContent</code> or <code>PostText</code> response. You can
85      * set the value between 5 and 86,400 seconds (24 hours).</p>
86      */
GetTimeToLiveInSeconds()87     inline int GetTimeToLiveInSeconds() const{ return m_timeToLiveInSeconds; }
88 
89     /**
90      * <p>The number of seconds that the context should be active after it is first
91      * sent in a <code>PostContent</code> or <code>PostText</code> response. You can
92      * set the value between 5 and 86,400 seconds (24 hours).</p>
93      */
TimeToLiveInSecondsHasBeenSet()94     inline bool TimeToLiveInSecondsHasBeenSet() const { return m_timeToLiveInSecondsHasBeenSet; }
95 
96     /**
97      * <p>The number of seconds that the context should be active after it is first
98      * sent in a <code>PostContent</code> or <code>PostText</code> response. You can
99      * set the value between 5 and 86,400 seconds (24 hours).</p>
100      */
SetTimeToLiveInSeconds(int value)101     inline void SetTimeToLiveInSeconds(int value) { m_timeToLiveInSecondsHasBeenSet = true; m_timeToLiveInSeconds = value; }
102 
103     /**
104      * <p>The number of seconds that the context should be active after it is first
105      * sent in a <code>PostContent</code> or <code>PostText</code> response. You can
106      * set the value between 5 and 86,400 seconds (24 hours).</p>
107      */
WithTimeToLiveInSeconds(int value)108     inline OutputContext& WithTimeToLiveInSeconds(int value) { SetTimeToLiveInSeconds(value); return *this;}
109 
110 
111     /**
112      * <p>The number of conversation turns that the context should be active. A
113      * conversation turn is one <code>PostContent</code> or <code>PostText</code>
114      * request and the corresponding response from Amazon Lex.</p>
115      */
GetTurnsToLive()116     inline int GetTurnsToLive() const{ return m_turnsToLive; }
117 
118     /**
119      * <p>The number of conversation turns that the context should be active. A
120      * conversation turn is one <code>PostContent</code> or <code>PostText</code>
121      * request and the corresponding response from Amazon Lex.</p>
122      */
TurnsToLiveHasBeenSet()123     inline bool TurnsToLiveHasBeenSet() const { return m_turnsToLiveHasBeenSet; }
124 
125     /**
126      * <p>The number of conversation turns that the context should be active. A
127      * conversation turn is one <code>PostContent</code> or <code>PostText</code>
128      * request and the corresponding response from Amazon Lex.</p>
129      */
SetTurnsToLive(int value)130     inline void SetTurnsToLive(int value) { m_turnsToLiveHasBeenSet = true; m_turnsToLive = value; }
131 
132     /**
133      * <p>The number of conversation turns that the context should be active. A
134      * conversation turn is one <code>PostContent</code> or <code>PostText</code>
135      * request and the corresponding response from Amazon Lex.</p>
136      */
WithTurnsToLive(int value)137     inline OutputContext& WithTurnsToLive(int value) { SetTurnsToLive(value); return *this;}
138 
139   private:
140 
141     Aws::String m_name;
142     bool m_nameHasBeenSet;
143 
144     int m_timeToLiveInSeconds;
145     bool m_timeToLiveInSecondsHasBeenSet;
146 
147     int m_turnsToLive;
148     bool m_turnsToLiveHasBeenSet;
149   };
150 
151 } // namespace Model
152 } // namespace LexModelBuildingService
153 } // namespace Aws
154