ComponentSummary.fromJson constructor

ComponentSummary.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ComponentSummary.fromJson(Map<String, dynamic> json) {
  return ComponentSummary(
    arn: json['arn'] as String?,
    changeDescription: json['changeDescription'] as String?,
    dateCreated: json['dateCreated'] as String?,
    description: json['description'] as String?,
    name: json['name'] as String?,
    owner: json['owner'] as String?,
    platform: (json['platform'] as String?)?.toPlatform(),
    supportedOsVersions: (json['supportedOsVersions'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    tags: (json['tags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    type: (json['type'] as String?)?.toComponentType(),
    version: json['version'] as String?,
  );
}