Class TaskSpec.Builder (0.16.0)

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

Spec of a task

Protobuf type google.events.cloud.batch.v1.TaskSpec

Implements

TaskSpecOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
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. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
Name Description
values Iterable<? extends com.google.events.cloud.batch.v1.LifecyclePolicy>
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameter
Name Description
values Iterable<? extends com.google.events.cloud.batch.v1.Runnable>
Returns
Type Description
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.events.cloud.batch.v1.Volume volumes = 7;

Parameter
Name Description
values Iterable<? extends com.google.events.cloud.batch.v1.Volume>
Returns
Type Description
TaskSpec.Builder

addLifecyclePolicies(LifecyclePolicy value)

public TaskSpec.Builder addLifecyclePolicies(LifecyclePolicy value)

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
Name Description
value LifecyclePolicy
Returns
Type Description
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. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
Name Description
builderForValue LifecyclePolicy.Builder
Returns
Type Description
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. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameters
Name Description
index int
value LifecyclePolicy
Returns
Type Description
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. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameters
Name Description
index int
builderForValue LifecyclePolicy.Builder
Returns
Type Description
TaskSpec.Builder

addLifecyclePoliciesBuilder()

public LifecyclePolicy.Builder addLifecyclePoliciesBuilder()

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
Type Description
LifecyclePolicy.Builder

addLifecyclePoliciesBuilder(int index)

public LifecyclePolicy.Builder addLifecyclePoliciesBuilder(int index)

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
Name Description
index int
Returns
Type Description
LifecyclePolicy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TaskSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameter
Name Description
value Runnable
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameter
Name Description
builderForValue Runnable.Builder
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameters
Name Description
index int
value Runnable
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameters
Name Description
index int
builderForValue Runnable.Builder
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameter
Name Description
index int
Returns
Type Description
Runnable.Builder

addVolumes(Volume value)

public TaskSpec.Builder addVolumes(Volume value)

Volumes to mount before running Tasks using this TaskSpec.

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

Parameter
Name Description
value Volume
Returns
Type Description
TaskSpec.Builder

addVolumes(Volume.Builder builderForValue)

public TaskSpec.Builder addVolumes(Volume.Builder builderForValue)

Volumes to mount before running Tasks using this TaskSpec.

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

Parameter
Name Description
builderForValue Volume.Builder
Returns
Type Description
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.events.cloud.batch.v1.Volume volumes = 7;

Parameters
Name Description
index int
value Volume
Returns
Type Description
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.events.cloud.batch.v1.Volume volumes = 7;

Parameters
Name Description
index int
builderForValue Volume.Builder
Returns
Type Description
TaskSpec.Builder

addVolumesBuilder()

public Volume.Builder addVolumesBuilder()

Volumes to mount before running Tasks using this TaskSpec.

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

Returns
Type Description
Volume.Builder

addVolumesBuilder(int index)

public Volume.Builder addVolumesBuilder(int index)

Volumes to mount before running Tasks using this TaskSpec.

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

Parameter
Name Description
index int
Returns
Type Description
Volume.Builder

build()

public TaskSpec build()
Returns
Type Description
TaskSpec

buildPartial()

public TaskSpec buildPartial()
Returns
Type Description
TaskSpec

clear()

public TaskSpec.Builder clear()
Returns
Type Description
TaskSpec.Builder
Overrides

clearComputeResource()

public TaskSpec.Builder clearComputeResource()

ComputeResource requirements.

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

Returns
Type Description
TaskSpec.Builder

clearEnvironment()

public TaskSpec.Builder clearEnvironment()

Environment variables to set before running the Task.

.google.events.cloud.batch.v1.Environment environment = 10;

Returns
Type Description
TaskSpec.Builder

clearEnvironments()

public TaskSpec.Builder clearEnvironments()
Returns
Type Description
TaskSpec.Builder

clearField(Descriptors.FieldDescriptor field)

public TaskSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TaskSpec.Builder
Overrides

clearLifecyclePolicies()

public TaskSpec.Builder clearLifecyclePolicies()

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
Type Description
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
Type Description
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
Type Description
TaskSpec.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public TaskSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Returns
Type Description
TaskSpec.Builder

clearVolumes()

public TaskSpec.Builder clearVolumes()

Volumes to mount before running Tasks using this TaskSpec.

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

Returns
Type Description
TaskSpec.Builder

clone()

public TaskSpec.Builder clone()
Returns
Type Description
TaskSpec.Builder
Overrides

containsEnvironments(String key)

public boolean containsEnvironments(String key)

Deprecated: please use environment(non-plural) instead.

map<string, string> environments = 6;

Parameter
Name Description
key String
Returns
Type Description
boolean

getComputeResource()

public ComputeResource getComputeResource()

ComputeResource requirements.

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

Returns
Type Description
ComputeResource

The computeResource.

getComputeResourceBuilder()

