TaskSpec constructor
TaskSpec({
- ComputeResource? computeResource,
- Duration? maxRunDuration,
- int? maxRetryCount,
- Map<
String, String> ? environments, - Iterable<
Volume> ? volumes, - Iterable<
Runnable> ? runnables, - Iterable<
LifecyclePolicy> ? lifecyclePolicies, - Environment? environment,
Implementation
factory TaskSpec({
ComputeResource? computeResource,
$10.Duration? maxRunDuration,
$core.int? maxRetryCount,
$core.Map<$core.String, $core.String>? environments,
$core.Iterable<Volume>? volumes,
$core.Iterable<Runnable>? runnables,
$core.Iterable<LifecyclePolicy>? lifecyclePolicies,
Environment? environment,
}) {
final $result = create();
if (computeResource != null) {
$result.computeResource = computeResource;
}
if (maxRunDuration != null) {
$result.maxRunDuration = maxRunDuration;
}
if (maxRetryCount != null) {
$result.maxRetryCount = maxRetryCount;
}
if (environments != null) {
$result.environments.addAll(environments);
}
if (volumes != null) {
$result.volumes.addAll(volumes);
}
if (runnables != null) {
$result.runnables.addAll(runnables);
}
if (lifecyclePolicies != null) {
$result.lifecyclePolicies.addAll(lifecyclePolicies);
}
if (environment != null) {
$result.environment = environment;
}
return $result;
}