AWS SDK for C++

AWS SDK for C++ Version 1.11.742

Loading...
Searching...
No Matches
CreateDataSourceRequest.h
1
6#pragma once
7#include <aws/appsync/AppSyncRequest.h>
8#include <aws/appsync/AppSync_EXPORTS.h>
9#include <aws/appsync/model/DataSourceLevelMetricsConfig.h>
10#include <aws/appsync/model/DataSourceType.h>
11#include <aws/appsync/model/DynamodbDataSourceConfig.h>
12#include <aws/appsync/model/ElasticsearchDataSourceConfig.h>
13#include <aws/appsync/model/EventBridgeDataSourceConfig.h>
14#include <aws/appsync/model/HttpDataSourceConfig.h>
15#include <aws/appsync/model/LambdaDataSourceConfig.h>
16#include <aws/appsync/model/OpenSearchServiceDataSourceConfig.h>
17#include <aws/appsync/model/RelationalDatabaseDataSourceConfig.h>
18#include <aws/core/utils/memory/stl/AWSString.h>
19
20#include <utility>
21
22namespace Aws {
23namespace AppSync {
24namespace Model {
25
29 public:
30 AWS_APPSYNC_API CreateDataSourceRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateDataSource"; }
37
38 AWS_APPSYNC_API Aws::String SerializePayload() const override;
39
41
44 inline const Aws::String& GetApiId() const { return m_apiId; }
45 inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; }
46 template <typename ApiIdT = Aws::String>
47 void SetApiId(ApiIdT&& value) {
48 m_apiIdHasBeenSet = true;
49 m_apiId = std::forward<ApiIdT>(value);
50 }
51 template <typename ApiIdT = Aws::String>
53 SetApiId(std::forward<ApiIdT>(value));
54 return *this;
55 }
57
59
62 inline const Aws::String& GetName() const { return m_name; }
63 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
64 template <typename NameT = Aws::String>
65 void SetName(NameT&& value) {
66 m_nameHasBeenSet = true;
67 m_name = std::forward<NameT>(value);
68 }
69 template <typename NameT = Aws::String>
71 SetName(std::forward<NameT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::String& GetDescription() const { return m_description; }
81 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
82 template <typename DescriptionT = Aws::String>
83 void SetDescription(DescriptionT&& value) {
84 m_descriptionHasBeenSet = true;
85 m_description = std::forward<DescriptionT>(value);
86 }
87 template <typename DescriptionT = Aws::String>
89 SetDescription(std::forward<DescriptionT>(value));
90 return *this;
91 }
93
95
98 inline DataSourceType GetType() const { return m_type; }
99 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
100 inline void SetType(DataSourceType value) {
101 m_typeHasBeenSet = true;
102 m_type = value;
103 }
105 SetType(value);
106 return *this;
107 }
109
111
116 inline const Aws::String& GetServiceRoleArn() const { return m_serviceRoleArn; }
117 inline bool ServiceRoleArnHasBeenSet() const { return m_serviceRoleArnHasBeenSet; }
118 template <typename ServiceRoleArnT = Aws::String>
119 void SetServiceRoleArn(ServiceRoleArnT&& value) {
120 m_serviceRoleArnHasBeenSet = true;
121 m_serviceRoleArn = std::forward<ServiceRoleArnT>(value);
122 }
123 template <typename ServiceRoleArnT = Aws::String>
124 CreateDataSourceRequest& WithServiceRoleArn(ServiceRoleArnT&& value) {
125 SetServiceRoleArn(std::forward<ServiceRoleArnT>(value));
126 return *this;
127 }
129
131
134 inline const DynamodbDataSourceConfig& GetDynamodbConfig() const { return m_dynamodbConfig; }
135 inline bool DynamodbConfigHasBeenSet() const { return m_dynamodbConfigHasBeenSet; }
136 template <typename DynamodbConfigT = DynamodbDataSourceConfig>
137 void SetDynamodbConfig(DynamodbConfigT&& value) {
138 m_dynamodbConfigHasBeenSet = true;
139 m_dynamodbConfig = std::forward<DynamodbConfigT>(value);
140 }
141 template <typename DynamodbConfigT = DynamodbDataSourceConfig>
142 CreateDataSourceRequest& WithDynamodbConfig(DynamodbConfigT&& value) {
143 SetDynamodbConfig(std::forward<DynamodbConfigT>(value));
144 return *this;
145 }
147
149
152 inline const LambdaDataSourceConfig& GetLambdaConfig() const { return m_lambdaConfig; }
153 inline bool LambdaConfigHasBeenSet() const { return m_lambdaConfigHasBeenSet; }
154 template <typename LambdaConfigT = LambdaDataSourceConfig>
155 void SetLambdaConfig(LambdaConfigT&& value) {
156 m_lambdaConfigHasBeenSet = true;
157 m_lambdaConfig = std::forward<LambdaConfigT>(value);
158 }
159 template <typename LambdaConfigT = LambdaDataSourceConfig>
161 SetLambdaConfig(std::forward<LambdaConfigT>(value));
162 return *this;
163 }
165
167
174 inline const ElasticsearchDataSourceConfig& GetElasticsearchConfig() const { return m_elasticsearchConfig; }
175 inline bool ElasticsearchConfigHasBeenSet() const { return m_elasticsearchConfigHasBeenSet; }
176 template <typename ElasticsearchConfigT = ElasticsearchDataSourceConfig>
177 void SetElasticsearchConfig(ElasticsearchConfigT&& value) {
178 m_elasticsearchConfigHasBeenSet = true;
179 m_elasticsearchConfig = std::forward<ElasticsearchConfigT>(value);
180 }
181 template <typename ElasticsearchConfigT = ElasticsearchDataSourceConfig>
182 CreateDataSourceRequest& WithElasticsearchConfig(ElasticsearchConfigT&& value) {
183 SetElasticsearchConfig(std::forward<ElasticsearchConfigT>(value));
184 return *this;
185 }
187
189
192 inline const OpenSearchServiceDataSourceConfig& GetOpenSearchServiceConfig() const { return m_openSearchServiceConfig; }
193 inline bool OpenSearchServiceConfigHasBeenSet() const { return m_openSearchServiceConfigHasBeenSet; }
194 template <typename OpenSearchServiceConfigT = OpenSearchServiceDataSourceConfig>
195 void SetOpenSearchServiceConfig(OpenSearchServiceConfigT&& value) {
196 m_openSearchServiceConfigHasBeenSet = true;
197 m_openSearchServiceConfig = std::forward<OpenSearchServiceConfigT>(value);
198 }
199 template <typename OpenSearchServiceConfigT = OpenSearchServiceDataSourceConfig>
200 CreateDataSourceRequest& WithOpenSearchServiceConfig(OpenSearchServiceConfigT&& value) {
201 SetOpenSearchServiceConfig(std::forward<OpenSearchServiceConfigT>(value));
202 return *this;
203 }
205
207
210 inline const HttpDataSourceConfig& GetHttpConfig() const { return m_httpConfig; }
211 inline bool HttpConfigHasBeenSet() const { return m_httpConfigHasBeenSet; }
212 template <typename HttpConfigT = HttpDataSourceConfig>
213 void SetHttpConfig(HttpConfigT&& value) {
214 m_httpConfigHasBeenSet = true;
215 m_httpConfig = std::forward<HttpConfigT>(value);
216 }
217 template <typename HttpConfigT = HttpDataSourceConfig>
219 SetHttpConfig(std::forward<HttpConfigT>(value));
220 return *this;
221 }
223
225
228 inline const RelationalDatabaseDataSourceConfig& GetRelationalDatabaseConfig() const { return m_relationalDatabaseConfig; }
229 inline bool RelationalDatabaseConfigHasBeenSet() const { return m_relationalDatabaseConfigHasBeenSet; }
230 template <typename RelationalDatabaseConfigT = RelationalDatabaseDataSourceConfig>
231 void SetRelationalDatabaseConfig(RelationalDatabaseConfigT&& value) {
232 m_relationalDatabaseConfigHasBeenSet = true;
233 m_relationalDatabaseConfig = std::forward<RelationalDatabaseConfigT>(value);
234 }
235 template <typename RelationalDatabaseConfigT = RelationalDatabaseDataSourceConfig>
236 CreateDataSourceRequest& WithRelationalDatabaseConfig(RelationalDatabaseConfigT&& value) {
237 SetRelationalDatabaseConfig(std::forward<RelationalDatabaseConfigT>(value));
238 return *this;
239 }
241
243
246 inline const EventBridgeDataSourceConfig& GetEventBridgeConfig() const { return m_eventBridgeConfig; }
247 inline bool EventBridgeConfigHasBeenSet() const { return m_eventBridgeConfigHasBeenSet; }
248 template <typename EventBridgeConfigT = EventBridgeDataSourceConfig>
249 void SetEventBridgeConfig(EventBridgeConfigT&& value) {
250 m_eventBridgeConfigHasBeenSet = true;
251 m_eventBridgeConfig = std::forward<EventBridgeConfigT>(value);
252 }
253 template <typename EventBridgeConfigT = EventBridgeDataSourceConfig>
254 CreateDataSourceRequest& WithEventBridgeConfig(EventBridgeConfigT&& value) {
255 SetEventBridgeConfig(std::forward<EventBridgeConfigT>(value));
256 return *this;
257 }
259
261
272 inline DataSourceLevelMetricsConfig GetMetricsConfig() const { return m_metricsConfig; }
273 inline bool MetricsConfigHasBeenSet() const { return m_metricsConfigHasBeenSet; }
275 m_metricsConfigHasBeenSet = true;
276 m_metricsConfig = value;
277 }
279 SetMetricsConfig(value);
280 return *this;
281 }
283 private:
284 Aws::String m_apiId;
285
286 Aws::String m_name;
287
288 Aws::String m_description;
289
291
292 Aws::String m_serviceRoleArn;
293
294 DynamodbDataSourceConfig m_dynamodbConfig;
295
296 LambdaDataSourceConfig m_lambdaConfig;
297
298 ElasticsearchDataSourceConfig m_elasticsearchConfig;
299
300 OpenSearchServiceDataSourceConfig m_openSearchServiceConfig;
301
302 HttpDataSourceConfig m_httpConfig;
303
304 RelationalDatabaseDataSourceConfig m_relationalDatabaseConfig;
305
306 EventBridgeDataSourceConfig m_eventBridgeConfig;
307
309 bool m_apiIdHasBeenSet = false;
310 bool m_nameHasBeenSet = false;
311 bool m_descriptionHasBeenSet = false;
312 bool m_typeHasBeenSet = false;
313 bool m_serviceRoleArnHasBeenSet = false;
314 bool m_dynamodbConfigHasBeenSet = false;
315 bool m_lambdaConfigHasBeenSet = false;
316 bool m_elasticsearchConfigHasBeenSet = false;
317 bool m_openSearchServiceConfigHasBeenSet = false;
318 bool m_httpConfigHasBeenSet = false;
319 bool m_relationalDatabaseConfigHasBeenSet = false;
320 bool m_eventBridgeConfigHasBeenSet = false;
321 bool m_metricsConfigHasBeenSet = false;
322};
323
324} // namespace Model
325} // namespace AppSync
326} // namespace Aws
CreateDataSourceRequest & WithMetricsConfig(DataSourceLevelMetricsConfig value)
void SetElasticsearchConfig(ElasticsearchConfigT &&value)
const HttpDataSourceConfig & GetHttpConfig() const
CreateDataSourceRequest & WithServiceRoleArn(ServiceRoleArnT &&value)
void SetEventBridgeConfig(EventBridgeConfigT &&value)
const RelationalDatabaseDataSourceConfig & GetRelationalDatabaseConfig() const
const ElasticsearchDataSourceConfig & GetElasticsearchConfig() const
void SetRelationalDatabaseConfig(RelationalDatabaseConfigT &&value)
AWS_APPSYNC_API CreateDataSourceRequest()=default
const DynamodbDataSourceConfig & GetDynamodbConfig() const
CreateDataSourceRequest & WithName(NameT &&value)
CreateDataSourceRequest & WithDescription(DescriptionT &&value)
AWS_APPSYNC_API Aws::String SerializePayload() const override
const EventBridgeDataSourceConfig & GetEventBridgeConfig() const
CreateDataSourceRequest & WithLambdaConfig(LambdaConfigT &&value)
const LambdaDataSourceConfig & GetLambdaConfig() const
virtual const char * GetServiceRequestName() const override
const OpenSearchServiceDataSourceConfig & GetOpenSearchServiceConfig() const
CreateDataSourceRequest & WithRelationalDatabaseConfig(RelationalDatabaseConfigT &&value)
CreateDataSourceRequest & WithEventBridgeConfig(EventBridgeConfigT &&value)
CreateDataSourceRequest & WithDynamodbConfig(DynamodbConfigT &&value)
DataSourceLevelMetricsConfig GetMetricsConfig() const
CreateDataSourceRequest & WithOpenSearchServiceConfig(OpenSearchServiceConfigT &&value)
CreateDataSourceRequest & WithType(DataSourceType value)
CreateDataSourceRequest & WithApiId(ApiIdT &&value)
CreateDataSourceRequest & WithHttpConfig(HttpConfigT &&value)
void SetOpenSearchServiceConfig(OpenSearchServiceConfigT &&value)
void SetMetricsConfig(DataSourceLevelMetricsConfig value)
CreateDataSourceRequest & WithElasticsearchConfig(ElasticsearchConfigT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String