TaskSpec.fromJson constructor
TaskSpec.fromJson(
- Map json_
Implementation
TaskSpec.fromJson(core.Map json_)
: this(
computeResource: json_.containsKey('computeResource')
? ComputeResource.fromJson(json_['computeResource']
as core.Map<core.String, core.dynamic>)
: null,
environment: json_.containsKey('environment')
? Environment.fromJson(
json_['environment'] as core.Map<core.String, core.dynamic>)
: null,
environments: json_.containsKey('environments')
? (json_['environments'] as core.Map<core.String, core.dynamic>)
.map(
(key, value) => core.MapEntry(
key,
value as core.String,
),
)
: null,
lifecyclePolicies: json_.containsKey('lifecyclePolicies')
? (json_['lifecyclePolicies'] as core.List)
.map((value) => LifecyclePolicy.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
maxRetryCount: json_.containsKey('maxRetryCount')
? json_['maxRetryCount'] as core.int
: null,
maxRunDuration: json_.containsKey('maxRunDuration')
? json_['maxRunDuration'] as core.String
: null,
runnables: json_.containsKey('runnables')
? (json_['runnables'] as core.List)
.map((value) => Runnable.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
volumes: json_.containsKey('volumes')
? (json_['volumes'] as core.List)
.map((value) => Volume.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);