AWS SDK for C++

AWS SDK for C++ Version 1.11.778

Loading...
Searching...
No Matches
PostTextResult.h
1
6#pragma once
7#include <aws/core/http/HttpResponse.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/lex/LexRuntimeService_EXPORTS.h>
12#include <aws/lex/model/ActiveContext.h>
13#include <aws/lex/model/DialogState.h>
14#include <aws/lex/model/IntentConfidence.h>
15#include <aws/lex/model/MessageFormatType.h>
16#include <aws/lex/model/PredictedIntent.h>
17#include <aws/lex/model/ResponseCard.h>
18#include <aws/lex/model/SentimentResponse.h>
19
20#include <utility>
21
22namespace Aws {
23template <typename RESULT_TYPE>
24class AmazonWebServiceResult;
25
26namespace Utils {
27namespace Json {
28class JsonValue;
29} // namespace Json
30} // namespace Utils
31namespace LexRuntimeService {
32namespace Model {
34 public:
35 AWS_LEXRUNTIMESERVICE_API PostTextResult() = default;
38
40
43 inline const Aws::String& GetIntentName() const { return m_intentName; }
44 template <typename IntentNameT = Aws::String>
45 void SetIntentName(IntentNameT&& value) {
46 m_intentNameHasBeenSet = true;
47 m_intentName = std::forward<IntentNameT>(value);
48 }
49 template <typename IntentNameT = Aws::String>
50 PostTextResult& WithIntentName(IntentNameT&& value) {
51 SetIntentName(std::forward<IntentNameT>(value));
52 return *this;
53 }
55
57
65 inline const IntentConfidence& GetNluIntentConfidence() const { return m_nluIntentConfidence; }
66 template <typename NluIntentConfidenceT = IntentConfidence>
67 void SetNluIntentConfidence(NluIntentConfidenceT&& value) {
68 m_nluIntentConfidenceHasBeenSet = true;
69 m_nluIntentConfidence = std::forward<NluIntentConfidenceT>(value);
70 }
71 template <typename NluIntentConfidenceT = IntentConfidence>
72 PostTextResult& WithNluIntentConfidence(NluIntentConfidenceT&& value) {
73 SetNluIntentConfidence(std::forward<NluIntentConfidenceT>(value));
74 return *this;
75 }
77
79
85 inline const Aws::Vector<PredictedIntent>& GetAlternativeIntents() const { return m_alternativeIntents; }
86 template <typename AlternativeIntentsT = Aws::Vector<PredictedIntent>>
87 void SetAlternativeIntents(AlternativeIntentsT&& value) {
88 m_alternativeIntentsHasBeenSet = true;
89 m_alternativeIntents = std::forward<AlternativeIntentsT>(value);
90 }
91 template <typename AlternativeIntentsT = Aws::Vector<PredictedIntent>>
92 PostTextResult& WithAlternativeIntents(AlternativeIntentsT&& value) {
93 SetAlternativeIntents(std::forward<AlternativeIntentsT>(value));
94 return *this;
95 }
96 template <typename AlternativeIntentsT = PredictedIntent>
97 PostTextResult& AddAlternativeIntents(AlternativeIntentsT&& value) {
98 m_alternativeIntentsHasBeenSet = true;
99 m_alternativeIntents.emplace_back(std::forward<AlternativeIntentsT>(value));
100 return *this;
101 }
103
105
118 inline const Aws::Map<Aws::String, Aws::String>& GetSlots() const { return m_slots; }
119 template <typename SlotsT = Aws::Map<Aws::String, Aws::String>>
120 void SetSlots(SlotsT&& value) {
121 m_slotsHasBeenSet = true;
122 m_slots = std::forward<SlotsT>(value);
123 }
124 template <typename SlotsT = Aws::Map<Aws::String, Aws::String>>
125 PostTextResult& WithSlots(SlotsT&& value) {
126 SetSlots(std::forward<SlotsT>(value));
127 return *this;
128 }
129 template <typename SlotsKeyT = Aws::String, typename SlotsValueT = Aws::String>
130 PostTextResult& AddSlots(SlotsKeyT&& key, SlotsValueT&& value) {
131 m_slotsHasBeenSet = true;
132 m_slots.emplace(std::forward<SlotsKeyT>(key), std::forward<SlotsValueT>(value));
133 return *this;
134 }
136
138
142 inline const Aws::Map<Aws::String, Aws::String>& GetSessionAttributes() const { return m_sessionAttributes; }
143 template <typename SessionAttributesT = Aws::Map<Aws::String, Aws::String>>
144 void SetSessionAttributes(SessionAttributesT&& value) {
145 m_sessionAttributesHasBeenSet = true;
146 m_sessionAttributes = std::forward<SessionAttributesT>(value);
147 }
148 template <typename SessionAttributesT = Aws::Map<Aws::String, Aws::String>>
149 PostTextResult& WithSessionAttributes(SessionAttributesT&& value) {
150 SetSessionAttributes(std::forward<SessionAttributesT>(value));
151 return *this;
152 }
153 template <typename SessionAttributesKeyT = Aws::String, typename SessionAttributesValueT = Aws::String>
154 PostTextResult& AddSessionAttributes(SessionAttributesKeyT&& key, SessionAttributesValueT&& value) {
155 m_sessionAttributesHasBeenSet = true;
156 m_sessionAttributes.emplace(std::forward<SessionAttributesKeyT>(key), std::forward<SessionAttributesValueT>(value));
157 return *this;
158 }
160
162
177 inline const Aws::String& GetMessage() const { return m_message; }
178 template <typename MessageT = Aws::String>
179 void SetMessage(MessageT&& value) {
180 m_messageHasBeenSet = true;
181 m_message = std::forward<MessageT>(value);
182 }
183 template <typename MessageT = Aws::String>
184 PostTextResult& WithMessage(MessageT&& value) {
185 SetMessage(std::forward<MessageT>(value));
186 return *this;
187 }
189
191
196 inline const SentimentResponse& GetSentimentResponse() const { return m_sentimentResponse; }
197 template <typename SentimentResponseT = SentimentResponse>
198 void SetSentimentResponse(SentimentResponseT&& value) {
199 m_sentimentResponseHasBeenSet = true;
200 m_sentimentResponse = std::forward<SentimentResponseT>(value);
201 }
202 template <typename SentimentResponseT = SentimentResponse>
203 PostTextResult& WithSentimentResponse(SentimentResponseT&& value) {
204 SetSentimentResponse(std::forward<SentimentResponseT>(value));
205 return *this;
206 }
208
210
220 inline MessageFormatType GetMessageFormat() const { return m_messageFormat; }
222 m_messageFormatHasBeenSet = true;
223 m_messageFormat = value;
224 }
226 SetMessageFormat(value);
227 return *this;
228 }
230
232
261 inline DialogState GetDialogState() const { return m_dialogState; }
262 inline void SetDialogState(DialogState value) {
263 m_dialogStateHasBeenSet = true;
264 m_dialogState = value;
265 }
267 SetDialogState(value);
268 return *this;
269 }
271
273
277 inline const Aws::String& GetSlotToElicit() const { return m_slotToElicit; }
278 template <typename SlotToElicitT = Aws::String>
279 void SetSlotToElicit(SlotToElicitT&& value) {
280 m_slotToElicitHasBeenSet = true;
281 m_slotToElicit = std::forward<SlotToElicitT>(value);
282 }
283 template <typename SlotToElicitT = Aws::String>
284 PostTextResult& WithSlotToElicit(SlotToElicitT&& value) {
285 SetSlotToElicit(std::forward<SlotToElicitT>(value));
286 return *this;
287 }
289
291
297 inline const ResponseCard& GetResponseCard() const { return m_responseCard; }
298 template <typename ResponseCardT = ResponseCard>
299 void SetResponseCard(ResponseCardT&& value) {
300 m_responseCardHasBeenSet = true;
301 m_responseCard = std::forward<ResponseCardT>(value);
302 }
303 template <typename ResponseCardT = ResponseCard>
304 PostTextResult& WithResponseCard(ResponseCardT&& value) {
305 SetResponseCard(std::forward<ResponseCardT>(value));
306 return *this;
307 }
309
311
314 inline const Aws::String& GetSessionId() const { return m_sessionId; }
315 template <typename SessionIdT = Aws::String>
316 void SetSessionId(SessionIdT&& value) {
317 m_sessionIdHasBeenSet = true;
318 m_sessionId = std::forward<SessionIdT>(value);
319 }
320 template <typename SessionIdT = Aws::String>
321 PostTextResult& WithSessionId(SessionIdT&& value) {
322 SetSessionId(std::forward<SessionIdT>(value));
323 return *this;
324 }
326
328
333 inline const Aws::String& GetBotVersion() const { return m_botVersion; }
334 template <typename BotVersionT = Aws::String>
335 void SetBotVersion(BotVersionT&& value) {
336 m_botVersionHasBeenSet = true;
337 m_botVersion = std::forward<BotVersionT>(value);
338 }
339 template <typename BotVersionT = Aws::String>
340 PostTextResult& WithBotVersion(BotVersionT&& value) {
341 SetBotVersion(std::forward<BotVersionT>(value));
342 return *this;
343 }
345
347
354 inline const Aws::Vector<ActiveContext>& GetActiveContexts() const { return m_activeContexts; }
355 template <typename ActiveContextsT = Aws::Vector<ActiveContext>>
356 void SetActiveContexts(ActiveContextsT&& value) {
357 m_activeContextsHasBeenSet = true;
358 m_activeContexts = std::forward<ActiveContextsT>(value);
359 }
360 template <typename ActiveContextsT = Aws::Vector<ActiveContext>>
361 PostTextResult& WithActiveContexts(ActiveContextsT&& value) {
362 SetActiveContexts(std::forward<ActiveContextsT>(value));
363 return *this;
364 }
365 template <typename ActiveContextsT = ActiveContext>
366 PostTextResult& AddActiveContexts(ActiveContextsT&& value) {
367 m_activeContextsHasBeenSet = true;
368 m_activeContexts.emplace_back(std::forward<ActiveContextsT>(value));
369 return *this;
370 }
372
374
375 inline const Aws::String& GetRequestId() const { return m_requestId; }
376 template <typename RequestIdT = Aws::String>
377 void SetRequestId(RequestIdT&& value) {
378 m_requestIdHasBeenSet = true;
379 m_requestId = std::forward<RequestIdT>(value);
380 }
381 template <typename RequestIdT = Aws::String>
382 PostTextResult& WithRequestId(RequestIdT&& value) {
383 SetRequestId(std::forward<RequestIdT>(value));
384 return *this;
385 }
387 inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; }
388
389 private:
390 Aws::String m_intentName;
391
392 IntentConfidence m_nluIntentConfidence;
393
394 Aws::Vector<PredictedIntent> m_alternativeIntents;
395
397
398 Aws::Map<Aws::String, Aws::String> m_sessionAttributes;
399
400 Aws::String m_message;
401
402 SentimentResponse m_sentimentResponse;
403
405
406 DialogState m_dialogState{DialogState::NOT_SET};
407
408 Aws::String m_slotToElicit;
409
410 ResponseCard m_responseCard;
411
412 Aws::String m_sessionId;
413
414 Aws::String m_botVersion;
415
416 Aws::Vector<ActiveContext> m_activeContexts;
417
418 Aws::String m_requestId;
419 Aws::Http::HttpResponseCode m_HttpResponseCode;
420 bool m_intentNameHasBeenSet = false;
421 bool m_nluIntentConfidenceHasBeenSet = false;
422 bool m_alternativeIntentsHasBeenSet = false;
423 bool m_slotsHasBeenSet = false;
424 bool m_sessionAttributesHasBeenSet = false;
425 bool m_messageHasBeenSet = false;
426 bool m_sentimentResponseHasBeenSet = false;
427 bool m_messageFormatHasBeenSet = false;
428 bool m_dialogStateHasBeenSet = false;
429 bool m_slotToElicitHasBeenSet = false;
430 bool m_responseCardHasBeenSet = false;
431 bool m_sessionIdHasBeenSet = false;
432 bool m_botVersionHasBeenSet = false;
433 bool m_activeContextsHasBeenSet = false;
434 bool m_requestIdHasBeenSet = false;
435};
436
437} // namespace Model
438} // namespace LexRuntimeService
439} // namespace Aws
const ResponseCard & GetResponseCard() const
AWS_LEXRUNTIMESERVICE_API PostTextResult(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
PostTextResult & AddActiveContexts(ActiveContextsT &&value)
const Aws::Vector< PredictedIntent > & GetAlternativeIntents() const
void SetAlternativeIntents(AlternativeIntentsT &&value)
PostTextResult & WithSessionAttributes(SessionAttributesT &&value)
void SetMessageFormat(MessageFormatType value)
PostTextResult & AddAlternativeIntents(AlternativeIntentsT &&value)
void SetNluIntentConfidence(NluIntentConfidenceT &&value)
PostTextResult & WithMessage(MessageT &&value)
PostTextResult & WithSentimentResponse(SentimentResponseT &&value)
PostTextResult & WithDialogState(DialogState value)
PostTextResult & WithAlternativeIntents(AlternativeIntentsT &&value)
void SetSlots(SlotsT &&value)
PostTextResult & AddSlots(SlotsKeyT &&key, SlotsValueT &&value)
void SetResponseCard(ResponseCardT &&value)
const Aws::String & GetMessage() const
PostTextResult & WithActiveContexts(ActiveContextsT &&value)
AWS_LEXRUNTIMESERVICE_API PostTextResult()=default
PostTextResult & WithBotVersion(BotVersionT &&value)
const Aws::Map< Aws::String, Aws::String > & GetSlots() const
void SetSentimentResponse(SentimentResponseT &&value)
void SetSlotToElicit(SlotToElicitT &&value)
const Aws::Vector< ActiveContext > & GetActiveContexts() const
void SetSessionId(SessionIdT &&value)
const IntentConfidence & GetNluIntentConfidence() const
void SetBotVersion(BotVersionT &&value)
const Aws::String & GetBotVersion() const
PostTextResult & WithNluIntentConfidence(NluIntentConfidenceT &&value)
PostTextResult & WithMessageFormat(MessageFormatType value)
MessageFormatType GetMessageFormat() const
void SetRequestId(RequestIdT &&value)
AWS_LEXRUNTIMESERVICE_API PostTextResult & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
PostTextResult & WithSessionId(SessionIdT &&value)
PostTextResult & WithSlots(SlotsT &&value)
PostTextResult & WithRequestId(RequestIdT &&value)
void SetMessage(MessageT &&value)
const Aws::String & GetSlotToElicit() const
PostTextResult & WithResponseCard(ResponseCardT &&value)
const Aws::String & GetSessionId() const
const Aws::String & GetIntentName() const
PostTextResult & WithSlotToElicit(SlotToElicitT &&value)
const SentimentResponse & GetSentimentResponse() const
PostTextResult & WithIntentName(IntentNameT &&value)
const Aws::String & GetRequestId() const
PostTextResult & AddSessionAttributes(SessionAttributesKeyT &&key, SessionAttributesValueT &&value)
DialogState GetDialogState() const
void SetIntentName(IntentNameT &&value)
Aws::Http::HttpResponseCode GetHttpResponseCode() const
void SetActiveContexts(ActiveContextsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetSessionAttributes() const
void SetDialogState(DialogState value)
void SetSessionAttributes(SessionAttributesT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue