Class TaskGroup.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TaskGroup.Builder>
com.google.cloud.batch.v1alpha.TaskGroup.Builder
All Implemented Interfaces:
TaskGroupOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TaskGroup

public static final class TaskGroup.Builder extends com.google.protobuf.GeneratedMessage.Builder<TaskGroup.Builder> implements TaskGroupOrBuilder
 A TaskGroup defines one or more Tasks that all share the same TaskSpec.
 
Protobuf type google.cloud.batch.v1alpha.TaskGroup
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<TaskGroup.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<TaskGroup.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TaskGroup.Builder>
    • clear

      public TaskGroup.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<TaskGroup.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<TaskGroup.Builder>
    • getDefaultInstanceForType

      public TaskGroup getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public TaskGroup build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public TaskGroup buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public TaskGroup.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TaskGroup.Builder>
    • mergeFrom

      public TaskGroup.Builder mergeFrom(TaskGroup other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<TaskGroup.Builder>
    • mergeFrom

      public TaskGroup.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TaskGroup.Builder>
      Throws:
      IOException
    • 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 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface TaskGroupOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.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 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface TaskGroupOrBuilder
      Returns:
      The bytes for name.
    • setName

      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 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setNameBytes

      public TaskGroup.Builder setNameBytes(com.google.protobuf.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 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasTaskSpec

      public boolean hasTaskSpec()
       Required. Tasks in the group share the same task spec.
       
      .google.cloud.batch.v1alpha.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasTaskSpec in interface TaskGroupOrBuilder
      Returns:
      Whether the taskSpec field is set.
    • getTaskSpec

      public TaskSpec getTaskSpec()
       Required. Tasks in the group share the same task spec.
       
      .google.cloud.batch.v1alpha.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTaskSpec in interface TaskGroupOrBuilder
      Returns:
      The taskSpec.
    • setTaskSpec

      public TaskGroup.Builder setTaskSpec(TaskSpec value)
       Required. Tasks in the group share the same task spec.
       
      .google.cloud.batch.v1alpha.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • setTaskSpec

      public TaskGroup.Builder setTaskSpec(TaskSpec.Builder builderForValue)
       Required. Tasks in the group share the same task spec.
       
      .google.cloud.batch.v1alpha.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • mergeTaskSpec

      public TaskGroup.Builder mergeTaskSpec(TaskSpec value)
       Required. Tasks in the group share the same task spec.
       
      .google.cloud.batch.v1alpha.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • clearTaskSpec

      public TaskGroup.Builder clearTaskSpec()
       Required. Tasks in the group share the same task spec.
       
      .google.cloud.batch.v1alpha.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • getTaskSpecBuilder

      public TaskSpec.Builder getTaskSpecBuilder()
       Required. Tasks in the group share the same task spec.
       
      .google.cloud.batch.v1alpha.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
    • getTaskSpecOrBuilder

      public TaskSpecOrBuilder getTaskSpecOrBuilder()
       Required. Tasks in the group share the same task spec.
       
      .google.cloud.batch.v1alpha.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTaskSpecOrBuilder in interface TaskGroupOrBuilder
    • getTaskCount

      public long getTaskCount()
       Number of Tasks in the TaskGroup.
       Default is 1.
       
      int64 task_count = 4;
      Specified by:
      getTaskCount in interface TaskGroupOrBuilder
      Returns:
      The taskCount.
    • setTaskCount

      public TaskGroup.Builder setTaskCount(long value)
       Number of Tasks in the TaskGroup.
       Default is 1.
       
      int64 task_count = 4;
      Parameters:
      value - The taskCount to set.
      Returns:
      This builder for chaining.
    • clearTaskCount

      public TaskGroup.Builder clearTaskCount()
       Number of Tasks in the TaskGroup.
       Default is 1.
       
      int64 task_count = 4;
      Returns:
      This builder for chaining.
    • getParallelism

      public long getParallelism()
       Max number of tasks that can run in parallel.
       Default to min(task_count, parallel tasks per job limit).
       See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits).
       Field parallelism must be 1 if the scheduling_policy is IN_ORDER.
       
      int64 parallelism = 5;
      Specified by:
      getParallelism in interface TaskGroupOrBuilder
      Returns:
      The parallelism.
    • setParallelism

      public TaskGroup.Builder setParallelism(long value)
       Max number of tasks that can run in parallel.
       Default to min(task_count, parallel tasks per job limit).
       See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits).
       Field parallelism must be 1 if the scheduling_policy is IN_ORDER.
       
      int64 parallelism = 5;
      Parameters:
      value - The parallelism to set.
      Returns:
      This builder for chaining.
    • clearParallelism

      public TaskGroup.Builder clearParallelism()
       Max number of tasks that can run in parallel.
       Default to min(task_count, parallel tasks per job limit).
       See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits).
       Field parallelism must be 1 if the scheduling_policy is IN_ORDER.
       
      int64 parallelism = 5;
      Returns:
      This builder for chaining.
    • getSchedulingPolicyValue

      public int getSchedulingPolicyValue()
       Scheduling policy for Tasks in the TaskGroup.
       The default value is AS_SOON_AS_POSSIBLE.
       
      .google.cloud.batch.v1alpha.TaskGroup.SchedulingPolicy scheduling_policy = 6;
      Specified by:
      getSchedulingPolicyValue in interface TaskGroupOrBuilder
      Returns:
      The enum numeric value on the wire for schedulingPolicy.
    • setSchedulingPolicyValue

      public TaskGroup.Builder setSchedulingPolicyValue(int value)
       Scheduling policy for Tasks in the TaskGroup.
       The default value is AS_SOON_AS_POSSIBLE.
       
      .google.cloud.batch.v1alpha.TaskGroup.SchedulingPolicy scheduling_policy = 6;
      Parameters:
      value - The enum numeric value on the wire for schedulingPolicy to set.
      Returns:
      This builder for chaining.
    • getSchedulingPolicy

      public TaskGroup.SchedulingPolicy getSchedulingPolicy()
       Scheduling policy for Tasks in the TaskGroup.
       The default value is AS_SOON_AS_POSSIBLE.
       
      .google.cloud.batch.v1alpha.TaskGroup.SchedulingPolicy scheduling_policy = 6;
      Specified by:
      getSchedulingPolicy in interface TaskGroupOrBuilder
      Returns:
      The schedulingPolicy.
    • setSchedulingPolicy

      public TaskGroup.Builder setSchedulingPolicy(TaskGroup.SchedulingPolicy value)
       Scheduling policy for Tasks in the TaskGroup.
       The default value is AS_SOON_AS_POSSIBLE.
       
      .google.cloud.batch.v1alpha.TaskGroup.SchedulingPolicy scheduling_policy = 6;
      Parameters:
      value - The schedulingPolicy to set.
      Returns:
      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.cloud.batch.v1alpha.TaskGroup.SchedulingPolicy scheduling_policy = 6;
      Returns:
      This builder for chaining.
    • hasAllocationPolicy

      public boolean hasAllocationPolicy()
       Compute resource allocation for the TaskGroup.
       If specified, it overrides resources in Job.
       
      .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
      Specified by:
      hasAllocationPolicy in interface TaskGroupOrBuilder
      Returns:
      Whether the allocationPolicy field is set.
    • getAllocationPolicy

      public AllocationPolicy getAllocationPolicy()
       Compute resource allocation for the TaskGroup.
       If specified, it overrides resources in Job.
       
      .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
      Specified by:
      getAllocationPolicy in interface TaskGroupOrBuilder
      Returns:
      The allocationPolicy.
    • setAllocationPolicy

      public TaskGroup.Builder setAllocationPolicy(AllocationPolicy value)
       Compute resource allocation for the TaskGroup.
       If specified, it overrides resources in Job.
       
      .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
    • setAllocationPolicy

      public TaskGroup.Builder setAllocationPolicy(AllocationPolicy.Builder builderForValue)
       Compute resource allocation for the TaskGroup.
       If specified, it overrides resources in Job.
       
      .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
    • mergeAllocationPolicy

      public TaskGroup.Builder mergeAllocationPolicy(AllocationPolicy value)
       Compute resource allocation for the TaskGroup.
       If specified, it overrides resources in Job.
       
      .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
    • clearAllocationPolicy

      public TaskGroup.Builder clearAllocationPolicy()
       Compute resource allocation for the TaskGroup.
       If specified, it overrides resources in Job.
       
      .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
    • getAllocationPolicyBuilder

      public AllocationPolicy.Builder getAllocationPolicyBuilder()
       Compute resource allocation for the TaskGroup.
       If specified, it overrides resources in Job.
       
      .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
    • getAllocationPolicyOrBuilder

      public AllocationPolicyOrBuilder getAllocationPolicyOrBuilder()
       Compute resource allocation for the TaskGroup.
       If specified, it overrides resources in Job.
       
      .google.cloud.batch.v1alpha.AllocationPolicy allocation_policy = 7;
      Specified by:
      getAllocationPolicyOrBuilder in interface TaskGroupOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: TaskGroupOrBuilder
       Labels for the TaskGroup.
       Labels could be user provided or system generated.
       You can assign up to 64 labels.  [Google Compute Engine label
       restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
       apply.
       Label names that start with "goog-" or "google-" are reserved.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsCount in interface TaskGroupOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels for the TaskGroup.
       Labels could be user provided or system generated.
       You can assign up to 64 labels.  [Google Compute Engine label
       restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
       apply.
       Label names that start with "goog-" or "google-" are reserved.
       
      map<string, string> labels = 8;
      Specified by:
      containsLabels in interface TaskGroupOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface TaskGroupOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels for the TaskGroup.
       Labels could be user provided or system generated.
       You can assign up to 64 labels.  [Google Compute Engine label
       restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
       apply.
       Label names that start with "goog-" or "google-" are reserved.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsMap in interface TaskGroupOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels for the TaskGroup.
       Labels could be user provided or system generated.
       You can assign up to 64 labels.  [Google Compute Engine label
       restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
       apply.
       Label names that start with "goog-" or "google-" are reserved.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsOrDefault in interface TaskGroupOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels for the TaskGroup.
       Labels could be user provided or system generated.
       You can assign up to 64 labels.  [Google Compute Engine label
       restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
       apply.
       Label names that start with "goog-" or "google-" are reserved.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsOrThrow in interface TaskGroupOrBuilder
    • clearLabels

      public TaskGroup.Builder clearLabels()
    • removeLabels

      public TaskGroup.Builder removeLabels(String key)
       Labels for the TaskGroup.
       Labels could be user provided or system generated.
       You can assign up to 64 labels.  [Google Compute Engine label
       restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
       apply.
       Label names that start with "goog-" or "google-" are reserved.
       
      map<string, string> labels = 8;
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public TaskGroup.Builder putLabels(String key, String value)
       Labels for the TaskGroup.
       Labels could be user provided or system generated.
       You can assign up to 64 labels.  [Google Compute Engine label
       restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
       apply.
       Label names that start with "goog-" or "google-" are reserved.
       
      map<string, string> labels = 8;
    • putAllLabels

      public TaskGroup.Builder putAllLabels(Map<String,String> values)
       Labels for the TaskGroup.
       Labels could be user provided or system generated.
       You can assign up to 64 labels.  [Google Compute Engine label
       restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
       apply.
       Label names that start with "goog-" or "google-" are reserved.
       
      map<string, string> labels = 8;
    • 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.cloud.batch.v1alpha.Environment task_environments = 9;
      Specified by:
      getTaskEnvironmentsList in interface TaskGroupOrBuilder
    • 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.cloud.batch.v1alpha.Environment task_environments = 9;
      Specified by:
      getTaskEnvironmentsCount in interface TaskGroupOrBuilder
    • getTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
      Specified by:
      getTaskEnvironments in interface TaskGroupOrBuilder
    • setTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • setTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • addTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • addTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • addTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • addTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • addAllTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • 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.cloud.batch.v1alpha.Environment task_environments = 9;
    • removeTaskEnvironments

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • getTaskEnvironmentsBuilder

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • getTaskEnvironmentsOrBuilder

      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.cloud.batch.v1alpha.Environment task_environments = 9;
      Specified by:
      getTaskEnvironmentsOrBuilder in interface TaskGroupOrBuilder
    • 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.cloud.batch.v1alpha.Environment task_environments = 9;
      Specified by:
      getTaskEnvironmentsOrBuilderList in interface TaskGroupOrBuilder
    • 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.cloud.batch.v1alpha.Environment task_environments = 9;
    • addTaskEnvironmentsBuilder

      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.cloud.batch.v1alpha.Environment task_environments = 9;
    • 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.cloud.batch.v1alpha.Environment task_environments = 9;
    • 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;
      Specified by:
      getTaskCountPerNode in interface TaskGroupOrBuilder
      Returns:
      The taskCountPerNode.
    • setTaskCountPerNode

      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;
      Parameters:
      value - The taskCountPerNode to set.
      Returns:
      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:
      This builder for chaining.
    • 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. The host file supports up to 1000 VMs.
       
      bool require_hosts_file = 11;
      Specified by:
      getRequireHostsFile in interface TaskGroupOrBuilder
      Returns:
      The requireHostsFile.
    • setRequireHostsFile

      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. The host file supports up to 1000 VMs.
       
      bool require_hosts_file = 11;
      Parameters:
      value - The requireHostsFile to set.
      Returns:
      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. The host file supports up to 1000 VMs.
       
      bool require_hosts_file = 11;
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      getPermissiveSsh in interface TaskGroupOrBuilder
      Returns:
      The permissiveSsh.
    • setPermissiveSsh

      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;
      Parameters:
      value - The permissiveSsh to set.
      Returns:
      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:
      This builder for chaining.
    • getRunAsNonRoot

      public boolean getRunAsNonRoot()
       Optional. If not set or set to false, Batch uses the root user to execute
       runnables. If set to true, Batch runs the runnables using a non-root user.
       Currently, the non-root user Batch used is generated by OS Login. For more
       information, see [About OS
       Login](https://cloud.google.com/compute/docs/oslogin).
       
      bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRunAsNonRoot in interface TaskGroupOrBuilder
      Returns:
      The runAsNonRoot.
    • setRunAsNonRoot

      public TaskGroup.Builder setRunAsNonRoot(boolean value)
       Optional. If not set or set to false, Batch uses the root user to execute
       runnables. If set to true, Batch runs the runnables using a non-root user.
       Currently, the non-root user Batch used is generated by OS Login. For more
       information, see [About OS
       Login](https://cloud.google.com/compute/docs/oslogin).
       
      bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The runAsNonRoot to set.
      Returns:
      This builder for chaining.
    • clearRunAsNonRoot

      public TaskGroup.Builder clearRunAsNonRoot()
       Optional. If not set or set to false, Batch uses the root user to execute
       runnables. If set to true, Batch runs the runnables using a non-root user.
       Currently, the non-root user Batch used is generated by OS Login. For more
       information, see [About OS
       Login](https://cloud.google.com/compute/docs/oslogin).
       
      bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • hasServiceAccount

      public boolean hasServiceAccount()
       Optional. ServiceAccount used by tasks within the task group for the access
       to other Cloud resources. This allows tasks to operate with permissions
       distinct from the service account for the VM set at `AllocationPolicy`. Use
       this field when tasks require different access rights than those of the VM.
      
       Specify the service account's `email` field. Ensure `scopes`
       include any necessary permissions for tasks, in addition to the default
       'cloud-platform' scope.
       
      .google.cloud.batch.v1alpha.ServiceAccount service_account = 15 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasServiceAccount in interface TaskGroupOrBuilder
      Returns:
      Whether the serviceAccount field is set.
    • getServiceAccount

      public ServiceAccount getServiceAccount()
       Optional. ServiceAccount used by tasks within the task group for the access
       to other Cloud resources. This allows tasks to operate with permissions
       distinct from the service account for the VM set at `AllocationPolicy`. Use
       this field when tasks require different access rights than those of the VM.
      
       Specify the service account's `email` field. Ensure `scopes`
       include any necessary permissions for tasks, in addition to the default
       'cloud-platform' scope.
       
      .google.cloud.batch.v1alpha.ServiceAccount service_account = 15 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getServiceAccount in interface TaskGroupOrBuilder
      Returns:
      The serviceAccount.
    • setServiceAccount

      public TaskGroup.Builder setServiceAccount(ServiceAccount value)
       Optional. ServiceAccount used by tasks within the task group for the access
       to other Cloud resources. This allows tasks to operate with permissions
       distinct from the service account for the VM set at `AllocationPolicy`. Use
       this field when tasks require different access rights than those of the VM.
      
       Specify the service account's `email` field. Ensure `scopes`
       include any necessary permissions for tasks, in addition to the default
       'cloud-platform' scope.
       
      .google.cloud.batch.v1alpha.ServiceAccount service_account = 15 [(.google.api.field_behavior) = OPTIONAL];
    • setServiceAccount

      public TaskGroup.Builder setServiceAccount(ServiceAccount.Builder builderForValue)
       Optional. ServiceAccount used by tasks within the task group for the access
       to other Cloud resources. This allows tasks to operate with permissions
       distinct from the service account for the VM set at `AllocationPolicy`. Use
       this field when tasks require different access rights than those of the VM.
      
       Specify the service account's `email` field. Ensure `scopes`
       include any necessary permissions for tasks, in addition to the default
       'cloud-platform' scope.
       
      .google.cloud.batch.v1alpha.ServiceAccount service_account = 15 [(.google.api.field_behavior) = OPTIONAL];
    • mergeServiceAccount

      public TaskGroup.Builder mergeServiceAccount(ServiceAccount value)
       Optional. ServiceAccount used by tasks within the task group for the access
       to other Cloud resources. This allows tasks to operate with permissions
       distinct from the service account for the VM set at `AllocationPolicy`. Use
       this field when tasks require different access rights than those of the VM.
      
       Specify the service account's `email` field. Ensure `scopes`
       include any necessary permissions for tasks, in addition to the default
       'cloud-platform' scope.
       
      .google.cloud.batch.v1alpha.ServiceAccount service_account = 15 [(.google.api.field_behavior) = OPTIONAL];
    • clearServiceAccount

      public TaskGroup.Builder clearServiceAccount()
       Optional. ServiceAccount used by tasks within the task group for the access
       to other Cloud resources. This allows tasks to operate with permissions
       distinct from the service account for the VM set at `AllocationPolicy`. Use
       this field when tasks require different access rights than those of the VM.
      
       Specify the service account's `email` field. Ensure `scopes`
       include any necessary permissions for tasks, in addition to the default
       'cloud-platform' scope.
       
      .google.cloud.batch.v1alpha.ServiceAccount service_account = 15 [(.google.api.field_behavior) = OPTIONAL];
    • getServiceAccountBuilder

      public ServiceAccount.Builder getServiceAccountBuilder()
       Optional. ServiceAccount used by tasks within the task group for the access
       to other Cloud resources. This allows tasks to operate with permissions
       distinct from the service account for the VM set at `AllocationPolicy`. Use
       this field when tasks require different access rights than those of the VM.
      
       Specify the service account's `email` field. Ensure `scopes`
       include any necessary permissions for tasks, in addition to the default
       'cloud-platform' scope.
       
      .google.cloud.batch.v1alpha.ServiceAccount service_account = 15 [(.google.api.field_behavior) = OPTIONAL];
    • getServiceAccountOrBuilder

      public ServiceAccountOrBuilder getServiceAccountOrBuilder()
       Optional. ServiceAccount used by tasks within the task group for the access
       to other Cloud resources. This allows tasks to operate with permissions
       distinct from the service account for the VM set at `AllocationPolicy`. Use
       this field when tasks require different access rights than those of the VM.
      
       Specify the service account's `email` field. Ensure `scopes`
       include any necessary permissions for tasks, in addition to the default
       'cloud-platform' scope.
       
      .google.cloud.batch.v1alpha.ServiceAccount service_account = 15 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getServiceAccountOrBuilder in interface TaskGroupOrBuilder