ContainerProperties.fromJson constructor
ContainerProperties.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ContainerProperties.fromJson(Map<String, dynamic> json) {
return ContainerProperties(
command: (json['command'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
environment: (json['environment'] as List?)
?.whereNotNull()
.map((e) => KeyValuePair.fromJson(e as Map<String, dynamic>))
.toList(),
executionRoleArn: json['executionRoleArn'] as String?,
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,
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,
privileged: json['privileged'] as bool?,
readonlyRootFilesystem: json['readonlyRootFilesystem'] as bool?,
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(),
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(),
);
}