Class TaskSpec.Builder (0.1.0)

public static final class TaskSpec.Builder extends GeneratedMessageV3.Builder<TaskSpec.Builder> implements TaskSpecOrBuilder

Spec of a task

Protobuf type google.cloud.batch.v1.TaskSpec

Implements

TaskSpecOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllLifecyclePolicies(Iterable<? extends LifecyclePolicy> values)

public TaskSpec.Builder addAllLifecyclePolicies(Iterable<? extends LifecyclePolicy> values)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.batch.v1.LifecyclePolicy>
Returns
TypeDescription
TaskSpec.Builder

addAllRunnables(Iterable<? extends Runnable> values)

public TaskSpec.Builder addAllRunnables(Iterable<? extends Runnable> values)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.batch.v1.Runnable>
Returns
TypeDescription
TaskSpec.Builder

addAllVolumes(Iterable<? extends Volume> values)

public TaskSpec.Builder addAllVolumes(Iterable<? extends Volume> values)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.batch.v1.Volume>
Returns
TypeDescription
TaskSpec.Builder

addLifecyclePolicies(LifecyclePolicy value)

public TaskSpec.Builder addLifecyclePolicies(LifecyclePolicy value)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
NameDescription
valueLifecyclePolicy
Returns
TypeDescription
TaskSpec.Builder

addLifecyclePolicies(LifecyclePolicy.Builder builderForValue)

public TaskSpec.Builder addLifecyclePolicies(LifecyclePolicy.Builder builderForValue)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
NameDescription
builderForValueLifecyclePolicy.Builder
Returns
TypeDescription
TaskSpec.Builder

addLifecyclePolicies(int index, LifecyclePolicy value)

public TaskSpec.Builder addLifecyclePolicies(int index, LifecyclePolicy value)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameters
NameDescription
indexint
valueLifecyclePolicy
Returns
TypeDescription
TaskSpec.Builder

addLifecyclePolicies(int index, LifecyclePolicy.Builder builderForValue)

public TaskSpec.Builder addLifecyclePolicies(int index, LifecyclePolicy.Builder builderForValue)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameters
NameDescription
indexint
builderForValueLifecyclePolicy.Builder
Returns
TypeDescription
TaskSpec.Builder

addLifecyclePoliciesBuilder()

public LifecyclePolicy.Builder addLifecyclePoliciesBuilder()

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
TypeDescription
LifecyclePolicy.Builder

addLifecyclePoliciesBuilder(int index)

public LifecyclePolicy.Builder addLifecyclePoliciesBuilder(int index)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
LifecyclePolicy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TaskSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TaskSpec.Builder
Overrides

addRunnables(Runnable value)

public TaskSpec.Builder addRunnables(Runnable value)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameter
NameDescription
valueRunnable
Returns
TypeDescription
TaskSpec.Builder

addRunnables(Runnable.Builder builderForValue)

public TaskSpec.Builder addRunnables(Runnable.Builder builderForValue)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameter
NameDescription
builderForValueRunnable.Builder
Returns
TypeDescription
TaskSpec.Builder

addRunnables(int index, Runnable value)

public TaskSpec.Builder addRunnables(int index, Runnable value)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameters
NameDescription
indexint
valueRunnable
Returns
TypeDescription
TaskSpec.Builder

addRunnables(int index, Runnable.Builder builderForValue)

public TaskSpec.Builder addRunnables(int index, Runnable.Builder builderForValue)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameters
NameDescription
indexint
builderForValueRunnable.Builder
Returns
TypeDescription
TaskSpec.Builder

addRunnablesBuilder()

public Runnable.Builder addRunnablesBuilder()

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Returns
TypeDescription
Runnable.Builder

addRunnablesBuilder(int index)

public Runnable.Builder addRunnablesBuilder(int index)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Runnable.Builder

addVolumes(Volume value)

public TaskSpec.Builder addVolumes(Volume value)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameter
NameDescription
valueVolume
Returns
TypeDescription
TaskSpec.Builder

addVolumes(Volume.Builder builderForValue)

public TaskSpec.Builder addVolumes(Volume.Builder builderForValue)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameter
NameDescription
builderForValueVolume.Builder
Returns
TypeDescription
TaskSpec.Builder

addVolumes(int index, Volume value)

public TaskSpec.Builder addVolumes(int index, Volume value)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameters
NameDescription
indexint
valueVolume
Returns
TypeDescription
TaskSpec.Builder

addVolumes(int index, Volume.Builder builderForValue)

public TaskSpec.Builder addVolumes(int index, Volume.Builder builderForValue)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameters
NameDescription
indexint
builderForValueVolume.Builder
Returns
TypeDescription
TaskSpec.Builder

addVolumesBuilder()

public Volume.Builder addVolumesBuilder()

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Returns
TypeDescription
Volume.Builder

addVolumesBuilder(int index)

public Volume.Builder addVolumesBuilder(int index)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Volume.Builder

build()

public TaskSpec build()
Returns
TypeDescription
TaskSpec

buildPartial()

public TaskSpec buildPartial()
Returns
TypeDescription
TaskSpec

clear()

public TaskSpec.Builder clear()
Returns
TypeDescription
TaskSpec.Builder
Overrides

clearComputeResource()

public TaskSpec.Builder clearComputeResource()

ComputeResource requirements.

.google.cloud.batch.v1.ComputeResource compute_resource = 3;

Returns
TypeDescription
TaskSpec.Builder

clearEnvironments()

public TaskSpec.Builder clearEnvironments()
Returns
TypeDescription
TaskSpec.Builder

clearField(Descriptors.FieldDescriptor field)

public TaskSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TaskSpec.Builder
Overrides

clearLifecyclePolicies()

public TaskSpec.Builder clearLifecyclePolicies()

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
TypeDescription
TaskSpec.Builder

clearMaxRetryCount()

public TaskSpec.Builder clearMaxRetryCount()

Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].

int32 max_retry_count = 5;

Returns
TypeDescription
TaskSpec.Builder

This builder for chaining.

clearMaxRunDuration()

public TaskSpec.Builder clearMaxRunDuration()

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

.google.protobuf.Duration max_run_duration = 4;

Returns
TypeDescription
TaskSpec.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public TaskSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TaskSpec.Builder
Overrides

clearRunnables()

public TaskSpec.Builder clearRunnables()

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Returns
TypeDescription
TaskSpec.Builder

clearVolumes()

public TaskSpec.Builder clearVolumes()

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Returns
TypeDescription
TaskSpec.Builder

clone()

public TaskSpec.Builder clone()
Returns
TypeDescription
TaskSpec.Builder
Overrides

containsEnvironments(String key)

public boolean containsEnvironments(String key)

Environment variables to set before running the Task. You can set up to 100 environments.

map<string, string> environments = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getComputeResource()

public ComputeResource getComputeResource()

ComputeResource requirements.

.google.cloud.batch.v1.ComputeResource compute_resource = 3;

Returns
TypeDescription
ComputeResource

The computeResource.

getComputeResourceBuilder()

public ComputeResource.Builder getComputeResourceBuilder()

ComputeResource requirements.

.google.cloud.batch.v1.ComputeResource compute_resource = 3;

Returns
TypeDescription
ComputeResource.Builder

getComputeResourceOrBuilder()

public ComputeResourceOrBuilder getComputeResourceOrBuilder()

ComputeResource requirements.

.google.cloud.batch.v1.ComputeResource compute_resource = 3;

Returns
TypeDescription
ComputeResourceOrBuilder

getDefaultInstanceForType()

public TaskSpec getDefaultInstanceForType()
Returns
TypeDescription
TaskSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnvironments()

public Map<String,String> getEnvironments()

Use #getEnvironmentsMap() instead.

Returns
TypeDescription
Map<String,String>

getEnvironmentsCount()

public int getEnvironmentsCount()

Environment variables to set before running the Task. You can set up to 100 environments.

map<string, string> environments = 6;

Returns
TypeDescription
int

getEnvironmentsMap()

public Map<String,String> getEnvironmentsMap()

Environment variables to set before running the Task. You can set up to 100 environments.

map<string, string> environments = 6;

Returns
TypeDescription
Map<String,String>

getEnvironmentsOrDefault(String key, String defaultValue)

public String getEnvironmentsOrDefault(String key, String defaultValue)

Environment variables to set before running the Task. You can set up to 100 environments.

map<string, string> environments = 6;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getEnvironmentsOrThrow(String key)

public String getEnvironmentsOrThrow(String key)

Environment variables to set before running the Task. You can set up to 100 environments.

map<string, string> environments = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getLifecyclePolicies(int index)

public LifecyclePolicy getLifecyclePolicies(int index)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
LifecyclePolicy

getLifecyclePoliciesBuilder(int index)

public LifecyclePolicy.Builder getLifecyclePoliciesBuilder(int index)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
LifecyclePolicy.Builder

getLifecyclePoliciesBuilderList()

public List<LifecyclePolicy.Builder> getLifecyclePoliciesBuilderList()

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
TypeDescription
List<Builder>

