FargateProfile.fromJson constructor

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

Implementation

factory FargateProfile.fromJson(Map<String, dynamic> json) {
  return FargateProfile(
    clusterName: json['clusterName'] as String?,
    createdAt: timeStampFromJson(json['createdAt']),
    fargateProfileArn: json['fargateProfileArn'] as String?,
    fargateProfileName: json['fargateProfileName'] as String?,
    podExecutionRoleArn: json['podExecutionRoleArn'] as String?,
    selectors: (json['selectors'] as List?)
        ?.whereNotNull()
        .map(
            (e) => FargateProfileSelector.fromJson(e as Map<String, dynamic>))
        .toList(),
    status: (json['status'] as String?)?.toFargateProfileStatus(),
    subnets: (json['subnets'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    tags: (json['tags'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
  );
}