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/core/utils/memory/stl/AWSVector.h>
9 #include <aws/lexv2-runtime/model/SessionState.h>
10 #include <aws/core/utils/memory/stl/AWSMap.h>
11 #include <aws/core/utils/memory/stl/AWSString.h>
12 #include <aws/lexv2-runtime/model/Message.h>
13 #include <aws/lexv2-runtime/model/Interpretation.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 template<typename RESULT_TYPE>
19 class AmazonWebServiceResult;
20 
21 namespace Utils
22 {
23 namespace Json
24 {
25   class JsonValue;
26 } // namespace Json
27 } // namespace Utils
28 namespace LexRuntimeV2
29 {
30 namespace Model
31 {
32   class AWS_LEXRUNTIMEV2_API RecognizeTextResult
33   {
34   public:
35     RecognizeTextResult();
36     RecognizeTextResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
37     RecognizeTextResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
38 
39 
40     /**
41      * <p>A list of messages last sent to the user. The messages are ordered based on
42      * the order that you returned the messages from your Lambda function or the order
43      * that the messages are defined in the bot.</p>
44      */
GetMessages()45     inline const Aws::Vector<Message>& GetMessages() const{ return m_messages; }
46 
47     /**
48      * <p>A list of messages last sent to the user. The messages are ordered based on
49      * the order that you returned the messages from your Lambda function or the order
50      * that the messages are defined in the bot.</p>
51      */
SetMessages(const Aws::Vector<Message> & value)52     inline void SetMessages(const Aws::Vector<Message>& value) { m_messages = value; }
53 
54     /**
55      * <p>A list of messages last sent to the user. The messages are ordered based on
56      * the order that you returned the messages from your Lambda function or the order
57      * that the messages are defined in the bot.</p>
58      */
SetMessages(Aws::Vector<Message> && value)59     inline void SetMessages(Aws::Vector<Message>&& value) { m_messages = std::move(value); }
60 
61     /**
62      * <p>A list of messages last sent to the user. The messages are ordered based on
63      * the order that you returned the messages from your Lambda function or the order
64      * that the messages are defined in the bot.</p>
65      */
WithMessages(const Aws::Vector<Message> & value)66     inline RecognizeTextResult& WithMessages(const Aws::Vector<Message>& value) { SetMessages(value); return *this;}
67 
68     /**
69      * <p>A list of messages last sent to the user. The messages are ordered based on
70      * the order that you returned the messages from your Lambda function or the order
71      * that the messages are defined in the bot.</p>
72      */
WithMessages(Aws::Vector<Message> && value)73     inline RecognizeTextResult& WithMessages(Aws::Vector<Message>&& value) { SetMessages(std::move(value)); return *this;}
74 
75     /**
76      * <p>A list of messages last sent to the user. The messages are ordered based on
77      * the order that you returned the messages from your Lambda function or the order
78      * that the messages are defined in the bot.</p>
79      */
AddMessages(const Message & value)80     inline RecognizeTextResult& AddMessages(const Message& value) { m_messages.push_back(value); return *this; }
81 
82     /**
83      * <p>A list of messages last sent to the user. The messages are ordered based on
84      * the order that you returned the messages from your Lambda function or the order
85      * that the messages are defined in the bot.</p>
86      */
AddMessages(Message && value)87     inline RecognizeTextResult& AddMessages(Message&& value) { m_messages.push_back(std::move(value)); return *this; }
88 
89 
90     /**
91      * <p>Represents the current state of the dialog between the user and the bot. </p>
92      * <p>Use this to determine the progress of the conversation and what the next
93      * action may be.</p>
94      */
GetSessionState()95     inline const SessionState& GetSessionState() const{ return m_sessionState; }
96 
97     /**
98      * <p>Represents the current state of the dialog between the user and the bot. </p>
99      * <p>Use this to determine the progress of the conversation and what the next
100      * action may be.</p>
101      */
SetSessionState(const SessionState & value)102     inline void SetSessionState(const SessionState& value) { m_sessionState = value; }
103 
104     /**
105      * <p>Represents the current state of the dialog between the user and the bot. </p>
106      * <p>Use this to determine the progress of the conversation and what the next
107      * action may be.</p>
108      */
SetSessionState(SessionState && value)109     inline void SetSessionState(SessionState&& value) { m_sessionState = std::move(value); }
110 
111     /**
112      * <p>Represents the current state of the dialog between the user and the bot. </p>
113      * <p>Use this to determine the progress of the conversation and what the next
114      * action may be.</p>
115      */
WithSessionState(const SessionState & value)116     inline RecognizeTextResult& WithSessionState(const SessionState& value) { SetSessionState(value); return *this;}
117 
118     /**
119      * <p>Represents the current state of the dialog between the user and the bot. </p>
120      * <p>Use this to determine the progress of the conversation and what the next
121      * action may be.</p>
122      */
WithSessionState(SessionState && value)123     inline RecognizeTextResult& WithSessionState(SessionState&& value) { SetSessionState(std::move(value)); return *this;}
124 
125 
126     /**
127      * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
128      * utterance. </p> <p>Each interpretation includes the intent, a score that
129      * indicates now confident Amazon Lex V2 is that the interpretation is the correct
130      * one, and an optional sentiment response that indicates the sentiment expressed
131      * in the utterance.</p>
132      */
GetInterpretations()133     inline const Aws::Vector<Interpretation>& GetInterpretations() const{ return m_interpretations; }
134 
135     /**
136      * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
137      * utterance. </p> <p>Each interpretation includes the intent, a score that
138      * indicates now confident Amazon Lex V2 is that the interpretation is the correct
139      * one, and an optional sentiment response that indicates the sentiment expressed
140      * in the utterance.</p>
141      */
SetInterpretations(const Aws::Vector<Interpretation> & value)142     inline void SetInterpretations(const Aws::Vector<Interpretation>& value) { m_interpretations = value; }
143 
144     /**
145      * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
146      * utterance. </p> <p>Each interpretation includes the intent, a score that
147      * indicates now confident Amazon Lex V2 is that the interpretation is the correct
148      * one, and an optional sentiment response that indicates the sentiment expressed
149      * in the utterance.</p>
150      */
SetInterpretations(Aws::Vector<Interpretation> && value)151     inline void SetInterpretations(Aws::Vector<Interpretation>&& value) { m_interpretations = std::move(value); }
152 
153     /**
154      * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
155      * utterance. </p> <p>Each interpretation includes the intent, a score that
156      * indicates now confident Amazon Lex V2 is that the interpretation is the correct
157      * one, and an optional sentiment response that indicates the sentiment expressed
158      * in the utterance.</p>
159      */
WithInterpretations(const Aws::Vector<Interpretation> & value)160     inline RecognizeTextResult& WithInterpretations(const Aws::Vector<Interpretation>& value) { SetInterpretations(value); return *this;}
161 
162     /**
163      * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
164      * utterance. </p> <p>Each interpretation includes the intent, a score that
165      * indicates now confident Amazon Lex V2 is that the interpretation is the correct
166      * one, and an optional sentiment response that indicates the sentiment expressed
167      * in the utterance.</p>
168      */
WithInterpretations(Aws::Vector<Interpretation> && value)169     inline RecognizeTextResult& WithInterpretations(Aws::Vector<Interpretation>&& value) { SetInterpretations(std::move(value)); return *this;}
170 
171     /**
172      * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
173      * utterance. </p> <p>Each interpretation includes the intent, a score that
174      * indicates now confident Amazon Lex V2 is that the interpretation is the correct
175      * one, and an optional sentiment response that indicates the sentiment expressed
176      * in the utterance.</p>
177      */
AddInterpretations(const Interpretation & value)178     inline RecognizeTextResult& AddInterpretations(const Interpretation& value) { m_interpretations.push_back(value); return *this; }
179 
180     /**
181      * <p>A list of intents that Amazon Lex V2 determined might satisfy the user's
182      * utterance. </p> <p>Each interpretation includes the intent, a score that
183      * indicates now confident Amazon Lex V2 is that the interpretation is the correct
184      * one, and an optional sentiment response that indicates the sentiment expressed
185      * in the utterance.</p>
186      */
AddInterpretations(Interpretation && value)187     inline RecognizeTextResult& AddInterpretations(Interpretation&& value) { m_interpretations.push_back(std::move(value)); return *this; }
188 
189 
190     /**
191      * <p>The attributes sent in the request.</p>
192      */
GetRequestAttributes()193     inline const Aws::Map<Aws::String, Aws::String>& GetRequestAttributes() const{ return m_requestAttributes; }
194 
195     /**
196      * <p>The attributes sent in the request.</p>
197      */
SetRequestAttributes(const Aws::Map<Aws::String,Aws::String> & value)198     inline void SetRequestAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_requestAttributes = value; }
199 
200     /**
201      * <p>The attributes sent in the request.</p>
202      */
SetRequestAttributes(Aws::Map<Aws::String,Aws::String> && value)203     inline void SetRequestAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_requestAttributes = std::move(value); }
204 
205     /**
206      * <p>The attributes sent in the request.</p>
207      */
WithRequestAttributes(const Aws::Map<Aws::String,Aws::String> & value)208     inline RecognizeTextResult& WithRequestAttributes(const Aws::Map<Aws::String, Aws::String>& value) { SetRequestAttributes(value); return *this;}
209 
210     /**
211      * <p>The attributes sent in the request.</p>
212      */
WithRequestAttributes(Aws::Map<Aws::String,Aws::String> && value)213     inline RecognizeTextResult& WithRequestAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetRequestAttributes(std::move(value)); return *this;}
214 
215     /**
216      * <p>The attributes sent in the request.</p>
217      */
AddRequestAttributes(const Aws::String & key,const Aws::String & value)218     inline RecognizeTextResult& AddRequestAttributes(const Aws::String& key, const Aws::String& value) { m_requestAttributes.emplace(key, value); return *this; }
219 
220     /**
221      * <p>The attributes sent in the request.</p>
222      */
AddRequestAttributes(Aws::String && key,const Aws::String & value)223     inline RecognizeTextResult& AddRequestAttributes(Aws::String&& key, const Aws::String& value) { m_requestAttributes.emplace(std::move(key), value); return *this; }
224 
225     /**
226      * <p>The attributes sent in the request.</p>
227      */
AddRequestAttributes(const Aws::String & key,Aws::String && value)228     inline RecognizeTextResult& AddRequestAttributes(const Aws::String& key, Aws::String&& value) { m_requestAttributes.emplace(key, std::move(value)); return *this; }
229 
230     /**
231      * <p>The attributes sent in the request.</p>
232      */
AddRequestAttributes(Aws::String && key,Aws::String && value)233     inline RecognizeTextResult& AddRequestAttributes(Aws::String&& key, Aws::String&& value) { m_requestAttributes.emplace(std::move(key), std::move(value)); return *this; }
234 
235     /**
236      * <p>The attributes sent in the request.</p>
237      */
AddRequestAttributes(const char * key,Aws::String && value)238     inline RecognizeTextResult& AddRequestAttributes(const char* key, Aws::String&& value) { m_requestAttributes.emplace(key, std::move(value)); return *this; }
239 
240     /**
241      * <p>The attributes sent in the request.</p>
242      */
AddRequestAttributes(Aws::String && key,const char * value)243     inline RecognizeTextResult& AddRequestAttributes(Aws::String&& key, const char* value) { m_requestAttributes.emplace(std::move(key), value); return *this; }
244 
245     /**
246      * <p>The attributes sent in the request.</p>
247      */
AddRequestAttributes(const char * key,const char * value)248     inline RecognizeTextResult& AddRequestAttributes(const char* key, const char* value) { m_requestAttributes.emplace(key, value); return *this; }
249 
250 
251     /**
252      * <p>The identifier of the session in use.</p>
253      */
GetSessionId()254     inline const Aws::String& GetSessionId() const{ return m_sessionId; }
255 
256     /**
257      * <p>The identifier of the session in use.</p>
258      */
SetSessionId(const Aws::String & value)259     inline void SetSessionId(const Aws::String& value) { m_sessionId = value; }
260 
261     /**
262      * <p>The identifier of the session in use.</p>
263      */
SetSessionId(Aws::String && value)264     inline void SetSessionId(Aws::String&& value) { m_sessionId = std::move(value); }
265 
266     /**
267      * <p>The identifier of the session in use.</p>
268      */
SetSessionId(const char * value)269     inline void SetSessionId(const char* value) { m_sessionId.assign(value); }
270 
271     /**
272      * <p>The identifier of the session in use.</p>
273      */
WithSessionId(const Aws::String & value)274     inline RecognizeTextResult& WithSessionId(const Aws::String& value) { SetSessionId(value); return *this;}
275 
276     /**
277      * <p>The identifier of the session in use.</p>
278      */
WithSessionId(Aws::String && value)279     inline RecognizeTextResult& WithSessionId(Aws::String&& value) { SetSessionId(std::move(value)); return *this;}
280 
281     /**
282      * <p>The identifier of the session in use.</p>
283      */
WithSessionId(const char * value)284     inline RecognizeTextResult& WithSessionId(const char* value) { SetSessionId(value); return *this;}
285 
286   private:
287 
288     Aws::Vector<Message> m_messages;
289 
290     SessionState m_sessionState;
291 
292     Aws::Vector<Interpretation> m_interpretations;
293 
294     Aws::Map<Aws::String, Aws::String> m_requestAttributes;
295 
296     Aws::String m_sessionId;
297   };
298 
299 } // namespace Model
300 } // namespace LexRuntimeV2
301 } // namespace Aws
302