ContainerDetail.fromJson constructor
ContainerDetail.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ContainerDetail.fromJson(Map<String, dynamic> json) {
return ContainerDetail(
command: (json['command'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
containerInstanceArn: json['containerInstanceArn'] as String?,
environment: (json['environment'] as List?)
?.whereNotNull()
.map((e) => KeyValuePair.fromJson(e as Map<String, dynamic>))
.toList(),
executionRoleArn: json['executionRoleArn'] as String?,
exitCode: json['exitCode'] as int?,
fargatePlatformConfiguration: json['fargatePlatformConfiguration'] != null
? FargatePlatformConfiguration.fromJson(
json['fargatePlatformConfiguration'] as Map<String, dynamic>)
: null,
image: json['image'] as String?,
instanceType: json['instanceType'] as String?,
jobRoleArn: json['jobRoleArn'] as String?,
linuxParameters: json['linuxParameters'] != null
? LinuxParameters.fromJson(
json['linuxParameters'] as Map<String, dynamic>)
: null,
logConfiguration: json['logConfiguration'] != null
? LogConfiguration.fromJson(
json['logConfiguration'] as Map<String, dynamic>)
: null,
logStreamName: json['logStreamName'] as String?,
memory: json['memory'] as int?,
mountPoints: (json['mountPoints'] as List?)
?.whereNotNull()
.map((e) => MountPoint.fromJson(e as Map<String, dynamic>))
.toList(),
networkConfiguration: json['networkConfiguration'] != null
? NetworkConfiguration.fromJson(
json['networkConfiguration'] as Map<String, dynamic>)
: null,
networkInterfaces: (json['networkInterfaces'] as List?)
?.whereNotNull()
.map((e) => NetworkInterface.fromJson(e as Map<String, dynamic>))
.toList(),
privileged: json['privileged'] as bool?,
readonlyRootFilesystem: json['readonlyRootFilesystem'] as bool?,
reason: json['reason'] as String?,
resourceRequirements: (json['resourceRequirements'] as List?)
?.whereNotNull()
.map((e) => ResourceRequirement.fromJson(e as Map<String, dynamic>))
.toList(),
secrets: (json['secrets'] as List?)
?.whereNotNull()
.map((e) => Secret.fromJson(e as Map<String, dynamic>))
.toList(),
taskArn: json['taskArn'] as String?,
ulimits: (json['ulimits'] as List?)
?.whereNotNull()
.map((e) => Ulimit.fromJson(e as Map<String, dynamic>))
.toList(),
user: json['user'] as String?,
vcpus: json['vcpus'] as int?,
volumes: (json['volumes'] as List?)
?.whereNotNull()
.map((e) => Volume.fromJson(e as Map<String, dynamic>))
.toList(),
);
}