Component.fromJson constructor

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

Implementation

factory Component.fromJson(Map<String, dynamic> json) {
  return Component(
    arn: json['arn'] as String?,
    changeDescription: json['changeDescription'] as String?,
    data: json['data'] as String?,
    dateCreated: json['dateCreated'] as String?,
    description: json['description'] as String?,
    encrypted: json['encrypted'] as bool?,
    kmsKeyId: json['kmsKeyId'] 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?,
  );
}