getLifecyclePoliciesCount()

public int getLifecyclePoliciesCount()

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
TypeDescription
int

getLifecyclePoliciesList()

public List<LifecyclePolicy> getLifecyclePoliciesList()

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
TypeDescription
List<LifecyclePolicy>

getLifecyclePoliciesOrBuilder(int index)

public LifecyclePolicyOrBuilder getLifecyclePoliciesOrBuilder(int index)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
LifecyclePolicyOrBuilder

getLifecyclePoliciesOrBuilderList()

public List<? extends LifecyclePolicyOrBuilder> getLifecyclePoliciesOrBuilderList()

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
TypeDescription
List<? extends com.google.cloud.batch.v1.LifecyclePolicyOrBuilder>

getMaxRetryCount()

public int getMaxRetryCount()

Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].

int32 max_retry_count = 5;

Returns
TypeDescription
int

The maxRetryCount.

getMaxRunDuration()

public Duration getMaxRunDuration()

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

.google.protobuf.Duration max_run_duration = 4;

Returns
TypeDescription
Duration

The maxRunDuration.

getMaxRunDurationBuilder()

public Duration.Builder getMaxRunDurationBuilder()

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

.google.protobuf.Duration max_run_duration = 4;

Returns
TypeDescription
Builder

getMaxRunDurationOrBuilder()

public DurationOrBuilder getMaxRunDurationOrBuilder()

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

.google.protobuf.Duration max_run_duration = 4;

Returns
TypeDescription
DurationOrBuilder

getMutableEnvironments()

public Map<String,String> getMutableEnvironments()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getRunnables(int index)

public Runnable getRunnables(int index)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Runnable

getRunnablesBuilder(int index)

public Runnable.Builder getRunnablesBuilder(int index)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Runnable.Builder

getRunnablesBuilderList()

public List<Runnable.Builder> getRunnablesBuilderList()

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Returns
TypeDescription
List<Builder>

getRunnablesCount()

public int getRunnablesCount()

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Returns
TypeDescription
int

getRunnablesList()

public List<Runnable> getRunnablesList()

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Returns
TypeDescription
List<Runnable>

getRunnablesOrBuilder(int index)

public RunnableOrBuilder getRunnablesOrBuilder(int index)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
RunnableOrBuilder

getRunnablesOrBuilderList()

public List<? extends RunnableOrBuilder> getRunnablesOrBuilderList()

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Returns
TypeDescription
List<? extends com.google.cloud.batch.v1.RunnableOrBuilder>

getVolumes(int index)

public Volume getVolumes(int index)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Volume

getVolumesBuilder(int index)

public Volume.Builder getVolumesBuilder(int index)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
Volume.Builder

getVolumesBuilderList()

public List<Volume.Builder> getVolumesBuilderList()

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Returns
TypeDescription
List<Builder>

getVolumesCount()

public int getVolumesCount()

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Returns
TypeDescription
int

getVolumesList()

public List<Volume> getVolumesList()

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Returns
TypeDescription
List<Volume>

getVolumesOrBuilder(int index)

public VolumeOrBuilder getVolumesOrBuilder(int index)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
VolumeOrBuilder

getVolumesOrBuilderList()

public List<? extends VolumeOrBuilder> getVolumesOrBuilderList()

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Returns
TypeDescription
List<? extends com.google.cloud.batch.v1.VolumeOrBuilder>

hasComputeResource()

public boolean hasComputeResource()

ComputeResource requirements.

.google.cloud.batch.v1.ComputeResource compute_resource = 3;

Returns
TypeDescription
boolean

Whether the computeResource field is set.

hasMaxRunDuration()

public boolean hasMaxRunDuration()

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

.google.protobuf.Duration max_run_duration = 4;

Returns
TypeDescription
boolean

Whether the maxRunDuration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeComputeResource(ComputeResource value)

public TaskSpec.Builder mergeComputeResource(ComputeResource value)

ComputeResource requirements.

.google.cloud.batch.v1.ComputeResource compute_resource = 3;

Parameter
NameDescription
valueComputeResource
Returns
TypeDescription
TaskSpec.Builder

mergeFrom(TaskSpec other)

public TaskSpec.Builder mergeFrom(TaskSpec other)
Parameter
NameDescription
otherTaskSpec
Returns
TypeDescription
TaskSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TaskSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TaskSpec.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TaskSpec.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TaskSpec.Builder
Overrides

mergeMaxRunDuration(Duration value)

public TaskSpec.Builder mergeMaxRunDuration(Duration value)

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

.google.protobuf.Duration max_run_duration = 4;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
TaskSpec.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TaskSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TaskSpec.Builder
Overrides

