AWS SDK for C++

AWS SDK for C++ Version 1.11.742

Loading...
Searching...
No Matches
DataSource.h
1
6#pragma once
7#include <aws/appsync/AppSync_EXPORTS.h>
8#include <aws/appsync/model/DataSourceLevelMetricsConfig.h>
9#include <aws/appsync/model/DataSourceType.h>
10#include <aws/appsync/model/DynamodbDataSourceConfig.h>
11#include <aws/appsync/model/ElasticsearchDataSourceConfig.h>
12#include <aws/appsync/model/EventBridgeDataSourceConfig.h>
13#include <aws/appsync/model/HttpDataSourceConfig.h>
14#include <aws/appsync/model/LambdaDataSourceConfig.h>
15#include <aws/appsync/model/OpenSearchServiceDataSourceConfig.h>
16#include <aws/appsync/model/RelationalDatabaseDataSourceConfig.h>
17#include <aws/core/utils/memory/stl/AWSString.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Utils {
23namespace Json {
24class JsonValue;
25class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace AppSync {
29namespace Model {
30
37 public:
38 AWS_APPSYNC_API DataSource() = default;
39 AWS_APPSYNC_API DataSource(Aws::Utils::Json::JsonView jsonValue);
40 AWS_APPSYNC_API DataSource& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_APPSYNC_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline const Aws::String& GetDataSourceArn() const { return m_dataSourceArn; }
48 inline bool DataSourceArnHasBeenSet() const { return m_dataSourceArnHasBeenSet; }
49 template <typename DataSourceArnT = Aws::String>
50 void SetDataSourceArn(DataSourceArnT&& value) {
51 m_dataSourceArnHasBeenSet = true;
52 m_dataSourceArn = std::forward<DataSourceArnT>(value);
53 }
54 template <typename DataSourceArnT = Aws::String>
55 DataSource& WithDataSourceArn(DataSourceArnT&& value) {
56 SetDataSourceArn(std::forward<DataSourceArnT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetName() const { return m_name; }
66 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
67 template <typename NameT = Aws::String>
68 void SetName(NameT&& value) {
69 m_nameHasBeenSet = true;
70 m_name = std::forward<NameT>(value);
71 }
72 template <typename NameT = Aws::String>
73 DataSource& WithName(NameT&& value) {
74 SetName(std::forward<NameT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::String& GetDescription() const { return m_description; }
84 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
85 template <typename DescriptionT = Aws::String>
86 void SetDescription(DescriptionT&& value) {
87 m_descriptionHasBeenSet = true;
88 m_description = std::forward<DescriptionT>(value);
89 }
90 template <typename DescriptionT = Aws::String>
91 DataSource& WithDescription(DescriptionT&& value) {
92 SetDescription(std::forward<DescriptionT>(value));
93 return *this;
94 }
96
98
115 inline DataSourceType GetType() const { return m_type; }
116 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
117 inline void SetType(DataSourceType value) {
118 m_typeHasBeenSet = true;
119 m_type = value;
120 }
122 SetType(value);
123 return *this;
124 }
126
128
133 inline const Aws::String& GetServiceRoleArn() const { return m_serviceRoleArn; }
134 inline bool ServiceRoleArnHasBeenSet() const { return m_serviceRoleArnHasBeenSet; }
135 template <typename ServiceRoleArnT = Aws::String>
136 void SetServiceRoleArn(ServiceRoleArnT&& value) {
137 m_serviceRoleArnHasBeenSet = true;
138 m_serviceRoleArn = std::forward<ServiceRoleArnT>(value);
139 }
140 template <typename ServiceRoleArnT = Aws::String>
141 DataSource& WithServiceRoleArn(ServiceRoleArnT&& value) {
142 SetServiceRoleArn(std::forward<ServiceRoleArnT>(value));
143 return *this;
144 }
146
148
151 inline const DynamodbDataSourceConfig& GetDynamodbConfig() const { return m_dynamodbConfig; }
152 inline bool DynamodbConfigHasBeenSet() const { return m_dynamodbConfigHasBeenSet; }
153 template <typename DynamodbConfigT = DynamodbDataSourceConfig>
154 void SetDynamodbConfig(DynamodbConfigT&& value) {
155 m_dynamodbConfigHasBeenSet = true;
156 m_dynamodbConfig = std::forward<DynamodbConfigT>(value);
157 }
158 template <typename DynamodbConfigT = DynamodbDataSourceConfig>
159 DataSource& WithDynamodbConfig(DynamodbConfigT&& value) {
160 SetDynamodbConfig(std::forward<DynamodbConfigT>(value));
161 return *this;
162 }
164
166
169 inline const LambdaDataSourceConfig& GetLambdaConfig() const { return m_lambdaConfig; }
170 inline bool LambdaConfigHasBeenSet() const { return m_lambdaConfigHasBeenSet; }
171 template <typename LambdaConfigT = LambdaDataSourceConfig>
172 void SetLambdaConfig(LambdaConfigT&& value) {
173 m_lambdaConfigHasBeenSet = true;
174 m_lambdaConfig = std::forward<LambdaConfigT>(value);
175 }
176 template <typename LambdaConfigT = LambdaDataSourceConfig>
177 DataSource& WithLambdaConfig(LambdaConfigT&& value) {
178 SetLambdaConfig(std::forward<LambdaConfigT>(value));
179 return *this;
180 }
182
184
187 inline const ElasticsearchDataSourceConfig& GetElasticsearchConfig() const { return m_elasticsearchConfig; }
188 inline bool ElasticsearchConfigHasBeenSet() const { return m_elasticsearchConfigHasBeenSet; }
189 template <typename ElasticsearchConfigT = ElasticsearchDataSourceConfig>
190 void SetElasticsearchConfig(ElasticsearchConfigT&& value) {
191 m_elasticsearchConfigHasBeenSet = true;
192 m_elasticsearchConfig = std::forward<ElasticsearchConfigT>(value);
193 }
194 template <typename ElasticsearchConfigT = ElasticsearchDataSourceConfig>
195 DataSource& WithElasticsearchConfig(ElasticsearchConfigT&& value) {
196 SetElasticsearchConfig(std::forward<ElasticsearchConfigT>(value));
197 return *this;
198 }
200
202
205 inline const OpenSearchServiceDataSourceConfig& GetOpenSearchServiceConfig() const { return m_openSearchServiceConfig; }
206 inline bool OpenSearchServiceConfigHasBeenSet() const { return m_openSearchServiceConfigHasBeenSet; }
207 template <typename OpenSearchServiceConfigT = OpenSearchServiceDataSourceConfig>
208 void SetOpenSearchServiceConfig(OpenSearchServiceConfigT&& value) {
209 m_openSearchServiceConfigHasBeenSet = true;
210 m_openSearchServiceConfig = std::forward<OpenSearchServiceConfigT>(value);
211 }
212 template <typename OpenSearchServiceConfigT = OpenSearchServiceDataSourceConfig>
213 DataSource& WithOpenSearchServiceConfig(OpenSearchServiceConfigT&& value) {
214 SetOpenSearchServiceConfig(std::forward<OpenSearchServiceConfigT>(value));
215 return *this;
216 }
218
220
223 inline const HttpDataSourceConfig& GetHttpConfig() const { return m_httpConfig; }
224 inline bool HttpConfigHasBeenSet() const { return m_httpConfigHasBeenSet; }
225 template <typename HttpConfigT = HttpDataSourceConfig>
226 void SetHttpConfig(HttpConfigT&& value) {
227 m_httpConfigHasBeenSet = true;
228 m_httpConfig = std::forward<HttpConfigT>(value);
229 }
230 template <typename HttpConfigT = HttpDataSourceConfig>
231 DataSource& WithHttpConfig(HttpConfigT&& value) {
232 SetHttpConfig(std::forward<HttpConfigT>(value));
233 return *this;
234 }
236
238
241 inline const RelationalDatabaseDataSourceConfig& GetRelationalDatabaseConfig() const { return m_relationalDatabaseConfig; }
242 inline bool RelationalDatabaseConfigHasBeenSet() const { return m_relationalDatabaseConfigHasBeenSet; }
243 template <typename RelationalDatabaseConfigT = RelationalDatabaseDataSourceConfig>
244 void SetRelationalDatabaseConfig(RelationalDatabaseConfigT&& value) {
245 m_relationalDatabaseConfigHasBeenSet = true;
246 m_relationalDatabaseConfig = std::forward<RelationalDatabaseConfigT>(value);
247 }
248 template <typename RelationalDatabaseConfigT = RelationalDatabaseDataSourceConfig>
249 DataSource& WithRelationalDatabaseConfig(RelationalDatabaseConfigT&& value) {
250 SetRelationalDatabaseConfig(std::forward<RelationalDatabaseConfigT>(value));
251 return *this;
252 }
254
256
259 inline const EventBridgeDataSourceConfig& GetEventBridgeConfig() const { return m_eventBridgeConfig; }
260 inline bool EventBridgeConfigHasBeenSet() const { return m_eventBridgeConfigHasBeenSet; }
261 template <typename EventBridgeConfigT = EventBridgeDataSourceConfig>
262 void SetEventBridgeConfig(EventBridgeConfigT&& value) {
263 m_eventBridgeConfigHasBeenSet = true;
264 m_eventBridgeConfig = std::forward<EventBridgeConfigT>(value);
265 }
266 template <typename EventBridgeConfigT = EventBridgeDataSourceConfig>
267 DataSource& WithEventBridgeConfig(EventBridgeConfigT&& value) {
268 SetEventBridgeConfig(std::forward<EventBridgeConfigT>(value));
269 return *this;
270 }
272
274
285 inline DataSourceLevelMetricsConfig GetMetricsConfig() const { return m_metricsConfig; }
286 inline bool MetricsConfigHasBeenSet() const { return m_metricsConfigHasBeenSet; }
288 m_metricsConfigHasBeenSet = true;
289 m_metricsConfig = value;
290 }
292 SetMetricsConfig(value);
293 return *this;
294 }
296 private:
297 Aws::String m_dataSourceArn;
298
299 Aws::String m_name;
300
301 Aws::String m_description;
302
304
305 Aws::String m_serviceRoleArn;
306
307 DynamodbDataSourceConfig m_dynamodbConfig;
308
309 LambdaDataSourceConfig m_lambdaConfig;
310
311 ElasticsearchDataSourceConfig m_elasticsearchConfig;
312
313 OpenSearchServiceDataSourceConfig m_openSearchServiceConfig;
314
315 HttpDataSourceConfig m_httpConfig;
316
317 RelationalDatabaseDataSourceConfig m_relationalDatabaseConfig;
318
319 EventBridgeDataSourceConfig m_eventBridgeConfig;
320
322 bool m_dataSourceArnHasBeenSet = false;
323 bool m_nameHasBeenSet = false;
324 bool m_descriptionHasBeenSet = false;
325 bool m_typeHasBeenSet = false;
326 bool m_serviceRoleArnHasBeenSet = false;
327 bool m_dynamodbConfigHasBeenSet = false;
328 bool m_lambdaConfigHasBeenSet = false;
329 bool m_elasticsearchConfigHasBeenSet = false;
330 bool m_openSearchServiceConfigHasBeenSet = false;
331 bool m_httpConfigHasBeenSet = false;
332 bool m_relationalDatabaseConfigHasBeenSet = false;
333 bool m_eventBridgeConfigHasBeenSet = false;
334 bool m_metricsConfigHasBeenSet = false;
335};
336
337} // namespace Model
338} // namespace AppSync
339} // namespace Aws
DataSource & WithType(DataSourceType value)
Definition DataSource.h:121
DataSource & WithOpenSearchServiceConfig(OpenSearchServiceConfigT &&value)
Definition DataSource.h:213
void SetRelationalDatabaseConfig(RelationalDatabaseConfigT &&value)
Definition DataSource.h:244
const LambdaDataSourceConfig & GetLambdaConfig() const
Definition DataSource.h:169
void SetDataSourceArn(DataSourceArnT &&value)
Definition DataSource.h:50
const ElasticsearchDataSourceConfig & GetElasticsearchConfig() const
Definition DataSource.h:187
void SetDescription(DescriptionT &&value)
Definition DataSource.h:86
void SetHttpConfig(HttpConfigT &&value)
Definition DataSource.h:226
bool RelationalDatabaseConfigHasBeenSet() const
Definition DataSource.h:242
DataSource & WithLambdaConfig(LambdaConfigT &&value)
Definition DataSource.h:177
const DynamodbDataSourceConfig & GetDynamodbConfig() const
Definition DataSource.h:151
const Aws::String & GetDescription() const
Definition DataSource.h:83
DataSource & WithDataSourceArn(DataSourceArnT &&value)
Definition DataSource.h:55
AWS_APPSYNC_API DataSource()=default
void SetDynamodbConfig(DynamodbConfigT &&value)
Definition DataSource.h:154
bool ElasticsearchConfigHasBeenSet() const
Definition DataSource.h:188
void SetLambdaConfig(LambdaConfigT &&value)
Definition DataSource.h:172
DataSource & WithRelationalDatabaseConfig(RelationalDatabaseConfigT &&value)
Definition DataSource.h:249
AWS_APPSYNC_API DataSource & operator=(Aws::Utils::Json::JsonView jsonValue)
bool EventBridgeConfigHasBeenSet() const
Definition DataSource.h:260
void SetServiceRoleArn(ServiceRoleArnT &&value)
Definition DataSource.h:136
AWS_APPSYNC_API DataSource(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetDataSourceArn() const
Definition DataSource.h:47
DataSource & WithServiceRoleArn(ServiceRoleArnT &&value)
Definition DataSource.h:141
void SetOpenSearchServiceConfig(OpenSearchServiceConfigT &&value)
Definition DataSource.h:208
void SetMetricsConfig(DataSourceLevelMetricsConfig value)
Definition DataSource.h:287
DataSourceLevelMetricsConfig GetMetricsConfig() const
Definition DataSource.h:285
const OpenSearchServiceDataSourceConfig & GetOpenSearchServiceConfig() const
Definition DataSource.h:205
DataSource & WithDescription(DescriptionT &&value)
Definition DataSource.h:91
void SetElasticsearchConfig(ElasticsearchConfigT &&value)
Definition DataSource.h:190
void SetEventBridgeConfig(EventBridgeConfigT &&value)
Definition DataSource.h:262
DataSourceType GetType() const
Definition DataSource.h:115
AWS_APPSYNC_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetServiceRoleArn() const
Definition DataSource.h:133
bool OpenSearchServiceConfigHasBeenSet() const
Definition DataSource.h:206
DataSource & WithMetricsConfig(DataSourceLevelMetricsConfig value)
Definition DataSource.h:291
void SetType(DataSourceType value)
Definition DataSource.h:117
DataSource & WithName(NameT &&value)
Definition DataSource.h:73
const EventBridgeDataSourceConfig & GetEventBridgeConfig() const
Definition DataSource.h:259
const RelationalDatabaseDataSourceConfig & GetRelationalDatabaseConfig() const
Definition DataSource.h:241
DataSource & WithElasticsearchConfig(ElasticsearchConfigT &&value)
Definition DataSource.h:195
const Aws::String & GetName() const
Definition DataSource.h:65
DataSource & WithEventBridgeConfig(EventBridgeConfigT &&value)
Definition DataSource.h:267
DataSource & WithHttpConfig(HttpConfigT &&value)
Definition DataSource.h:231
DataSource & WithDynamodbConfig(DynamodbConfigT &&value)
Definition DataSource.h:159
const HttpDataSourceConfig & GetHttpConfig() const
Definition DataSource.h:223
void SetName(NameT &&value)
Definition DataSource.h:68
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue