DataSource.fromJson constructor
DataSource.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DataSource.fromJson(Map<String, dynamic> json) {
return DataSource(
dataSourceArn: json['dataSourceArn'] as String?,
description: json['description'] as String?,
dynamodbConfig: json['dynamodbConfig'] != null
? DynamodbDataSourceConfig.fromJson(
json['dynamodbConfig'] as Map<String, dynamic>)
: null,
elasticsearchConfig: json['elasticsearchConfig'] != null
? ElasticsearchDataSourceConfig.fromJson(
json['elasticsearchConfig'] as Map<String, dynamic>)
: null,
httpConfig: json['httpConfig'] != null
? HttpDataSourceConfig.fromJson(
json['httpConfig'] as Map<String, dynamic>)
: null,
lambdaConfig: json['lambdaConfig'] != null
? LambdaDataSourceConfig.fromJson(
json['lambdaConfig'] as Map<String, dynamic>)
: null,
name: json['name'] as String?,
relationalDatabaseConfig: json['relationalDatabaseConfig'] != null
? RelationalDatabaseDataSourceConfig.fromJson(
json['relationalDatabaseConfig'] as Map<String, dynamic>)
: null,
serviceRoleArn: json['serviceRoleArn'] as String?,
type: (json['type'] as String?)?.toDataSourceType(),
);
}