/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the appsync-2017-07-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.AppSync.Model
{
///
/// Describes a data source.
///
public partial class DataSource
{
private string _dataSourceArn;
private string _description;
private DynamodbDataSourceConfig _dynamodbConfig;
private ElasticsearchDataSourceConfig _elasticsearchConfig;
private EventBridgeDataSourceConfig _eventBridgeConfig;
private HttpDataSourceConfig _httpConfig;
private LambdaDataSourceConfig _lambdaConfig;
private string _name;
private OpenSearchServiceDataSourceConfig _openSearchServiceConfig;
private RelationalDatabaseDataSourceConfig _relationalDatabaseConfig;
private string _serviceRoleArn;
private DataSourceType _type;
///
/// Gets and sets the property DataSourceArn.
///
/// The data source Amazon Resource Name (ARN).
///
///
public string DataSourceArn
{
get { return this._dataSourceArn; }
set { this._dataSourceArn = value; }
}
// Check to see if DataSourceArn property is set
internal bool IsSetDataSourceArn()
{
return this._dataSourceArn != null;
}
///
/// Gets and sets the property Description.
///
/// The description of the data source.
///
///
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property DynamodbConfig.
///
/// DynamoDB settings.
///
///
public DynamodbDataSourceConfig DynamodbConfig
{
get { return this._dynamodbConfig; }
set { this._dynamodbConfig = value; }
}
// Check to see if DynamodbConfig property is set
internal bool IsSetDynamodbConfig()
{
return this._dynamodbConfig != null;
}
///
/// Gets and sets the property ElasticsearchConfig.
///
/// Amazon OpenSearch Service settings.
///
///
public ElasticsearchDataSourceConfig ElasticsearchConfig
{
get { return this._elasticsearchConfig; }
set { this._elasticsearchConfig = value; }
}
// Check to see if ElasticsearchConfig property is set
internal bool IsSetElasticsearchConfig()
{
return this._elasticsearchConfig != null;
}
///
/// Gets and sets the property EventBridgeConfig.
///
/// Amazon EventBridge settings.
///
///
public EventBridgeDataSourceConfig EventBridgeConfig
{
get { return this._eventBridgeConfig; }
set { this._eventBridgeConfig = value; }
}
// Check to see if EventBridgeConfig property is set
internal bool IsSetEventBridgeConfig()
{
return this._eventBridgeConfig != null;
}
///
/// Gets and sets the property HttpConfig.
///
/// HTTP endpoint settings.
///
///
public HttpDataSourceConfig HttpConfig
{
get { return this._httpConfig; }
set { this._httpConfig = value; }
}
// Check to see if HttpConfig property is set
internal bool IsSetHttpConfig()
{
return this._httpConfig != null;
}
///
/// Gets and sets the property LambdaConfig.
///
/// Lambda settings.
///
///
public LambdaDataSourceConfig LambdaConfig
{
get { return this._lambdaConfig; }
set { this._lambdaConfig = value; }
}
// Check to see if LambdaConfig property is set
internal bool IsSetLambdaConfig()
{
return this._lambdaConfig != null;
}
///
/// Gets and sets the property Name.
///
/// The name of the data source.
///
///
[AWSProperty(Min=1, Max=65536)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property OpenSearchServiceConfig.
///
/// Amazon OpenSearch Service settings.
///
///
public OpenSearchServiceDataSourceConfig OpenSearchServiceConfig
{
get { return this._openSearchServiceConfig; }
set { this._openSearchServiceConfig = value; }
}
// Check to see if OpenSearchServiceConfig property is set
internal bool IsSetOpenSearchServiceConfig()
{
return this._openSearchServiceConfig != null;
}
///
/// Gets and sets the property RelationalDatabaseConfig.
///
/// Relational database settings.
///
///
public RelationalDatabaseDataSourceConfig RelationalDatabaseConfig
{
get { return this._relationalDatabaseConfig; }
set { this._relationalDatabaseConfig = value; }
}
// Check to see if RelationalDatabaseConfig property is set
internal bool IsSetRelationalDatabaseConfig()
{
return this._relationalDatabaseConfig != null;
}
///
/// Gets and sets the property 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.
///
///
public string ServiceRoleArn
{
get { return this._serviceRoleArn; }
set { this._serviceRoleArn = value; }
}
// Check to see if ServiceRoleArn property is set
internal bool IsSetServiceRoleArn()
{
return this._serviceRoleArn != null;
}
///
/// Gets and sets the property Type.
///
/// The type of the data source.
///
/// -
///
/// AWS_LAMBDA: The data source is an Lambda function.
///
///
-
///
/// AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table.
///
///
-
///
/// AMAZON_ELASTICSEARCH: The data source is an Amazon OpenSearch Service domain.
///
///
-
///
/// AMAZON_OPENSEARCH_SERVICE: The data source is an Amazon OpenSearch Service
/// domain.
///
///
-
///
/// AMAZON_EVENTBRIDGE: The data source is an Amazon EventBridge configuration.
///
///
-
///
/// NONE: There is no data source. Use this type when you want to invoke a GraphQL
/// operation without connecting to a data source, such as when you're performing data
/// transformation with resolvers or invoking a subscription from a mutation.
///
///
-
///
/// HTTP: The data source is an HTTP endpoint.
///
///
-
///
/// RELATIONAL_DATABASE: The data source is a relational database.
///
///
///
public DataSourceType Type
{
get { return this._type; }
set { this._type = value; }
}
// Check to see if Type property is set
internal bool IsSetType()
{
return this._type != null;
}
}
}