Class TaskGroup.Builder (0.15.0)

public static final class TaskGroup.Builder extends GeneratedMessageV3.Builder<TaskGroup.Builder> implements TaskGroupOrBuilder

A TaskGroup defines one or more Tasks that all share the same TaskSpec.

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

Implements

TaskGroupOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllTaskEnvironments(Iterable<? extends Environment> values)

public TaskGroup.Builder addAllTaskEnvironments(Iterable<? extends Environment> values)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TaskGroup.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TaskGroup.Builder
Overrides

addTaskEnvironments(Environment value)

public TaskGroup.Builder addTaskEnvironments(Environment value)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameter
Name Description
value Environment
Returns
Type Description
TaskGroup.Builder

addTaskEnvironments(Environment.Builder builderForValue)

public TaskGroup.Builder addTaskEnvironments(Environment.Builder builderForValue)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

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

addTaskEnvironments(int index, Environment value)

public TaskGroup.Builder addTaskEnvironments(int index, Environment value)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameters
Name Description
index int
value Environment
Returns
Type Description
TaskGroup.Builder

addTaskEnvironments(int index, Environment.Builder builderForValue)

public TaskGroup.Builder addTaskEnvironments(int index, Environment.Builder builderForValue)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameters
Name Description
index int
builderForValue Environment.Builder
Returns
Type Description
TaskGroup.Builder

addTaskEnvironmentsBuilder()

public Environment.Builder addTaskEnvironmentsBuilder()

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Returns
Type Description
Environment.Builder

addTaskEnvironmentsBuilder(int index)

public Environment.Builder addTaskEnvironmentsBuilder(int index)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameter
Name Description
index int
Returns
Type Description
Environment.Builder

build()

public TaskGroup build()
Returns
Type Description
TaskGroup

buildPartial()

public TaskGroup buildPartial()
Returns
Type Description
TaskGroup

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public TaskGroup.Builder clearName()

Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".

string name = 1;

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public TaskGroup.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TaskGroup.Builder
Overrides

clearParallelism()

public TaskGroup.Builder clearParallelism()

Max number of tasks that can run in parallel. Default to min(task_count, 1000). Field parallelism must be 1 if the scheduling_policy is IN_ORDER.

int64 parallelism = 5;

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

clearPermissiveSsh()

public TaskGroup.Builder clearPermissiveSsh()

When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup.

bool permissive_ssh = 12;

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

clearRequireHostsFile()

public TaskGroup.Builder clearRequireHostsFile()

When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false.

bool require_hosts_file = 11;

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

clearSchedulingPolicy()

public TaskGroup.Builder clearSchedulingPolicy()

Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.

.google.events.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6;

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

clearTaskCount()

public TaskGroup.Builder clearTaskCount()

Number of Tasks in the TaskGroup. Default is 1.

int64 task_count = 4;

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

clearTaskCountPerNode()

public TaskGroup.Builder clearTaskCountPerNode()

Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements.

int64 task_count_per_node = 10;

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

clearTaskEnvironments()

public TaskGroup.Builder clearTaskEnvironments()

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Returns
Type Description
TaskGroup.Builder

clearTaskSpec()

public TaskGroup.Builder clearTaskSpec()

Required. Tasks in the group share the same task spec.

.google.events.cloud.batch.v1.TaskSpec task_spec = 3;

Returns
Type Description
TaskGroup.Builder

clone()

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

getDefaultInstanceForType()

public TaskGroup getDefaultInstanceForType()
Returns
Type Description
TaskGroup

getDescriptorForType()

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

getName()

public String getName()

Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getParallelism()

public long getParallelism()

Max number of tasks that can run in parallel. Default to min(task_count, 1000). Field parallelism must be 1 if the scheduling_policy is IN_ORDER.

int64 parallelism = 5;

Returns
Type Description
long

The parallelism.

getPermissiveSsh()

public boolean getPermissiveSsh()

When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup.

bool permissive_ssh = 12;

Returns
Type Description
boolean

The permissiveSsh.

getRequireHostsFile()

public boolean getRequireHostsFile()

When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false.

bool require_hosts_file = 11;

Returns
Type Description
boolean

The requireHostsFile.

getSchedulingPolicy()

public TaskGroup.SchedulingPolicy getSchedulingPolicy()

Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.

.google.events.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6;

Returns
Type Description
TaskGroup.SchedulingPolicy

The schedulingPolicy.

getSchedulingPolicyValue()

public int getSchedulingPolicyValue()

Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.

.google.events.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6;

Returns
Type Description
int

The enum numeric value on the wire for schedulingPolicy.

getTaskCount()

public long getTaskCount()

Number of Tasks in the TaskGroup. Default is 1.

int64 task_count = 4;

Returns
Type Description
long

The taskCount.

getTaskCountPerNode()

public long getTaskCountPerNode()

Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements.

int64 task_count_per_node = 10;

Returns
Type Description
long

The taskCountPerNode.

getTaskEnvironments(int index)

public Environment getTaskEnvironments(int index)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameter
Name Description
index int
Returns
Type Description
Environment

getTaskEnvironmentsBuilder(int index)

public Environment.Builder getTaskEnvironmentsBuilder(int index)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameter
Name Description
index int
Returns
Type Description
Environment.Builder

getTaskEnvironmentsBuilderList()

public List<Environment.Builder> getTaskEnvironmentsBuilderList()

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Returns
Type Description
List<Builder>

getTaskEnvironmentsCount()

public int getTaskEnvironmentsCount()

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Returns
Type Description
int

getTaskEnvironmentsList()

public List<Environment> getTaskEnvironmentsList()

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Returns
Type Description
List<Environment>

getTaskEnvironmentsOrBuilder(int index)

public EnvironmentOrBuilder getTaskEnvironmentsOrBuilder(int index)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameter
Name Description
index int
Returns
Type Description
EnvironmentOrBuilder

getTaskEnvironmentsOrBuilderList()

public List<? extends EnvironmentOrBuilder> getTaskEnvironmentsOrBuilderList()

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

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

getTaskSpec()

public TaskSpec getTaskSpec()

Required. Tasks in the group share the same task spec.

.google.events.cloud.batch.v1.TaskSpec task_spec = 3;

Returns
Type Description
TaskSpec

The taskSpec.

getTaskSpecBuilder()

public TaskSpec.Builder getTaskSpecBuilder()

Required. Tasks in the group share the same task spec.

.google.events.cloud.batch.v1.TaskSpec task_spec = 3;

Returns
Type Description
TaskSpec.Builder

getTaskSpecOrBuilder()

public TaskSpecOrBuilder getTaskSpecOrBuilder()

Required. Tasks in the group share the same task spec.

.google.events.cloud.batch.v1.TaskSpec task_spec = 3;

Returns
Type Description
TaskSpecOrBuilder

hasTaskSpec()

public boolean hasTaskSpec()

Required. Tasks in the group share the same task spec.

.google.events.cloud.batch.v1.TaskSpec task_spec = 3;

Returns
Type Description
boolean

Whether the taskSpec field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TaskGroup other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public TaskGroup.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TaskGroup.Builder
Overrides

mergeTaskSpec(TaskSpec value)

public TaskGroup.Builder mergeTaskSpec(TaskSpec value)

Required. Tasks in the group share the same task spec.

.google.events.cloud.batch.v1.TaskSpec task_spec = 3;

Parameter
Name Description
value TaskSpec
Returns
Type Description
TaskGroup.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeTaskEnvironments(int index)

public TaskGroup.Builder removeTaskEnvironments(int index)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameter
Name Description
index int
Returns
Type Description
TaskGroup.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public TaskGroup.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TaskGroup.Builder
Overrides

setName(String value)

public TaskGroup.Builder setName(String value)

Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

setNameBytes(ByteString value)

public TaskGroup.Builder setNameBytes(ByteString value)

Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

setParallelism(long value)

public TaskGroup.Builder setParallelism(long value)

Max number of tasks that can run in parallel. Default to min(task_count, 1000). Field parallelism must be 1 if the scheduling_policy is IN_ORDER.

int64 parallelism = 5;

Parameter
Name Description
value long

The parallelism to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

setPermissiveSsh(boolean value)

public TaskGroup.Builder setPermissiveSsh(boolean value)

When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup.

bool permissive_ssh = 12;

Parameter
Name Description
value boolean

The permissiveSsh to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

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

public TaskGroup.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TaskGroup.Builder
Overrides

setRequireHostsFile(boolean value)

public TaskGroup.Builder setRequireHostsFile(boolean value)

When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false.

bool require_hosts_file = 11;

Parameter
Name Description
value boolean

The requireHostsFile to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

setSchedulingPolicy(TaskGroup.SchedulingPolicy value)

public TaskGroup.Builder setSchedulingPolicy(TaskGroup.SchedulingPolicy value)

Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.

.google.events.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6;

Parameter
Name Description
value TaskGroup.SchedulingPolicy

The schedulingPolicy to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

setSchedulingPolicyValue(int value)

public TaskGroup.Builder setSchedulingPolicyValue(int value)

Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.

.google.events.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6;

Parameter
Name Description
value int

The enum numeric value on the wire for schedulingPolicy to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

setTaskCount(long value)

public TaskGroup.Builder setTaskCount(long value)

Number of Tasks in the TaskGroup. Default is 1.

int64 task_count = 4;

Parameter
Name Description
value long

The taskCount to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

setTaskCountPerNode(long value)

public TaskGroup.Builder setTaskCountPerNode(long value)

Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements.

int64 task_count_per_node = 10;

Parameter
Name Description
value long

The taskCountPerNode to set.

Returns
Type Description
TaskGroup.Builder

This builder for chaining.

setTaskEnvironments(int index, Environment value)

public TaskGroup.Builder setTaskEnvironments(int index, Environment value)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameters
Name Description
index int
value Environment
Returns
Type Description
TaskGroup.Builder

setTaskEnvironments(int index, Environment.Builder builderForValue)

public TaskGroup.Builder setTaskEnvironments(int index, Environment.Builder builderForValue)

An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).

repeated .google.events.cloud.batch.v1.Environment task_environments = 9;

Parameters
Name Description
index int
builderForValue Environment.Builder
Returns
Type Description
TaskGroup.Builder

setTaskSpec(TaskSpec value)

public TaskGroup.Builder setTaskSpec(TaskSpec value)

Required. Tasks in the group share the same task spec.

.google.events.cloud.batch.v1.TaskSpec task_spec = 3;

Parameter
Name Description
value TaskSpec
Returns
Type Description
TaskGroup.Builder

setTaskSpec(TaskSpec.Builder builderForValue)

public TaskGroup.Builder setTaskSpec(TaskSpec.Builder builderForValue)

Required. Tasks in the group share the same task spec.

.google.events.cloud.batch.v1.TaskSpec task_spec = 3;

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

setUnknownFields(UnknownFieldSet unknownFields)

public final TaskGroup.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TaskGroup.Builder
Overrides