CreateApiResponse.fromJson constructor
CreateApiResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory CreateApiResponse.fromJson(Map<String, dynamic> json) {
return CreateApiResponse(
apiEndpoint: json['apiEndpoint'] as String?,
apiGatewayManaged: json['apiGatewayManaged'] as bool?,
apiId: json['apiId'] as String?,
apiKeySelectionExpression: json['apiKeySelectionExpression'] as String?,
corsConfiguration: json['corsConfiguration'] != null
? Cors.fromJson(json['corsConfiguration'] as Map<String, dynamic>)
: null,
createdDate: timeStampFromJson(json['createdDate']),
description: json['description'] as String?,
disableExecuteApiEndpoint: json['disableExecuteApiEndpoint'] as bool?,
disableSchemaValidation: json['disableSchemaValidation'] as bool?,
importInfo: (json['importInfo'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
name: json['name'] as String?,
protocolType: (json['protocolType'] as String?)?.toProtocolType(),
routeSelectionExpression: json['routeSelectionExpression'] as String?,
tags: (json['tags'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
version: json['version'] as String?,
warnings: (json['warnings'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
);
}