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-runtime/LexRuntimeV2_EXPORTS.h>
8 #include <aws/lexv2-runtime/model/DialogAction.h>
9 #include <aws/lexv2-runtime/model/Intent.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <aws/core/utils/memory/stl/AWSMap.h>
12 #include <aws/core/utils/memory/stl/AWSString.h>
13 #include <aws/lexv2-runtime/model/ActiveContext.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace Utils
19 {
20 namespace Json
21 {
22   class JsonValue;
23   class JsonView;
24 } // namespace Json
25 } // namespace Utils
26 namespace LexRuntimeV2
27 {
28 namespace Model
29 {
30 
31   /**
32    * <p>The state of the user's session with Amazon Lex V2.</p><p><h3>See Also:</h3>
33    * <a
34    * href="http://docs.aws.amazon.com/goto/WebAPI/runtime.lex.v2-2020-08-07/SessionState">AWS
35    * API Reference</a></p>
36    */
37   class AWS_LEXRUNTIMEV2_API SessionState
38   {
39   public:
40     SessionState();
41     SessionState(Aws::Utils::Json::JsonView jsonValue);
42     SessionState& operator=(Aws::Utils::Json::JsonView jsonValue);
43     Aws::Utils::Json::JsonValue Jsonize() const;
44 
45 
46     /**
47      * <p>The next step that Amazon Lex V2 should take in the conversation with a
48      * user.</p>
49      */
GetDialogAction()50     inline const DialogAction& GetDialogAction() const{ return m_dialogAction; }
51 
52     /**
53      * <p>The next step that Amazon Lex V2 should take in the conversation with a
54      * user.</p>
55      */
DialogActionHasBeenSet()56     inline bool DialogActionHasBeenSet() const { return m_dialogActionHasBeenSet; }
57 
58     /**
59      * <p>The next step that Amazon Lex V2 should take in the conversation with a
60      * user.</p>
61      */
SetDialogAction(const DialogAction & value)62     inline void SetDialogAction(const DialogAction& value) { m_dialogActionHasBeenSet = true; m_dialogAction = value; }
63 
64     /**
65      * <p>The next step that Amazon Lex V2 should take in the conversation with a
66      * user.</p>
67      */
SetDialogAction(DialogAction && value)68     inline void SetDialogAction(DialogAction&& value) { m_dialogActionHasBeenSet = true; m_dialogAction = std::move(value); }
69 
70     /**
71      * <p>The next step that Amazon Lex V2 should take in the conversation with a
72      * user.</p>
73      */
WithDialogAction(const DialogAction & value)74     inline SessionState& WithDialogAction(const DialogAction& value) { SetDialogAction(value); return *this;}
75 
76     /**
77      * <p>The next step that Amazon Lex V2 should take in the conversation with a
78      * user.</p>
79      */
WithDialogAction(DialogAction && value)80     inline SessionState& WithDialogAction(DialogAction&& value) { SetDialogAction(std::move(value)); return *this;}
81 
82 
83     /**
84      * <p>The active intent that Amazon Lex V2 is processing.</p>
85      */
GetIntent()86     inline const Intent& GetIntent() const{ return m_intent; }
87 
88     /**
89      * <p>The active intent that Amazon Lex V2 is processing.</p>
90      */
IntentHasBeenSet()91     inline bool IntentHasBeenSet() const { return m_intentHasBeenSet; }
92 
93     /**
94      * <p>The active intent that Amazon Lex V2 is processing.</p>
95      */
SetIntent(const Intent & value)96     inline void SetIntent(const Intent& value) { m_intentHasBeenSet = true; m_intent = value; }
97 
98     /**
99      * <p>The active intent that Amazon Lex V2 is processing.</p>
100      */
SetIntent(Intent && value)101     inline void SetIntent(Intent&& value) { m_intentHasBeenSet = true; m_intent = std::move(value); }
102 
103     /**
104      * <p>The active intent that Amazon Lex V2 is processing.</p>
105      */
WithIntent(const Intent & value)106     inline SessionState& WithIntent(const Intent& value) { SetIntent(value); return *this;}
107 
108     /**
109      * <p>The active intent that Amazon Lex V2 is processing.</p>
110      */
WithIntent(Intent && value)111     inline SessionState& WithIntent(Intent&& value) { SetIntent(std::move(value)); return *this;}
112 
113 
114     /**
115      * <p>One or more contexts that indicate to Amazon Lex V2 the context of a request.
116      * When a context is active, Amazon Lex V2 considers intents with the matching
117      * context as a trigger as the next intent in a session.</p>
118      */
GetActiveContexts()119     inline const Aws::Vector<ActiveContext>& GetActiveContexts() const{ return m_activeContexts; }
120 
121     /**
122      * <p>One or more contexts that indicate to Amazon Lex V2 the context of a request.
123      * When a context is active, Amazon Lex V2 considers intents with the matching
124      * context as a trigger as the next intent in a session.</p>
125      */
ActiveContextsHasBeenSet()126     inline bool ActiveContextsHasBeenSet() const { return m_activeContextsHasBeenSet; }
127 
128     /**
129      * <p>One or more contexts that indicate to Amazon Lex V2 the context of a request.
130      * When a context is active, Amazon Lex V2 considers intents with the matching
131      * context as a trigger as the next intent in a session.</p>
132      */
SetActiveContexts(const Aws::Vector<ActiveContext> & value)133     inline void SetActiveContexts(const Aws::Vector<ActiveContext>& value) { m_activeContextsHasBeenSet = true; m_activeContexts = value; }
134 
135     /**
136      * <p>One or more contexts that indicate to Amazon Lex V2 the context of a request.
137      * When a context is active, Amazon Lex V2 considers intents with the matching
138      * context as a trigger as the next intent in a session.</p>
139      */
SetActiveContexts(Aws::Vector<ActiveContext> && value)140     inline void SetActiveContexts(Aws::Vector<ActiveContext>&& value) { m_activeContextsHasBeenSet = true; m_activeContexts = std::move(value); }
141 
142     /**
143      * <p>One or more contexts that indicate to Amazon Lex V2 the context of a request.
144      * When a context is active, Amazon Lex V2 considers intents with the matching
145      * context as a trigger as the next intent in a session.</p>
146      */
WithActiveContexts(const Aws::Vector<ActiveContext> & value)147     inline SessionState& WithActiveContexts(const Aws::Vector<ActiveContext>& value) { SetActiveContexts(value); return *this;}
148 
149     /**
150      * <p>One or more contexts that indicate to Amazon Lex V2 the context of a request.
151      * When a context is active, Amazon Lex V2 considers intents with the matching
152      * context as a trigger as the next intent in a session.</p>
153      */
WithActiveContexts(Aws::Vector<ActiveContext> && value)154     inline SessionState& WithActiveContexts(Aws::Vector<ActiveContext>&& value) { SetActiveContexts(std::move(value)); return *this;}
155 
156     /**
157      * <p>One or more contexts that indicate to Amazon Lex V2 the context of a request.
158      * When a context is active, Amazon Lex V2 considers intents with the matching
159      * context as a trigger as the next intent in a session.</p>
160      */
AddActiveContexts(const ActiveContext & value)161     inline SessionState& AddActiveContexts(const ActiveContext& value) { m_activeContextsHasBeenSet = true; m_activeContexts.push_back(value); return *this; }
162 
163     /**
164      * <p>One or more contexts that indicate to Amazon Lex V2 the context of a request.
165      * When a context is active, Amazon Lex V2 considers intents with the matching
166      * context as a trigger as the next intent in a session.</p>
167      */
AddActiveContexts(ActiveContext && value)168     inline SessionState& AddActiveContexts(ActiveContext&& value) { m_activeContextsHasBeenSet = true; m_activeContexts.push_back(std::move(value)); return *this; }
169 
170 
171     /**
172      * <p>Map of key/value pairs representing session-specific context information. It
173      * contains application information passed between Amazon Lex V2 and a client
174      * application.</p>
175      */
GetSessionAttributes()176     inline const Aws::Map<Aws::String, Aws::String>& GetSessionAttributes() const{ return m_sessionAttributes; }
177 
178     /**
179      * <p>Map of key/value pairs representing session-specific context information. It
180      * contains application information passed between Amazon Lex V2 and a client
181      * application.</p>
182      */
SessionAttributesHasBeenSet()183     inline bool SessionAttributesHasBeenSet() const { return m_sessionAttributesHasBeenSet; }
184 
185     /**
186      * <p>Map of key/value pairs representing session-specific context information. It
187      * contains application information passed between Amazon Lex V2 and a client
188      * application.</p>
189      */
SetSessionAttributes(const Aws::Map<Aws::String,Aws::String> & value)190     inline void SetSessionAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes = value; }
191 
192     /**
193      * <p>Map of key/value pairs representing session-specific context information. It
194      * contains application information passed between Amazon Lex V2 and a client
195      * application.</p>
196      */
SetSessionAttributes(Aws::Map<Aws::String,Aws::String> && value)197     inline void SetSessionAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes = std::move(value); }
198 
199     /**
200      * <p>Map of key/value pairs representing session-specific context information. It
201      * contains application information passed between Amazon Lex V2 and a client
202      * application.</p>
203      */
WithSessionAttributes(const Aws::Map<Aws::String,Aws::String> & value)204     inline SessionState& WithSessionAttributes(const Aws::Map<Aws::String, Aws::String>& value) { SetSessionAttributes(value); return *this;}
205 
206     /**
207      * <p>Map of key/value pairs representing session-specific context information. It
208      * contains application information passed between Amazon Lex V2 and a client
209      * application.</p>
210      */
WithSessionAttributes(Aws::Map<Aws::String,Aws::String> && value)211     inline SessionState& WithSessionAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetSessionAttributes(std::move(value)); return *this;}
212 
213     /**
214      * <p>Map of key/value pairs representing session-specific context information. It
215      * contains application information passed between Amazon Lex V2 and a client
216      * application.</p>
217      */
AddSessionAttributes(const Aws::String & key,const Aws::String & value)218     inline SessionState& AddSessionAttributes(const Aws::String& key, const Aws::String& value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes.emplace(key, value); return *this; }
219 
220     /**
221      * <p>Map of key/value pairs representing session-specific context information. It
222      * contains application information passed between Amazon Lex V2 and a client
223      * application.</p>
224      */
AddSessionAttributes(Aws::String && key,const Aws::String & value)225     inline SessionState& AddSessionAttributes(Aws::String&& key, const Aws::String& value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes.emplace(std::move(key), value); return *this; }
226 
227     /**
228      * <p>Map of key/value pairs representing session-specific context information. It
229      * contains application information passed between Amazon Lex V2 and a client
230      * application.</p>
231      */
AddSessionAttributes(const Aws::String & key,Aws::String && value)232     inline SessionState& AddSessionAttributes(const Aws::String& key, Aws::String&& value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes.emplace(key, std::move(value)); return *this; }
233 
234     /**
235      * <p>Map of key/value pairs representing session-specific context information. It
236      * contains application information passed between Amazon Lex V2 and a client
237      * application.</p>
238      */
AddSessionAttributes(Aws::String && key,Aws::String && value)239     inline SessionState& AddSessionAttributes(Aws::String&& key, Aws::String&& value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes.emplace(std::move(key), std::move(value)); return *this; }
240 
241     /**
242      * <p>Map of key/value pairs representing session-specific context information. It
243      * contains application information passed between Amazon Lex V2 and a client
244      * application.</p>
245      */
AddSessionAttributes(const char * key,Aws::String && value)246     inline SessionState& AddSessionAttributes(const char* key, Aws::String&& value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes.emplace(key, std::move(value)); return *this; }
247 
248     /**
249      * <p>Map of key/value pairs representing session-specific context information. It
250      * contains application information passed between Amazon Lex V2 and a client
251      * application.</p>
252      */
AddSessionAttributes(Aws::String && key,const char * value)253     inline SessionState& AddSessionAttributes(Aws::String&& key, const char* value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes.emplace(std::move(key), value); return *this; }
254 
255     /**
256      * <p>Map of key/value pairs representing session-specific context information. It
257      * contains application information passed between Amazon Lex V2 and a client
258      * application.</p>
259      */
AddSessionAttributes(const char * key,const char * value)260     inline SessionState& AddSessionAttributes(const char* key, const char* value) { m_sessionAttributesHasBeenSet = true; m_sessionAttributes.emplace(key, value); return *this; }
261 
262 
263     /**
264      * <p/>
265      */
GetOriginatingRequestId()266     inline const Aws::String& GetOriginatingRequestId() const{ return m_originatingRequestId; }
267 
268     /**
269      * <p/>
270      */
OriginatingRequestIdHasBeenSet()271     inline bool OriginatingRequestIdHasBeenSet() const { return m_originatingRequestIdHasBeenSet; }
272 
273     /**
274      * <p/>
275      */
SetOriginatingRequestId(const Aws::String & value)276     inline void SetOriginatingRequestId(const Aws::String& value) { m_originatingRequestIdHasBeenSet = true; m_originatingRequestId = value; }
277 
278     /**
279      * <p/>
280      */
SetOriginatingRequestId(Aws::String && value)281     inline void SetOriginatingRequestId(Aws::String&& value) { m_originatingRequestIdHasBeenSet = true; m_originatingRequestId = std::move(value); }
282 
283     /**
284      * <p/>
285      */
SetOriginatingRequestId(const char * value)286     inline void SetOriginatingRequestId(const char* value) { m_originatingRequestIdHasBeenSet = true; m_originatingRequestId.assign(value); }
287 
288     /**
289      * <p/>
290      */
WithOriginatingRequestId(const Aws::String & value)291     inline SessionState& WithOriginatingRequestId(const Aws::String& value) { SetOriginatingRequestId(value); return *this;}
292 
293     /**
294      * <p/>
295      */
WithOriginatingRequestId(Aws::String && value)296     inline SessionState& WithOriginatingRequestId(Aws::String&& value) { SetOriginatingRequestId(std::move(value)); return *this;}
297 
298     /**
299      * <p/>
300      */
WithOriginatingRequestId(const char * value)301     inline SessionState& WithOriginatingRequestId(const char* value) { SetOriginatingRequestId(value); return *this;}
302 
303   private:
304 
305     DialogAction m_dialogAction;
306     bool m_dialogActionHasBeenSet;
307 
308     Intent m_intent;
309     bool m_intentHasBeenSet;
310 
311     Aws::Vector<ActiveContext> m_activeContexts;
312     bool m_activeContextsHasBeenSet;
313 
314     Aws::Map<Aws::String, Aws::String> m_sessionAttributes;
315     bool m_sessionAttributesHasBeenSet;
316 
317     Aws::String m_originatingRequestId;
318     bool m_originatingRequestIdHasBeenSet;
319   };
320 
321 } // namespace Model
322 } // namespace LexRuntimeV2
323 } // namespace Aws
324