AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateDataSourceRequest.h
1
6#pragma once
7#include <aws/appsync/AppSync_EXPORTS.h>
8#include <aws/appsync/AppSyncRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/appsync/model/DataSourceType.h>
11#include <aws/appsync/model/DynamodbDataSourceConfig.h>
12#include <aws/appsync/model/LambdaDataSourceConfig.h>
13#include <aws/appsync/model/ElasticsearchDataSourceConfig.h>
14#include <aws/appsync/model/OpenSearchServiceDataSourceConfig.h>
15#include <aws/appsync/model/HttpDataSourceConfig.h>
16#include <aws/appsync/model/RelationalDatabaseDataSourceConfig.h>
17#include <aws/appsync/model/EventBridgeDataSourceConfig.h>
18#include <aws/appsync/model/DataSourceLevelMetricsConfig.h>
19#include <utility>
20
21namespace Aws
22{
23namespace AppSync
24{
25namespace Model
26{
27
31 {
32 public:
33 AWS_APPSYNC_API CreateDataSourceRequest() = default;
34
35 // Service request name is the Operation name which will send this request out,
36 // each operation should has unique request name, so that we can get operation's name from this request.
37 // Note: this is not true for response, multiple operations may have the same response name,
38 // so we can not get operation's name from response.
39 inline virtual const char* GetServiceRequestName() const override { return "CreateDataSource"; }
40
41 AWS_APPSYNC_API Aws::String SerializePayload() const override;
42
43
45
48 inline const Aws::String& GetApiId() const { return m_apiId; }
49 inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; }
50 template<typename ApiIdT = Aws::String>
51 void SetApiId(ApiIdT&& value) { m_apiIdHasBeenSet = true; m_apiId = std::forward<ApiIdT>(value); }
52 template<typename ApiIdT = Aws::String>
53 CreateDataSourceRequest& WithApiId(ApiIdT&& value) { SetApiId(std::forward<ApiIdT>(value)); return *this;}
55
57
60 inline const Aws::String& GetName() const { return m_name; }
61 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
62 template<typename NameT = Aws::String>
63 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
64 template<typename NameT = Aws::String>
65 CreateDataSourceRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
67
69
72 inline const Aws::String& GetDescription() const { return m_description; }
73 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
74 template<typename DescriptionT = Aws::String>
75 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
76 template<typename DescriptionT = Aws::String>
77 CreateDataSourceRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
79
81
84 inline DataSourceType GetType() const { return m_type; }
85 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
86 inline void SetType(DataSourceType value) { m_typeHasBeenSet = true; m_type = value; }
87 inline CreateDataSourceRequest& WithType(DataSourceType value) { SetType(value); return *this;}
89
91
96 inline const Aws::String& GetServiceRoleArn() const { return m_serviceRoleArn; }
97 inline bool ServiceRoleArnHasBeenSet() const { return m_serviceRoleArnHasBeenSet; }
98 template<typename ServiceRoleArnT = Aws::String>
99 void SetServiceRoleArn(ServiceRoleArnT&& value) { m_serviceRoleArnHasBeenSet = true; m_serviceRoleArn = std::forward<ServiceRoleArnT>(value); }
100 template<typename ServiceRoleArnT = Aws::String>
101 CreateDataSourceRequest& WithServiceRoleArn(ServiceRoleArnT&& value) { SetServiceRoleArn(std::forward<ServiceRoleArnT>(value)); return *this;}
103
105
108 inline const DynamodbDataSourceConfig& GetDynamodbConfig() const { return m_dynamodbConfig; }
109 inline bool DynamodbConfigHasBeenSet() const { return m_dynamodbConfigHasBeenSet; }
110 template<typename DynamodbConfigT = DynamodbDataSourceConfig>
111 void SetDynamodbConfig(DynamodbConfigT&& value) { m_dynamodbConfigHasBeenSet = true; m_dynamodbConfig = std::forward<DynamodbConfigT>(value); }
112 template<typename DynamodbConfigT = DynamodbDataSourceConfig>
113 CreateDataSourceRequest& WithDynamodbConfig(DynamodbConfigT&& value) { SetDynamodbConfig(std::forward<DynamodbConfigT>(value)); return *this;}
115
117
120 inline const LambdaDataSourceConfig& GetLambdaConfig() const { return m_lambdaConfig; }
121 inline bool LambdaConfigHasBeenSet() const { return m_lambdaConfigHasBeenSet; }
122 template<typename LambdaConfigT = LambdaDataSourceConfig>
123 void SetLambdaConfig(LambdaConfigT&& value) { m_lambdaConfigHasBeenSet = true; m_lambdaConfig = std::forward<LambdaConfigT>(value); }
124 template<typename LambdaConfigT = LambdaDataSourceConfig>
125 CreateDataSourceRequest& WithLambdaConfig(LambdaConfigT&& value) { SetLambdaConfig(std::forward<LambdaConfigT>(value)); return *this;}
127
129
136 inline const ElasticsearchDataSourceConfig& GetElasticsearchConfig() const { return m_elasticsearchConfig; }
137 inline bool ElasticsearchConfigHasBeenSet() const { return m_elasticsearchConfigHasBeenSet; }
138 template<typename ElasticsearchConfigT = ElasticsearchDataSourceConfig>
139 void SetElasticsearchConfig(ElasticsearchConfigT&& value) { m_elasticsearchConfigHasBeenSet = true; m_elasticsearchConfig = std::forward<ElasticsearchConfigT>(value); }
140 template<typename ElasticsearchConfigT = ElasticsearchDataSourceConfig>
141 CreateDataSourceRequest& WithElasticsearchConfig(ElasticsearchConfigT&& value) { SetElasticsearchConfig(std::forward<ElasticsearchConfigT>(value)); return *this;}
143
145
148 inline const OpenSearchServiceDataSourceConfig& GetOpenSearchServiceConfig() const { return m_openSearchServiceConfig; }
149 inline bool OpenSearchServiceConfigHasBeenSet() const { return m_openSearchServiceConfigHasBeenSet; }
150 template<typename OpenSearchServiceConfigT = OpenSearchServiceDataSourceConfig>
151 void SetOpenSearchServiceConfig(OpenSearchServiceConfigT&& value) { m_openSearchServiceConfigHasBeenSet = true; m_openSearchServiceConfig = std::forward<OpenSearchServiceConfigT>(value); }
152 template<typename OpenSearchServiceConfigT = OpenSearchServiceDataSourceConfig>
153 CreateDataSourceRequest& WithOpenSearchServiceConfig(OpenSearchServiceConfigT&& value) { SetOpenSearchServiceConfig(std::forward<OpenSearchServiceConfigT>(value)); return *this;}
155
157
160 inline const HttpDataSourceConfig& GetHttpConfig() const { return m_httpConfig; }
161 inline bool HttpConfigHasBeenSet() const { return m_httpConfigHasBeenSet; }
162 template<typename HttpConfigT = HttpDataSourceConfig>
163 void SetHttpConfig(HttpConfigT&& value) { m_httpConfigHasBeenSet = true; m_httpConfig = std::forward<HttpConfigT>(value); }
164 template<typename HttpConfigT = HttpDataSourceConfig>
165 CreateDataSourceRequest& WithHttpConfig(HttpConfigT&& value) { SetHttpConfig(std::forward<HttpConfigT>(value)); return *this;}
167
169
172 inline const RelationalDatabaseDataSourceConfig& GetRelationalDatabaseConfig() const { return m_relationalDatabaseConfig; }
173 inline bool RelationalDatabaseConfigHasBeenSet() const { return m_relationalDatabaseConfigHasBeenSet; }
174 template<typename RelationalDatabaseConfigT = RelationalDatabaseDataSourceConfig>
175 void SetRelationalDatabaseConfig(RelationalDatabaseConfigT&& value) { m_relationalDatabaseConfigHasBeenSet = true; m_relationalDatabaseConfig = std::forward<RelationalDatabaseConfigT>(value); }
176 template<typename RelationalDatabaseConfigT = RelationalDatabaseDataSourceConfig>
177 CreateDataSourceRequest& WithRelationalDatabaseConfig(RelationalDatabaseConfigT&& value) { SetRelationalDatabaseConfig(std::forward<RelationalDatabaseConfigT>(value)); return *this;}
179
181
184 inline const EventBridgeDataSourceConfig& GetEventBridgeConfig() const { return m_eventBridgeConfig; }
185 inline bool EventBridgeConfigHasBeenSet() const { return m_eventBridgeConfigHasBeenSet; }
186 template<typename EventBridgeConfigT = EventBridgeDataSourceConfig>
187 void SetEventBridgeConfig(EventBridgeConfigT&& value) { m_eventBridgeConfigHasBeenSet = true; m_eventBridgeConfig = std::forward<EventBridgeConfigT>(value); }
188 template<typename EventBridgeConfigT = EventBridgeDataSourceConfig>
189 CreateDataSourceRequest& WithEventBridgeConfig(EventBridgeConfigT&& value) { SetEventBridgeConfig(std::forward<EventBridgeConfigT>(value)); return *this;}
191
193
204 inline DataSourceLevelMetricsConfig GetMetricsConfig() const { return m_metricsConfig; }
205 inline bool MetricsConfigHasBeenSet() const { return m_metricsConfigHasBeenSet; }
206 inline void SetMetricsConfig(DataSourceLevelMetricsConfig value) { m_metricsConfigHasBeenSet = true; m_metricsConfig = value; }
209 private:
210
211 Aws::String m_apiId;
212 bool m_apiIdHasBeenSet = false;
213
214 Aws::String m_name;
215 bool m_nameHasBeenSet = false;
216
217 Aws::String m_description;
218 bool m_descriptionHasBeenSet = false;
219
221 bool m_typeHasBeenSet = false;
222
223 Aws::String m_serviceRoleArn;
224 bool m_serviceRoleArnHasBeenSet = false;
225
226 DynamodbDataSourceConfig m_dynamodbConfig;
227 bool m_dynamodbConfigHasBeenSet = false;
228
229 LambdaDataSourceConfig m_lambdaConfig;
230 bool m_lambdaConfigHasBeenSet = false;
231
232 ElasticsearchDataSourceConfig m_elasticsearchConfig;
233 bool m_elasticsearchConfigHasBeenSet = false;
234
235 OpenSearchServiceDataSourceConfig m_openSearchServiceConfig;
236 bool m_openSearchServiceConfigHasBeenSet = false;
237
238 HttpDataSourceConfig m_httpConfig;
239 bool m_httpConfigHasBeenSet = false;
240
241 RelationalDatabaseDataSourceConfig m_relationalDatabaseConfig;
242 bool m_relationalDatabaseConfigHasBeenSet = false;
243
244 EventBridgeDataSourceConfig m_eventBridgeConfig;
245 bool m_eventBridgeConfigHasBeenSet = false;
246
248 bool m_metricsConfigHasBeenSet = false;
249 };
250
251} // namespace Model
252} // namespace AppSync
253} // 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