/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace AppSync { namespace Model { /** */ class CreateDataSourceRequest : public AppSyncRequest { public: AWS_APPSYNC_API CreateDataSourceRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateDataSource"; } AWS_APPSYNC_API Aws::String SerializePayload() const override; /** *

The API ID for the GraphQL API for the DataSource.

*/ inline const Aws::String& GetApiId() const{ return m_apiId; } /** *

The API ID for the GraphQL API for the DataSource.

*/ inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; } /** *

The API ID for the GraphQL API for the DataSource.

*/ inline void SetApiId(const Aws::String& value) { m_apiIdHasBeenSet = true; m_apiId = value; } /** *

The API ID for the GraphQL API for the DataSource.

*/ inline void SetApiId(Aws::String&& value) { m_apiIdHasBeenSet = true; m_apiId = std::move(value); } /** *

The API ID for the GraphQL API for the DataSource.

*/ inline void SetApiId(const char* value) { m_apiIdHasBeenSet = true; m_apiId.assign(value); } /** *

The API ID for the GraphQL API for the DataSource.

*/ inline CreateDataSourceRequest& WithApiId(const Aws::String& value) { SetApiId(value); return *this;} /** *

The API ID for the GraphQL API for the DataSource.

*/ inline CreateDataSourceRequest& WithApiId(Aws::String&& value) { SetApiId(std::move(value)); return *this;} /** *

The API ID for the GraphQL API for the DataSource.

*/ inline CreateDataSourceRequest& WithApiId(const char* value) { SetApiId(value); return *this;} /** *

A user-supplied name for the DataSource.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

A user-supplied name for the DataSource.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

A user-supplied name for the DataSource.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

A user-supplied name for the DataSource.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

A user-supplied name for the DataSource.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

A user-supplied name for the DataSource.

*/ inline CreateDataSourceRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

A user-supplied name for the DataSource.

*/ inline CreateDataSourceRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

A user-supplied name for the DataSource.

*/ inline CreateDataSourceRequest& WithName(const char* value) { SetName(value); return *this;} /** *

A description of the DataSource.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the DataSource.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the DataSource.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the DataSource.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the DataSource.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the DataSource.

*/ inline CreateDataSourceRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the DataSource.

*/ inline CreateDataSourceRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the DataSource.

*/ inline CreateDataSourceRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The type of the DataSource.

*/ inline const DataSourceType& GetType() const{ return m_type; } /** *

The type of the DataSource.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of the DataSource.

*/ inline void SetType(const DataSourceType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of the DataSource.

*/ inline void SetType(DataSourceType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of the DataSource.

*/ inline CreateDataSourceRequest& WithType(const DataSourceType& value) { SetType(value); return *this;} /** *

The type of the DataSource.

*/ inline CreateDataSourceRequest& WithType(DataSourceType&& value) { SetType(std::move(value)); return *this;} /** *

The Identity and Access Management (IAM) service role Amazon Resource Name * (ARN) for the data source. The system assumes this role when accessing the data * source.

*/ inline const Aws::String& GetServiceRoleArn() const{ return m_serviceRoleArn; } /** *

The Identity and Access Management (IAM) service role Amazon Resource Name * (ARN) for the data source. The system assumes this role when accessing the data * source.

*/ inline bool ServiceRoleArnHasBeenSet() const { return m_serviceRoleArnHasBeenSet; } /** *

The Identity and Access Management (IAM) service role Amazon Resource Name * (ARN) for the data source. The system assumes this role when accessing the data * source.

*/ inline void SetServiceRoleArn(const Aws::String& value) { m_serviceRoleArnHasBeenSet = true; m_serviceRoleArn = value; } /** *

The Identity and Access Management (IAM) service role Amazon Resource Name * (ARN) for the data source. The system assumes this role when accessing the data * source.

*/ inline void SetServiceRoleArn(Aws::String&& value) { m_serviceRoleArnHasBeenSet = true; m_serviceRoleArn = std::move(value); } /** *

The Identity and Access Management (IAM) service role Amazon Resource Name * (ARN) for the data source. The system assumes this role when accessing the data * source.

*/ inline void SetServiceRoleArn(const char* value) { m_serviceRoleArnHasBeenSet = true; m_serviceRoleArn.assign(value); } /** *

The Identity and Access Management (IAM) service role Amazon Resource Name * (ARN) for the data source. The system assumes this role when accessing the data * source.

*/ inline CreateDataSourceRequest& WithServiceRoleArn(const Aws::String& value) { SetServiceRoleArn(value); return *this;} /** *

The Identity and Access Management (IAM) service role Amazon Resource Name * (ARN) for the data source. The system assumes this role when accessing the data * source.

*/ inline CreateDataSourceRequest& WithServiceRoleArn(Aws::String&& value) { SetServiceRoleArn(std::move(value)); return *this;} /** *

The Identity and Access Management (IAM) service role Amazon Resource Name * (ARN) for the data source. The system assumes this role when accessing the data * source.

*/ inline CreateDataSourceRequest& WithServiceRoleArn(const char* value) { SetServiceRoleArn(value); return *this;} /** *

Amazon DynamoDB settings.

*/ inline const DynamodbDataSourceConfig& GetDynamodbConfig() const{ return m_dynamodbConfig; } /** *

Amazon DynamoDB settings.

*/ inline bool DynamodbConfigHasBeenSet() const { return m_dynamodbConfigHasBeenSet; } /** *

Amazon DynamoDB settings.

*/ inline void SetDynamodbConfig(const DynamodbDataSourceConfig& value) { m_dynamodbConfigHasBeenSet = true; m_dynamodbConfig = value; } /** *

Amazon DynamoDB settings.

*/ inline void SetDynamodbConfig(DynamodbDataSourceConfig&& value) { m_dynamodbConfigHasBeenSet = true; m_dynamodbConfig = std::move(value); } /** *

Amazon DynamoDB settings.

*/ inline CreateDataSourceRequest& WithDynamodbConfig(const DynamodbDataSourceConfig& value) { SetDynamodbConfig(value); return *this;} /** *

Amazon DynamoDB settings.

*/ inline CreateDataSourceRequest& WithDynamodbConfig(DynamodbDataSourceConfig&& value) { SetDynamodbConfig(std::move(value)); return *this;} /** *

Lambda settings.

*/ inline const LambdaDataSourceConfig& GetLambdaConfig() const{ return m_lambdaConfig; } /** *

Lambda settings.

*/ inline bool LambdaConfigHasBeenSet() const { return m_lambdaConfigHasBeenSet; } /** *

Lambda settings.

*/ inline void SetLambdaConfig(const LambdaDataSourceConfig& value) { m_lambdaConfigHasBeenSet = true; m_lambdaConfig = value; } /** *

Lambda settings.

*/ inline void SetLambdaConfig(LambdaDataSourceConfig&& value) { m_lambdaConfigHasBeenSet = true; m_lambdaConfig = std::move(value); } /** *

Lambda settings.

*/ inline CreateDataSourceRequest& WithLambdaConfig(const LambdaDataSourceConfig& value) { SetLambdaConfig(value); return *this;} /** *

Lambda settings.

*/ inline CreateDataSourceRequest& WithLambdaConfig(LambdaDataSourceConfig&& value) { SetLambdaConfig(std::move(value)); return *this;} /** *

Amazon OpenSearch Service settings.

As of September 2021, Amazon * Elasticsearch service is Amazon OpenSearch Service. This configuration is * deprecated. For new data sources, use * CreateDataSourceRequest$openSearchServiceConfig to create an OpenSearch * data source.

*/ inline const ElasticsearchDataSourceConfig& GetElasticsearchConfig() const{ return m_elasticsearchConfig; } /** *

Amazon OpenSearch Service settings.

As of September 2021, Amazon * Elasticsearch service is Amazon OpenSearch Service. This configuration is * deprecated. For new data sources, use * CreateDataSourceRequest$openSearchServiceConfig to create an OpenSearch * data source.

*/ inline bool ElasticsearchConfigHasBeenSet() const { return m_elasticsearchConfigHasBeenSet; } /** *

Amazon OpenSearch Service settings.

As of September 2021, Amazon * Elasticsearch service is Amazon OpenSearch Service. This configuration is * deprecated. For new data sources, use * CreateDataSourceRequest$openSearchServiceConfig to create an OpenSearch * data source.

*/ inline void SetElasticsearchConfig(const ElasticsearchDataSourceConfig& value) { m_elasticsearchConfigHasBeenSet = true; m_elasticsearchConfig = value; } /** *

Amazon OpenSearch Service settings.

As of September 2021, Amazon * Elasticsearch service is Amazon OpenSearch Service. This configuration is * deprecated. For new data sources, use * CreateDataSourceRequest$openSearchServiceConfig to create an OpenSearch * data source.

*/ inline void SetElasticsearchConfig(ElasticsearchDataSourceConfig&& value) { m_elasticsearchConfigHasBeenSet = true; m_elasticsearchConfig = std::move(value); } /** *

Amazon OpenSearch Service settings.

As of September 2021, Amazon * Elasticsearch service is Amazon OpenSearch Service. This configuration is * deprecated. For new data sources, use * CreateDataSourceRequest$openSearchServiceConfig to create an OpenSearch * data source.

*/ inline CreateDataSourceRequest& WithElasticsearchConfig(const ElasticsearchDataSourceConfig& value) { SetElasticsearchConfig(value); return *this;} /** *

Amazon OpenSearch Service settings.

As of September 2021, Amazon * Elasticsearch service is Amazon OpenSearch Service. This configuration is * deprecated. For new data sources, use * CreateDataSourceRequest$openSearchServiceConfig to create an OpenSearch * data source.

*/ inline CreateDataSourceRequest& WithElasticsearchConfig(ElasticsearchDataSourceConfig&& value) { SetElasticsearchConfig(std::move(value)); return *this;} /** *

Amazon OpenSearch Service settings.

*/ inline const OpenSearchServiceDataSourceConfig& GetOpenSearchServiceConfig() const{ return m_openSearchServiceConfig; } /** *

Amazon OpenSearch Service settings.

*/ inline bool OpenSearchServiceConfigHasBeenSet() const { return m_openSearchServiceConfigHasBeenSet; } /** *

Amazon OpenSearch Service settings.

*/ inline void SetOpenSearchServiceConfig(const OpenSearchServiceDataSourceConfig& value) { m_openSearchServiceConfigHasBeenSet = true; m_openSearchServiceConfig = value; } /** *

Amazon OpenSearch Service settings.

*/ inline void SetOpenSearchServiceConfig(OpenSearchServiceDataSourceConfig&& value) { m_openSearchServiceConfigHasBeenSet = true; m_openSearchServiceConfig = std::move(value); } /** *

Amazon OpenSearch Service settings.

*/ inline CreateDataSourceRequest& WithOpenSearchServiceConfig(const OpenSearchServiceDataSourceConfig& value) { SetOpenSearchServiceConfig(value); return *this;} /** *

Amazon OpenSearch Service settings.

*/ inline CreateDataSourceRequest& WithOpenSearchServiceConfig(OpenSearchServiceDataSourceConfig&& value) { SetOpenSearchServiceConfig(std::move(value)); return *this;} /** *

HTTP endpoint settings.

*/ inline const HttpDataSourceConfig& GetHttpConfig() const{ return m_httpConfig; } /** *

HTTP endpoint settings.

*/ inline bool HttpConfigHasBeenSet() const { return m_httpConfigHasBeenSet; } /** *

HTTP endpoint settings.

*/ inline void SetHttpConfig(const HttpDataSourceConfig& value) { m_httpConfigHasBeenSet = true; m_httpConfig = value; } /** *

HTTP endpoint settings.

*/ inline void SetHttpConfig(HttpDataSourceConfig&& value) { m_httpConfigHasBeenSet = true; m_httpConfig = std::move(value); } /** *

HTTP endpoint settings.

*/ inline CreateDataSourceRequest& WithHttpConfig(const HttpDataSourceConfig& value) { SetHttpConfig(value); return *this;} /** *

HTTP endpoint settings.

*/ inline CreateDataSourceRequest& WithHttpConfig(HttpDataSourceConfig&& value) { SetHttpConfig(std::move(value)); return *this;} /** *

Relational database settings.

*/ inline const RelationalDatabaseDataSourceConfig& GetRelationalDatabaseConfig() const{ return m_relationalDatabaseConfig; } /** *

Relational database settings.

*/ inline bool RelationalDatabaseConfigHasBeenSet() const { return m_relationalDatabaseConfigHasBeenSet; } /** *

Relational database settings.

*/ inline void SetRelationalDatabaseConfig(const RelationalDatabaseDataSourceConfig& value) { m_relationalDatabaseConfigHasBeenSet = true; m_relationalDatabaseConfig = value; } /** *

Relational database settings.

*/ inline void SetRelationalDatabaseConfig(RelationalDatabaseDataSourceConfig&& value) { m_relationalDatabaseConfigHasBeenSet = true; m_relationalDatabaseConfig = std::move(value); } /** *

Relational database settings.

*/ inline CreateDataSourceRequest& WithRelationalDatabaseConfig(const RelationalDatabaseDataSourceConfig& value) { SetRelationalDatabaseConfig(value); return *this;} /** *

Relational database settings.

*/ inline CreateDataSourceRequest& WithRelationalDatabaseConfig(RelationalDatabaseDataSourceConfig&& value) { SetRelationalDatabaseConfig(std::move(value)); return *this;} /** *

Amazon EventBridge settings.

*/ inline const EventBridgeDataSourceConfig& GetEventBridgeConfig() const{ return m_eventBridgeConfig; } /** *

Amazon EventBridge settings.

*/ inline bool EventBridgeConfigHasBeenSet() const { return m_eventBridgeConfigHasBeenSet; } /** *

Amazon EventBridge settings.

*/ inline void SetEventBridgeConfig(const EventBridgeDataSourceConfig& value) { m_eventBridgeConfigHasBeenSet = true; m_eventBridgeConfig = value; } /** *

Amazon EventBridge settings.

*/ inline void SetEventBridgeConfig(EventBridgeDataSourceConfig&& value) { m_eventBridgeConfigHasBeenSet = true; m_eventBridgeConfig = std::move(value); } /** *

Amazon EventBridge settings.

*/ inline CreateDataSourceRequest& WithEventBridgeConfig(const EventBridgeDataSourceConfig& value) { SetEventBridgeConfig(value); return *this;} /** *

Amazon EventBridge settings.

*/ inline CreateDataSourceRequest& WithEventBridgeConfig(EventBridgeDataSourceConfig&& value) { SetEventBridgeConfig(std::move(value)); return *this;} private: Aws::String m_apiId; bool m_apiIdHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; DataSourceType m_type; bool m_typeHasBeenSet = false; Aws::String m_serviceRoleArn; bool m_serviceRoleArnHasBeenSet = false; DynamodbDataSourceConfig m_dynamodbConfig; bool m_dynamodbConfigHasBeenSet = false; LambdaDataSourceConfig m_lambdaConfig; bool m_lambdaConfigHasBeenSet = false; ElasticsearchDataSourceConfig m_elasticsearchConfig; bool m_elasticsearchConfigHasBeenSet = false; OpenSearchServiceDataSourceConfig m_openSearchServiceConfig; bool m_openSearchServiceConfigHasBeenSet = false; HttpDataSourceConfig m_httpConfig; bool m_httpConfigHasBeenSet = false; RelationalDatabaseDataSourceConfig m_relationalDatabaseConfig; bool m_relationalDatabaseConfigHasBeenSet = false; EventBridgeDataSourceConfig m_eventBridgeConfig; bool m_eventBridgeConfigHasBeenSet = false; }; } // namespace Model } // namespace AppSync } // namespace Aws