putAllEnvironments(Map<String,String> values)

public TaskSpec.Builder putAllEnvironments(Map<String,String> values)

Environment variables to set before running the Task. You can set up to 100 environments.

map<string, string> environments = 6;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
TaskSpec.Builder

putEnvironments(String key, String value)

public TaskSpec.Builder putEnvironments(String key, String value)

Environment variables to set before running the Task. You can set up to 100 environments.

map<string, string> environments = 6;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
TaskSpec.Builder

removeEnvironments(String key)

public TaskSpec.Builder removeEnvironments(String key)

Environment variables to set before running the Task. You can set up to 100 environments.

map<string, string> environments = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
TaskSpec.Builder

removeLifecyclePolicies(int index)

public TaskSpec.Builder removeLifecyclePolicies(int index)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
NameDescription
indexint
Returns
TypeDescription
TaskSpec.Builder

removeRunnables(int index)

public TaskSpec.Builder removeRunnables(int index)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
TaskSpec.Builder

removeVolumes(int index)

public TaskSpec.Builder removeVolumes(int index)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameter
NameDescription
indexint
Returns
TypeDescription
TaskSpec.Builder

setComputeResource(ComputeResource value)

public TaskSpec.Builder setComputeResource(ComputeResource value)

ComputeResource requirements.

.google.cloud.batch.v1.ComputeResource compute_resource = 3;

Parameter
NameDescription
valueComputeResource
Returns
TypeDescription
TaskSpec.Builder

setComputeResource(ComputeResource.Builder builderForValue)

public TaskSpec.Builder setComputeResource(ComputeResource.Builder builderForValue)

ComputeResource requirements.

.google.cloud.batch.v1.ComputeResource compute_resource = 3;

Parameter
NameDescription
builderForValueComputeResource.Builder
Returns
TypeDescription
TaskSpec.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public TaskSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TaskSpec.Builder
Overrides

setLifecyclePolicies(int index, LifecyclePolicy value)

public TaskSpec.Builder setLifecyclePolicies(int index, LifecyclePolicy value)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameters
NameDescription
indexint
valueLifecyclePolicy
Returns
TypeDescription
TaskSpec.Builder

setLifecyclePolicies(int index, LifecyclePolicy.Builder builderForValue)

public TaskSpec.Builder setLifecyclePolicies(int index, LifecyclePolicy.Builder builderForValue)

Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will be executed. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.

repeated .google.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameters
NameDescription
indexint
builderForValueLifecyclePolicy.Builder
Returns
TypeDescription
TaskSpec.Builder

setMaxRetryCount(int value)

public TaskSpec.Builder setMaxRetryCount(int value)

Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].

int32 max_retry_count = 5;

Parameter
NameDescription
valueint

The maxRetryCount to set.

Returns
TypeDescription
TaskSpec.Builder

This builder for chaining.

setMaxRunDuration(Duration value)

public TaskSpec.Builder setMaxRunDuration(Duration value)

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

.google.protobuf.Duration max_run_duration = 4;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
TaskSpec.Builder

setMaxRunDuration(Duration.Builder builderForValue)

public TaskSpec.Builder setMaxRunDuration(Duration.Builder builderForValue)

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.

.google.protobuf.Duration max_run_duration = 4;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
TaskSpec.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TaskSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
TaskSpec.Builder
Overrides

setRunnables(int index, Runnable value)

public TaskSpec.Builder setRunnables(int index, Runnable value)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameters
NameDescription
indexint
valueRunnable
Returns
TypeDescription
TaskSpec.Builder

setRunnables(int index, Runnable.Builder builderForValue)

public TaskSpec.Builder setRunnables(int index, Runnable.Builder builderForValue)

The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.

repeated .google.cloud.batch.v1.Runnable runnables = 8;

Parameters
NameDescription
indexint
builderForValueRunnable.Builder
Returns
TypeDescription
TaskSpec.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final TaskSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TaskSpec.Builder
Overrides

setVolumes(int index, Volume value)

public TaskSpec.Builder setVolumes(int index, Volume value)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameters
NameDescription
indexint
valueVolume
Returns
TypeDescription
TaskSpec.Builder

setVolumes(int index, Volume.Builder builderForValue)

public TaskSpec.Builder setVolumes(int index, Volume.Builder builderForValue)

Volumes to mount before running Tasks using this TaskSpec.

repeated .google.cloud.batch.v1.Volume volumes = 7;

Parameters
NameDescription
indexint
builderForValueVolume.Builder
Returns
TypeDescription
TaskSpec.Builder