public ComputeResource.Builder getComputeResourceBuilder()

ComputeResource requirements.

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

Returns
Type Description
ComputeResource.Builder

getComputeResourceOrBuilder()

public ComputeResourceOrBuilder getComputeResourceOrBuilder()

ComputeResource requirements.

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

Returns
Type Description
ComputeResourceOrBuilder

getDefaultInstanceForType()

public TaskSpec getDefaultInstanceForType()
Returns
Type Description
TaskSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnvironment()

public Environment getEnvironment()

Environment variables to set before running the Task.

.google.events.cloud.batch.v1.Environment environment = 10;

Returns
Type Description
Environment

The environment.

getEnvironmentBuilder()

public Environment.Builder getEnvironmentBuilder()

Environment variables to set before running the Task.

.google.events.cloud.batch.v1.Environment environment = 10;

Returns
Type Description
Environment.Builder

getEnvironmentOrBuilder()

public EnvironmentOrBuilder getEnvironmentOrBuilder()

Environment variables to set before running the Task.

.google.events.cloud.batch.v1.Environment environment = 10;

Returns
Type Description
EnvironmentOrBuilder

getEnvironments()

public Map<String,String> getEnvironments()

Use #getEnvironmentsMap() instead.

Returns
Type Description
Map<String,String>

getEnvironmentsCount()

public int getEnvironmentsCount()

Deprecated: please use environment(non-plural) instead.

map<string, string> environments = 6;

Returns
Type Description
int

getEnvironmentsMap()

public Map<String,String> getEnvironmentsMap()

Deprecated: please use environment(non-plural) instead.

map<string, string> environments = 6;

Returns
Type Description
Map<String,String>

getEnvironmentsOrDefault(String key, String defaultValue)

public String getEnvironmentsOrDefault(String key, String defaultValue)

Deprecated: please use environment(non-plural) instead.

map<string, string> environments = 6;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getEnvironmentsOrThrow(String key)

public String getEnvironmentsOrThrow(String key)

Deprecated: please use environment(non-plural) instead.

map<string, string> environments = 6;

Parameter
Name Description
key String
Returns
Type Description
String

getLifecyclePolicies(int index)

public LifecyclePolicy getLifecyclePolicies(int index)

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
Name Description
index int
Returns
Type Description
LifecyclePolicy

getLifecyclePoliciesBuilder(int index)

public LifecyclePolicy.Builder getLifecyclePoliciesBuilder(int index)

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
Name Description
index int
Returns
Type Description
LifecyclePolicy.Builder

getLifecyclePoliciesBuilderList()

public List<LifecyclePolicy.Builder> getLifecyclePoliciesBuilderList()

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
Type Description
List<Builder>

getLifecyclePoliciesCount()

public int getLifecyclePoliciesCount()

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
Type Description
int

getLifecyclePoliciesList()

public List<LifecyclePolicy> getLifecyclePoliciesList()

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
Type Description
List<LifecyclePolicy>

getLifecyclePoliciesOrBuilder(int index)

public LifecyclePolicyOrBuilder getLifecyclePoliciesOrBuilder(int index)

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
Name Description
index int
Returns
Type Description
LifecyclePolicyOrBuilder

getLifecyclePoliciesOrBuilderList()

public List<? extends LifecyclePolicyOrBuilder> getLifecyclePoliciesOrBuilderList()

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Returns
Type Description
List<? extends com.google.events.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
Type Description
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
Type Description
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
Type Description
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
Type Description
DurationOrBuilder

getMutableEnvironments()

public Map<String,String> getMutableEnvironments()

Use alternate mutation accessors instead.

Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameter
Name Description
index int
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameter
Name Description
index int
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameter
Name Description
index int
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Returns
Type Description
List<? extends com.google.events.cloud.batch.v1.RunnableOrBuilder>

getVolumes(int index)

public Volume getVolumes(int index)

Volumes to mount before running Tasks using this TaskSpec.

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

Parameter
Name Description
index int
Returns
Type Description
Volume

getVolumesBuilder(int index)

public Volume.Builder getVolumesBuilder(int index)

Volumes to mount before running Tasks using this TaskSpec.

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

Parameter
Name Description
index int
Returns
Type Description
Volume.Builder

getVolumesBuilderList()

public List<Volume.Builder> getVolumesBuilderList()

Volumes to mount before running Tasks using this TaskSpec.

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

Returns
Type Description
List<Builder>

getVolumesCount()

public int getVolumesCount()

Volumes to mount before running Tasks using this TaskSpec.

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

Returns
Type Description
int

getVolumesList()

public List<Volume> getVolumesList()

Volumes to mount before running Tasks using this TaskSpec.

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

Returns
Type Description
List<Volume>

getVolumesOrBuilder(int index)

public VolumeOrBuilder getVolumesOrBuilder(int index)

Volumes to mount before running Tasks using this TaskSpec.

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

