RestApi.fromJson constructor
RestApi.fromJson(
- Map<String, dynamic> json
)
Implementation
factory RestApi.fromJson(Map<String, dynamic> json) {
return RestApi(
apiKeySource: (json['apiKeySource'] as String?)?.toApiKeySourceType(),
binaryMediaTypes: (json['binaryMediaTypes'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
createdDate: timeStampFromJson(json['createdDate']),
description: json['description'] as String?,
disableExecuteApiEndpoint: json['disableExecuteApiEndpoint'] as bool?,
endpointConfiguration: json['endpointConfiguration'] != null
? EndpointConfiguration.fromJson(
json['endpointConfiguration'] as Map<String, dynamic>)
: null,
id: json['id'] as String?,
minimumCompressionSize: json['minimumCompressionSize'] as int?,
name: json['name'] as String?,
policy: json['policy'] 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(),
);
}