AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
PutSessionRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/lex/LexRuntimeServiceRequest.h>
11#include <aws/lex/LexRuntimeService_EXPORTS.h>
12#include <aws/lex/model/ActiveContext.h>
13#include <aws/lex/model/DialogAction.h>
14#include <aws/lex/model/IntentSummary.h>
15
16#include <utility>
17
18namespace Aws {
19namespace LexRuntimeService {
20namespace Model {
21
25 public:
26 AWS_LEXRUNTIMESERVICE_API PutSessionRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "PutSession"; }
33
34 AWS_LEXRUNTIMESERVICE_API Aws::String SerializePayload() const override;
35
36 AWS_LEXRUNTIMESERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37
39
42 inline const Aws::String& GetBotName() const { return m_botName; }
43 inline bool BotNameHasBeenSet() const { return m_botNameHasBeenSet; }
44 template <typename BotNameT = Aws::String>
45 void SetBotName(BotNameT&& value) {
46 m_botNameHasBeenSet = true;
47 m_botName = std::forward<BotNameT>(value);
48 }
49 template <typename BotNameT = Aws::String>
50 PutSessionRequest& WithBotName(BotNameT&& value) {
51 SetBotName(std::forward<BotNameT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetBotAlias() const { return m_botAlias; }
61 inline bool BotAliasHasBeenSet() const { return m_botAliasHasBeenSet; }
62 template <typename BotAliasT = Aws::String>
63 void SetBotAlias(BotAliasT&& value) {
64 m_botAliasHasBeenSet = true;
65 m_botAlias = std::forward<BotAliasT>(value);
66 }
67 template <typename BotAliasT = Aws::String>
68 PutSessionRequest& WithBotAlias(BotAliasT&& value) {
69 SetBotAlias(std::forward<BotAliasT>(value));
70 return *this;
71 }
73
75
79 inline const Aws::String& GetUserId() const { return m_userId; }
80 inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
81 template <typename UserIdT = Aws::String>
82 void SetUserId(UserIdT&& value) {
83 m_userIdHasBeenSet = true;
84 m_userId = std::forward<UserIdT>(value);
85 }
86 template <typename UserIdT = Aws::String>
87 PutSessionRequest& WithUserId(UserIdT&& value) {
88 SetUserId(std::forward<UserIdT>(value));
89 return *this;
90 }
92
94
99 inline const Aws::Map<Aws::String, Aws::String>& GetSessionAttributes() const { return m_sessionAttributes; }
100 inline bool SessionAttributesHasBeenSet() const { return m_sessionAttributesHasBeenSet; }
101 template <typename SessionAttributesT = Aws::Map<Aws::String, Aws::String>>
102 void SetSessionAttributes(SessionAttributesT&& value) {
103 m_sessionAttributesHasBeenSet = true;
104 m_sessionAttributes = std::forward<SessionAttributesT>(value);
105 }
106 template <typename SessionAttributesT = Aws::Map<Aws::String, Aws::String>>
107 PutSessionRequest& WithSessionAttributes(SessionAttributesT&& value) {
108 SetSessionAttributes(std::forward<SessionAttributesT>(value));
109 return *this;
110 }
111 template <typename SessionAttributesKeyT = Aws::String, typename SessionAttributesValueT = Aws::String>
112 PutSessionRequest& AddSessionAttributes(SessionAttributesKeyT&& key, SessionAttributesValueT&& value) {
113 m_sessionAttributesHasBeenSet = true;
114 m_sessionAttributes.emplace(std::forward<SessionAttributesKeyT>(key), std::forward<SessionAttributesValueT>(value));
115 return *this;
116 }
118
120
124 inline const DialogAction& GetDialogAction() const { return m_dialogAction; }
125 inline bool DialogActionHasBeenSet() const { return m_dialogActionHasBeenSet; }
126 template <typename DialogActionT = DialogAction>
127 void SetDialogAction(DialogActionT&& value) {
128 m_dialogActionHasBeenSet = true;
129 m_dialogAction = std::forward<DialogActionT>(value);
130 }
131 template <typename DialogActionT = DialogAction>
132 PutSessionRequest& WithDialogAction(DialogActionT&& value) {
133 SetDialogAction(std::forward<DialogActionT>(value));
134 return *this;
135 }
137
139
154 inline const Aws::Vector<IntentSummary>& GetRecentIntentSummaryView() const { return m_recentIntentSummaryView; }
155 inline bool RecentIntentSummaryViewHasBeenSet() const { return m_recentIntentSummaryViewHasBeenSet; }
156 template <typename RecentIntentSummaryViewT = Aws::Vector<IntentSummary>>
157 void SetRecentIntentSummaryView(RecentIntentSummaryViewT&& value) {
158 m_recentIntentSummaryViewHasBeenSet = true;
159 m_recentIntentSummaryView = std::forward<RecentIntentSummaryViewT>(value);
160 }
161 template <typename RecentIntentSummaryViewT = Aws::Vector<IntentSummary>>
162 PutSessionRequest& WithRecentIntentSummaryView(RecentIntentSummaryViewT&& value) {
163 SetRecentIntentSummaryView(std::forward<RecentIntentSummaryViewT>(value));
164 return *this;
165 }
166 template <typename RecentIntentSummaryViewT = IntentSummary>
167 PutSessionRequest& AddRecentIntentSummaryView(RecentIntentSummaryViewT&& value) {
168 m_recentIntentSummaryViewHasBeenSet = true;
169 m_recentIntentSummaryView.emplace_back(std::forward<RecentIntentSummaryViewT>(value));
170 return *this;
171 }
173
175
191 inline const Aws::String& GetAccept() const { return m_accept; }
192 inline bool AcceptHasBeenSet() const { return m_acceptHasBeenSet; }
193 template <typename AcceptT = Aws::String>
194 void SetAccept(AcceptT&& value) {
195 m_acceptHasBeenSet = true;
196 m_accept = std::forward<AcceptT>(value);
197 }
198 template <typename AcceptT = Aws::String>
199 PutSessionRequest& WithAccept(AcceptT&& value) {
200 SetAccept(std::forward<AcceptT>(value));
201 return *this;
202 }
204
206
213 inline const Aws::Vector<ActiveContext>& GetActiveContexts() const { return m_activeContexts; }
214 inline bool ActiveContextsHasBeenSet() const { return m_activeContextsHasBeenSet; }
215 template <typename ActiveContextsT = Aws::Vector<ActiveContext>>
216 void SetActiveContexts(ActiveContextsT&& value) {
217 m_activeContextsHasBeenSet = true;
218 m_activeContexts = std::forward<ActiveContextsT>(value);
219 }
220 template <typename ActiveContextsT = Aws::Vector<ActiveContext>>
221 PutSessionRequest& WithActiveContexts(ActiveContextsT&& value) {
222 SetActiveContexts(std::forward<ActiveContextsT>(value));
223 return *this;
224 }
225 template <typename ActiveContextsT = ActiveContext>
226 PutSessionRequest& AddActiveContexts(ActiveContextsT&& value) {
227 m_activeContextsHasBeenSet = true;
228 m_activeContexts.emplace_back(std::forward<ActiveContextsT>(value));
229 return *this;
230 }
232 private:
233 Aws::String m_botName;
234
235 Aws::String m_botAlias;
236
237 Aws::String m_userId;
238
239 Aws::Map<Aws::String, Aws::String> m_sessionAttributes;
240
241 DialogAction m_dialogAction;
242
243 Aws::Vector<IntentSummary> m_recentIntentSummaryView;
244
245 Aws::String m_accept;
246
247 Aws::Vector<ActiveContext> m_activeContexts;
248 bool m_botNameHasBeenSet = false;
249 bool m_botAliasHasBeenSet = false;
250 bool m_userIdHasBeenSet = false;
251 bool m_sessionAttributesHasBeenSet = false;
252 bool m_dialogActionHasBeenSet = false;
253 bool m_recentIntentSummaryViewHasBeenSet = false;
254 bool m_acceptHasBeenSet = false;
255 bool m_activeContextsHasBeenSet = false;
256};
257
258} // namespace Model
259} // namespace LexRuntimeService
260} // namespace Aws
PutSessionRequest & AddSessionAttributes(SessionAttributesKeyT &&key, SessionAttributesValueT &&value)
AWS_LEXRUNTIMESERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
PutSessionRequest & WithRecentIntentSummaryView(RecentIntentSummaryViewT &&value)
const Aws::Vector< ActiveContext > & GetActiveContexts() const
AWS_LEXRUNTIMESERVICE_API PutSessionRequest()=default
PutSessionRequest & WithSessionAttributes(SessionAttributesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetSessionAttributes() const
virtual const char * GetServiceRequestName() const override
PutSessionRequest & WithUserId(UserIdT &&value)
PutSessionRequest & AddActiveContexts(ActiveContextsT &&value)
PutSessionRequest & WithActiveContexts(ActiveContextsT &&value)
PutSessionRequest & WithBotAlias(BotAliasT &&value)
PutSessionRequest & AddRecentIntentSummaryView(RecentIntentSummaryViewT &&value)
const Aws::Vector< IntentSummary > & GetRecentIntentSummaryView() const
void SetRecentIntentSummaryView(RecentIntentSummaryViewT &&value)
PutSessionRequest & WithAccept(AcceptT &&value)
AWS_LEXRUNTIMESERVICE_API Aws::String SerializePayload() const override
PutSessionRequest & WithDialogAction(DialogActionT &&value)
void SetSessionAttributes(SessionAttributesT &&value)
PutSessionRequest & WithBotName(BotNameT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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