Parameter
Name Description
index int
Returns
Type Description
VolumeOrBuilder

getVolumesOrBuilderList()

public List<? extends VolumeOrBuilder> getVolumesOrBuilderList()

Volumes to mount before running Tasks using this TaskSpec.

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

Returns
Type Description
List<? extends com.google.events.cloud.batch.v1.VolumeOrBuilder>

hasComputeResource()

public boolean hasComputeResource()

ComputeResource requirements.

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

Returns
Type Description
boolean

Whether the computeResource field is set.

hasEnvironment()

public boolean hasEnvironment()

Environment variables to set before running the Task.

.google.events.cloud.batch.v1.Environment environment = 10;

Returns
Type Description
boolean

Whether the environment 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
Type Description
boolean

Whether the maxRunDuration field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeComputeResource(ComputeResource value)

public TaskSpec.Builder mergeComputeResource(ComputeResource value)

ComputeResource requirements.

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

Parameter
Name Description
value ComputeResource
Returns
Type Description
TaskSpec.Builder

mergeEnvironment(Environment value)

public TaskSpec.Builder mergeEnvironment(Environment value)

Environment variables to set before running the Task.

.google.events.cloud.batch.v1.Environment environment = 10;

Parameter
Name Description
value Environment
Returns
Type Description
TaskSpec.Builder

mergeFrom(TaskSpec other)

public TaskSpec.Builder mergeFrom(TaskSpec other)
Parameter
Name Description
other TaskSpec
Returns
Type Description
TaskSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TaskSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TaskSpec.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TaskSpec.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value Duration
Returns
Type Description
TaskSpec.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TaskSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TaskSpec.Builder
Overrides

putAllEnvironments(Map<String,String> values)

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

Deprecated: please use environment(non-plural) instead.

map<string, string> environments = 6;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
TaskSpec.Builder

putEnvironments(String key, String value)

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

Deprecated: please use environment(non-plural) instead.

map<string, string> environments = 6;

Parameters
Name Description
key String
value String
Returns
Type Description
TaskSpec.Builder

removeEnvironments(String key)

public TaskSpec.Builder removeEnvironments(String key)

Deprecated: please use environment(non-plural) instead.

map<string, string> environments = 6;

Parameter
Name Description
key String
Returns
Type Description
TaskSpec.Builder

removeLifecyclePolicies(int index)

public TaskSpec.Builder removeLifecyclePolicies(int index)

Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameter
Name Description
index int
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameter
Name Description
index int
Returns
Type Description
TaskSpec.Builder

removeVolumes(int index)

public TaskSpec.Builder removeVolumes(int index)

Volumes to mount before running Tasks using this TaskSpec.

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

Parameter
Name Description
index int
Returns
Type Description
TaskSpec.Builder

setComputeResource(ComputeResource value)

public TaskSpec.Builder setComputeResource(ComputeResource value)

ComputeResource requirements.

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

Parameter
Name Description
value ComputeResource
Returns
Type Description
TaskSpec.Builder

setComputeResource(ComputeResource.Builder builderForValue)

public TaskSpec.Builder setComputeResource(ComputeResource.Builder builderForValue)

ComputeResource requirements.

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

Parameter
Name Description
builderForValue ComputeResource.Builder
Returns
Type Description
TaskSpec.Builder

setEnvironment(Environment value)

public TaskSpec.Builder setEnvironment(Environment value)

Environment variables to set before running the Task.

.google.events.cloud.batch.v1.Environment environment = 10;

Parameter
Name Description
value Environment
Returns
Type Description
TaskSpec.Builder

setEnvironment(Environment.Builder builderForValue)

public TaskSpec.Builder setEnvironment(Environment.Builder builderForValue)

Environment variables to set before running the Task.

.google.events.cloud.batch.v1.Environment environment = 10;

Parameter
Name Description
builderForValue Environment.Builder
Returns
Type Description
TaskSpec.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public TaskSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameters
Name Description
index int
value LifecyclePolicy
Returns
Type Description
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. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with 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.events.cloud.batch.v1.LifecyclePolicy lifecycle_policies = 9;

Parameters
Name Description
index int
builderForValue LifecyclePolicy.Builder
Returns
Type Description
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
Name Description
value int

The maxRetryCount to set.

Returns
Type Description
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
Name Description
value Duration
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
TaskSpec.Builder

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

public TaskSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameters
Name Description
index int
value Runnable
Returns
Type Description
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.events.cloud.batch.v1.Runnable runnables = 8;

Parameters
Name Description
index int
builderForValue Runnable.Builder
Returns
Type Description
TaskSpec.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final TaskSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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.events.cloud.batch.v1.Volume volumes = 7;

Parameters
Name Description
index int
value Volume
Returns
Type Description
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.events.cloud.batch.v1.Volume volumes = 7;

Parameters
Name Description
index int
builderForValue Volume.Builder
Returns
Type Description
TaskSpec.Builder