AWS SDK for C++

AWS SDK for C++ Version 1.11.924

Loading...
Searching...
No Matches
ExecuteStatementRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/redshift-data/RedshiftDataAPIServiceRequest.h>
11#include <aws/redshift-data/RedshiftDataAPIService_EXPORTS.h>
12#include <aws/redshift-data/model/ResultFormatString.h>
13#include <aws/redshift-data/model/SqlParameter.h>
14
15#include <utility>
16
17namespace Aws {
18namespace RedshiftDataAPIService {
19namespace Model {
20
24 public:
25 AWS_REDSHIFTDATAAPISERVICE_API ExecuteStatementRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "ExecuteStatement"; }
32
33 AWS_REDSHIFTDATAAPISERVICE_API Aws::String SerializePayload() const override;
34
35 AWS_REDSHIFTDATAAPISERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36
38
41 inline const Aws::String& GetSql() const { return m_sql; }
42 inline bool SqlHasBeenSet() const { return m_sqlHasBeenSet; }
43 template <typename SqlT = Aws::String>
44 void SetSql(SqlT&& value) {
45 m_sqlHasBeenSet = true;
46 m_sql = std::forward<SqlT>(value);
47 }
48 template <typename SqlT = Aws::String>
50 SetSql(std::forward<SqlT>(value));
51 return *this;
52 }
54
56
61 inline const Aws::String& GetClusterIdentifier() const { return m_clusterIdentifier; }
62 inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; }
63 template <typename ClusterIdentifierT = Aws::String>
64 void SetClusterIdentifier(ClusterIdentifierT&& value) {
65 m_clusterIdentifierHasBeenSet = true;
66 m_clusterIdentifier = std::forward<ClusterIdentifierT>(value);
67 }
68 template <typename ClusterIdentifierT = Aws::String>
69 ExecuteStatementRequest& WithClusterIdentifier(ClusterIdentifierT&& value) {
70 SetClusterIdentifier(std::forward<ClusterIdentifierT>(value));
71 return *this;
72 }
74
76
80 inline const Aws::String& GetSecretArn() const { return m_secretArn; }
81 inline bool SecretArnHasBeenSet() const { return m_secretArnHasBeenSet; }
82 template <typename SecretArnT = Aws::String>
83 void SetSecretArn(SecretArnT&& value) {
84 m_secretArnHasBeenSet = true;
85 m_secretArn = std::forward<SecretArnT>(value);
86 }
87 template <typename SecretArnT = Aws::String>
89 SetSecretArn(std::forward<SecretArnT>(value));
90 return *this;
91 }
93
95
99 inline const Aws::String& GetDbUser() const { return m_dbUser; }
100 inline bool DbUserHasBeenSet() const { return m_dbUserHasBeenSet; }
101 template <typename DbUserT = Aws::String>
102 void SetDbUser(DbUserT&& value) {
103 m_dbUserHasBeenSet = true;
104 m_dbUser = std::forward<DbUserT>(value);
105 }
106 template <typename DbUserT = Aws::String>
108 SetDbUser(std::forward<DbUserT>(value));
109 return *this;
110 }
112
114
118 inline const Aws::String& GetDatabase() const { return m_database; }
119 inline bool DatabaseHasBeenSet() const { return m_databaseHasBeenSet; }
120 template <typename DatabaseT = Aws::String>
121 void SetDatabase(DatabaseT&& value) {
122 m_databaseHasBeenSet = true;
123 m_database = std::forward<DatabaseT>(value);
124 }
125 template <typename DatabaseT = Aws::String>
127 SetDatabase(std::forward<DatabaseT>(value));
128 return *this;
129 }
131
133
137 inline bool GetWithEvent() const { return m_withEvent; }
138 inline bool WithEventHasBeenSet() const { return m_withEventHasBeenSet; }
139 inline void SetWithEvent(bool value) {
140 m_withEventHasBeenSet = true;
141 m_withEvent = value;
142 }
144 SetWithEvent(value);
145 return *this;
146 }
148
150
154 inline const Aws::String& GetStatementName() const { return m_statementName; }
155 inline bool StatementNameHasBeenSet() const { return m_statementNameHasBeenSet; }
156 template <typename StatementNameT = Aws::String>
157 void SetStatementName(StatementNameT&& value) {
158 m_statementNameHasBeenSet = true;
159 m_statementName = std::forward<StatementNameT>(value);
160 }
161 template <typename StatementNameT = Aws::String>
163 SetStatementName(std::forward<StatementNameT>(value));
164 return *this;
165 }
167
169
172 inline const Aws::Vector<SqlParameter>& GetParameters() const { return m_parameters; }
173 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
174 template <typename ParametersT = Aws::Vector<SqlParameter>>
175 void SetParameters(ParametersT&& value) {
176 m_parametersHasBeenSet = true;
177 m_parameters = std::forward<ParametersT>(value);
178 }
179 template <typename ParametersT = Aws::Vector<SqlParameter>>
181 SetParameters(std::forward<ParametersT>(value));
182 return *this;
183 }
184 template <typename ParametersT = SqlParameter>
186 m_parametersHasBeenSet = true;
187 m_parameters.emplace_back(std::forward<ParametersT>(value));
188 return *this;
189 }
191
193
198 inline const Aws::String& GetWorkgroupName() const { return m_workgroupName; }
199 inline bool WorkgroupNameHasBeenSet() const { return m_workgroupNameHasBeenSet; }
200 template <typename WorkgroupNameT = Aws::String>
201 void SetWorkgroupName(WorkgroupNameT&& value) {
202 m_workgroupNameHasBeenSet = true;
203 m_workgroupName = std::forward<WorkgroupNameT>(value);
204 }
205 template <typename WorkgroupNameT = Aws::String>
207 SetWorkgroupName(std::forward<WorkgroupNameT>(value));
208 return *this;
209 }
211
213
217 inline const Aws::String& GetClientToken() const { return m_clientToken; }
218 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
219 template <typename ClientTokenT = Aws::String>
220 void SetClientToken(ClientTokenT&& value) {
221 m_clientTokenHasBeenSet = true;
222 m_clientToken = std::forward<ClientTokenT>(value);
223 }
224 template <typename ClientTokenT = Aws::String>
226 SetClientToken(std::forward<ClientTokenT>(value));
227 return *this;
228 }
230
232
236 inline ResultFormatString GetResultFormat() const { return m_resultFormat; }
237 inline bool ResultFormatHasBeenSet() const { return m_resultFormatHasBeenSet; }
239 m_resultFormatHasBeenSet = true;
240 m_resultFormat = value;
241 }
243 SetResultFormat(value);
244 return *this;
245 }
247
249
254 inline int GetSessionKeepAliveSeconds() const { return m_sessionKeepAliveSeconds; }
255 inline bool SessionKeepAliveSecondsHasBeenSet() const { return m_sessionKeepAliveSecondsHasBeenSet; }
256 inline void SetSessionKeepAliveSeconds(int value) {
257 m_sessionKeepAliveSecondsHasBeenSet = true;
258 m_sessionKeepAliveSeconds = value;
259 }
262 return *this;
263 }
265
267
270 inline const Aws::String& GetSessionId() const { return m_sessionId; }
271 inline bool SessionIdHasBeenSet() const { return m_sessionIdHasBeenSet; }
272 template <typename SessionIdT = Aws::String>
273 void SetSessionId(SessionIdT&& value) {
274 m_sessionIdHasBeenSet = true;
275 m_sessionId = std::forward<SessionIdT>(value);
276 }
277 template <typename SessionIdT = Aws::String>
279 SetSessionId(std::forward<SessionIdT>(value));
280 return *this;
281 }
283
285
291 inline int GetWaitTimeSeconds() const { return m_waitTimeSeconds; }
292 inline bool WaitTimeSecondsHasBeenSet() const { return m_waitTimeSecondsHasBeenSet; }
293 inline void SetWaitTimeSeconds(int value) {
294 m_waitTimeSecondsHasBeenSet = true;
295 m_waitTimeSeconds = value;
296 }
298 SetWaitTimeSeconds(value);
299 return *this;
300 }
302 private:
303 Aws::String m_sql;
304
305 Aws::String m_clusterIdentifier;
306
307 Aws::String m_secretArn;
308
309 Aws::String m_dbUser;
310
311 Aws::String m_database;
312
313 bool m_withEvent{false};
314
315 Aws::String m_statementName;
316
317 Aws::Vector<SqlParameter> m_parameters;
318
319 Aws::String m_workgroupName;
320
322
324
325 int m_sessionKeepAliveSeconds{0};
326
327 Aws::String m_sessionId;
328
329 int m_waitTimeSeconds{0};
330 bool m_sqlHasBeenSet = false;
331 bool m_clusterIdentifierHasBeenSet = false;
332 bool m_secretArnHasBeenSet = false;
333 bool m_dbUserHasBeenSet = false;
334 bool m_databaseHasBeenSet = false;
335 bool m_withEventHasBeenSet = false;
336 bool m_statementNameHasBeenSet = false;
337 bool m_parametersHasBeenSet = false;
338 bool m_workgroupNameHasBeenSet = false;
339 bool m_clientTokenHasBeenSet = true;
340 bool m_resultFormatHasBeenSet = false;
341 bool m_sessionKeepAliveSecondsHasBeenSet = false;
342 bool m_sessionIdHasBeenSet = false;
343 bool m_waitTimeSecondsHasBeenSet = false;
344};
345
346} // namespace Model
347} // namespace RedshiftDataAPIService
348} // namespace Aws
ExecuteStatementRequest & WithResultFormat(ResultFormatString value)
ExecuteStatementRequest & AddParameters(ParametersT &&value)
AWS_REDSHIFTDATAAPISERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
ExecuteStatementRequest & WithWorkgroupName(WorkgroupNameT &&value)
ExecuteStatementRequest & WithStatementName(StatementNameT &&value)
ExecuteStatementRequest & WithClientToken(ClientTokenT &&value)
AWS_REDSHIFTDATAAPISERVICE_API ExecuteStatementRequest()=default
ExecuteStatementRequest & WithSessionId(SessionIdT &&value)
ExecuteStatementRequest & WithParameters(ParametersT &&value)
ExecuteStatementRequest & WithSecretArn(SecretArnT &&value)
AWS_REDSHIFTDATAAPISERVICE_API Aws::String SerializePayload() const override
ExecuteStatementRequest & WithClusterIdentifier(ClusterIdentifierT &&value)
ExecuteStatementRequest & WithDatabase(DatabaseT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector