ImageRecipe.fromJson constructor

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

Implementation

factory ImageRecipe.fromJson(Map<String, dynamic> json) {
  return ImageRecipe(
    arn: json['arn'] as String?,
    blockDeviceMappings: (json['blockDeviceMappings'] as List?)
        ?.whereNotNull()
        .map((e) =>
            InstanceBlockDeviceMapping.fromJson(e as Map<String, dynamic>))
        .toList(),
    components: (json['components'] as List?)
        ?.whereNotNull()
        .map(
            (e) => ComponentConfiguration.fromJson(e as Map<String, dynamic>))
        .toList(),
    dateCreated: json['dateCreated'] as String?,
    description: json['description'] as String?,
    name: json['name'] as String?,
    owner: json['owner'] as String?,
    parentImage: json['parentImage'] as String?,
    platform: (json['platform'] as String?)?.toPlatform(),
    tags: (json['tags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    type: (json['type'] as String?)?.toImageType(),
    version: json['version'] as String?,
    workingDirectory: json['workingDirectory'] as String?,
  );
}