TaskSpec constructor

TaskSpec({
  1. ComputeResource? computeResource,
  2. Duration? maxRunDuration,
  3. int? maxRetryCount,
  4. Map<String, String>? environments,
  5. Iterable<Volume>? volumes,
  6. Iterable<Runnable>? runnables,
  7. Iterable<LifecyclePolicy>? lifecyclePolicies,
  8. 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;
}