public static final class AllocationPolicy.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder> implements AllocationPolicyOrBuilder
A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.Protobuf type
google.cloud.batch.v1.AllocationPolicy| Modifier and Type | Method and Description |
|---|---|
AllocationPolicy.Builder |
addAllInstances(Iterable<? extends AllocationPolicy.InstancePolicyOrTemplate> values)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
addAllTags(Iterable<String> values)
Optional.
|
AllocationPolicy.Builder |
addInstances(AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
addInstances(AllocationPolicy.InstancePolicyOrTemplate value)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
addInstances(int index,
AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
addInstances(int index,
AllocationPolicy.InstancePolicyOrTemplate value)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.InstancePolicyOrTemplate.Builder |
addInstancesBuilder()
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.InstancePolicyOrTemplate.Builder |
addInstancesBuilder(int index)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
AllocationPolicy.Builder |
addTags(String value)
Optional.
|
AllocationPolicy.Builder |
addTagsBytes(com.google.protobuf.ByteString value)
Optional.
|
AllocationPolicy |
build() |
AllocationPolicy |
buildPartial() |
AllocationPolicy.Builder |
clear() |
AllocationPolicy.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
AllocationPolicy.Builder |
clearInstances()
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
clearLabels() |
AllocationPolicy.Builder |
clearLocation()
Location where compute resources should be allocated for the Job.
|
AllocationPolicy.Builder |
clearNetwork()
The network policy.
|
AllocationPolicy.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
AllocationPolicy.Builder |
clearPlacement()
The placement policy.
|
AllocationPolicy.Builder |
clearServiceAccount()
Defines the service account for Batch-created VMs.
|
AllocationPolicy.Builder |
clearTags()
Optional.
|
AllocationPolicy.Builder |
clone() |
boolean |
containsLabels(String key)
Custom labels to apply to the job and all the Compute Engine resources
that both are created by this allocation policy and support labels.
|
AllocationPolicy |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
AllocationPolicy.InstancePolicyOrTemplate |
getInstances(int index)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.InstancePolicyOrTemplate.Builder |
getInstancesBuilder(int index)
Describe instances that can be created by this AllocationPolicy.
|
List<AllocationPolicy.InstancePolicyOrTemplate.Builder> |
getInstancesBuilderList()
Describe instances that can be created by this AllocationPolicy.
|
int |
getInstancesCount()
Describe instances that can be created by this AllocationPolicy.
|
List<AllocationPolicy.InstancePolicyOrTemplate> |
getInstancesList()
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.InstancePolicyOrTemplateOrBuilder |
getInstancesOrBuilder(int index)
Describe instances that can be created by this AllocationPolicy.
|
List<? extends AllocationPolicy.InstancePolicyOrTemplateOrBuilder> |
getInstancesOrBuilderList()
Describe instances that can be created by this AllocationPolicy.
|
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
Custom labels to apply to the job and all the Compute Engine resources
that both are created by this allocation policy and support labels.
|
Map<String,String> |
getLabelsMap()
Custom labels to apply to the job and all the Compute Engine resources
that both are created by this allocation policy and support labels.
|
String |
getLabelsOrDefault(String key,
String defaultValue)
Custom labels to apply to the job and all the Compute Engine resources
that both are created by this allocation policy and support labels.
|
String |
getLabelsOrThrow(String key)
Custom labels to apply to the job and all the Compute Engine resources
that both are created by this allocation policy and support labels.
|
AllocationPolicy.LocationPolicy |
getLocation()
Location where compute resources should be allocated for the Job.
|
AllocationPolicy.LocationPolicy.Builder |
getLocationBuilder()
Location where compute resources should be allocated for the Job.
|
AllocationPolicy.LocationPolicyOrBuilder |
getLocationOrBuilder()
Location where compute resources should be allocated for the Job.
|
Map<String,String> |
getMutableLabels()
Deprecated.
|
AllocationPolicy.NetworkPolicy |
getNetwork()
The network policy.
|
AllocationPolicy.NetworkPolicy.Builder |
getNetworkBuilder()
The network policy.
|
AllocationPolicy.NetworkPolicyOrBuilder |
getNetworkOrBuilder()
The network policy.
|
AllocationPolicy.PlacementPolicy |
getPlacement()
The placement policy.
|
AllocationPolicy.PlacementPolicy.Builder |
getPlacementBuilder()
The placement policy.
|
AllocationPolicy.PlacementPolicyOrBuilder |
getPlacementOrBuilder()
The placement policy.
|
ServiceAccount |
getServiceAccount()
Defines the service account for Batch-created VMs.
|
ServiceAccount.Builder |
getServiceAccountBuilder()
Defines the service account for Batch-created VMs.
|
ServiceAccountOrBuilder |
getServiceAccountOrBuilder()
Defines the service account for Batch-created VMs.
|
String |
getTags(int index)
Optional.
|
com.google.protobuf.ByteString |
getTagsBytes(int index)
Optional.
|
int |
getTagsCount()
Optional.
|
com.google.protobuf.ProtocolStringList |
getTagsList()
Optional.
|
boolean |
hasLocation()
Location where compute resources should be allocated for the Job.
|
boolean |
hasNetwork()
The network policy.
|
boolean |
hasPlacement()
The placement policy.
|
boolean |
hasServiceAccount()
Defines the service account for Batch-created VMs.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMutableMapFieldReflection(int number) |
boolean |
isInitialized() |
AllocationPolicy.Builder |
mergeFrom(AllocationPolicy other) |
AllocationPolicy.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
AllocationPolicy.Builder |
mergeFrom(com.google.protobuf.Message other) |
AllocationPolicy.Builder |
mergeLocation(AllocationPolicy.LocationPolicy value)
Location where compute resources should be allocated for the Job.
|
AllocationPolicy.Builder |
mergeNetwork(AllocationPolicy.NetworkPolicy value)
The network policy.
|
AllocationPolicy.Builder |
mergePlacement(AllocationPolicy.PlacementPolicy value)
The placement policy.
|
AllocationPolicy.Builder |
mergeServiceAccount(ServiceAccount value)
Defines the service account for Batch-created VMs.
|
AllocationPolicy.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
AllocationPolicy.Builder |
putAllLabels(Map<String,String> values)
Custom labels to apply to the job and all the Compute Engine resources
that both are created by this allocation policy and support labels.
|
AllocationPolicy.Builder |
putLabels(String key,
String value)
Custom labels to apply to the job and all the Compute Engine resources
that both are created by this allocation policy and support labels.
|
AllocationPolicy.Builder |
removeInstances(int index)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
removeLabels(String key)
Custom labels to apply to the job and all the Compute Engine resources
that both are created by this allocation policy and support labels.
|
AllocationPolicy.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
AllocationPolicy.Builder |
setInstances(int index,
AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
setInstances(int index,
AllocationPolicy.InstancePolicyOrTemplate value)
Describe instances that can be created by this AllocationPolicy.
|
AllocationPolicy.Builder |
setLocation(AllocationPolicy.LocationPolicy.Builder builderForValue)
Location where compute resources should be allocated for the Job.
|
AllocationPolicy.Builder |
setLocation(AllocationPolicy.LocationPolicy value)
Location where compute resources should be allocated for the Job.
|
AllocationPolicy.Builder |
setNetwork(AllocationPolicy.NetworkPolicy.Builder builderForValue)
The network policy.
|
AllocationPolicy.Builder |
setNetwork(AllocationPolicy.NetworkPolicy value)
The network policy.
|
AllocationPolicy.Builder |
setPlacement(AllocationPolicy.PlacementPolicy.Builder builderForValue)
The placement policy.
|
AllocationPolicy.Builder |
setPlacement(AllocationPolicy.PlacementPolicy value)
The placement policy.
|
AllocationPolicy.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
AllocationPolicy.Builder |
setServiceAccount(ServiceAccount.Builder builderForValue)
Defines the service account for Batch-created VMs.
|
AllocationPolicy.Builder |
setServiceAccount(ServiceAccount value)
Defines the service account for Batch-created VMs.
|
AllocationPolicy.Builder |
setTags(int index,
String value)
Optional.
|
AllocationPolicy.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic AllocationPolicy build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic AllocationPolicy buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic AllocationPolicy.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder mergeFrom(AllocationPolicy other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public AllocationPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<AllocationPolicy.Builder>IOExceptionpublic boolean hasLocation()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;hasLocation in interface AllocationPolicyOrBuilderpublic AllocationPolicy.LocationPolicy getLocation()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;getLocation in interface AllocationPolicyOrBuilderpublic AllocationPolicy.Builder setLocation(AllocationPolicy.LocationPolicy value)
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;public AllocationPolicy.Builder setLocation(AllocationPolicy.LocationPolicy.Builder builderForValue)
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;public AllocationPolicy.Builder mergeLocation(AllocationPolicy.LocationPolicy value)
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;public AllocationPolicy.Builder clearLocation()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;public AllocationPolicy.LocationPolicy.Builder getLocationBuilder()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;public AllocationPolicy.LocationPolicyOrBuilder getLocationOrBuilder()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;getLocationOrBuilder in interface AllocationPolicyOrBuilderpublic List<AllocationPolicy.InstancePolicyOrTemplate> getInstancesList()
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
getInstancesList in interface AllocationPolicyOrBuilderpublic int getInstancesCount()
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
getInstancesCount in interface AllocationPolicyOrBuilderpublic AllocationPolicy.InstancePolicyOrTemplate getInstances(int index)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
getInstances in interface AllocationPolicyOrBuilderpublic AllocationPolicy.Builder setInstances(int index, AllocationPolicy.InstancePolicyOrTemplate value)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.Builder setInstances(int index, AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.Builder addInstances(AllocationPolicy.InstancePolicyOrTemplate value)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.Builder addInstances(int index, AllocationPolicy.InstancePolicyOrTemplate value)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.Builder addInstances(AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.Builder addInstances(int index, AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.Builder addAllInstances(Iterable<? extends AllocationPolicy.InstancePolicyOrTemplate> values)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.Builder clearInstances()
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.Builder removeInstances(int index)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.InstancePolicyOrTemplate.Builder getInstancesBuilder(int index)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.InstancePolicyOrTemplateOrBuilder getInstancesOrBuilder(int index)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
getInstancesOrBuilder in interface AllocationPolicyOrBuilderpublic List<? extends AllocationPolicy.InstancePolicyOrTemplateOrBuilder> getInstancesOrBuilderList()
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
getInstancesOrBuilderList in interface AllocationPolicyOrBuilderpublic AllocationPolicy.InstancePolicyOrTemplate.Builder addInstancesBuilder()
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public AllocationPolicy.InstancePolicyOrTemplate.Builder addInstancesBuilder(int index)
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public List<AllocationPolicy.InstancePolicyOrTemplate.Builder> getInstancesBuilderList()
Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.
repeated .google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate instances = 8;
public boolean hasServiceAccount()
Defines the service account for Batch-created VMs. If omitted, the [default Compute Engine service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. Must match the service account specified in any used instance template configured in the Batch job. Includes the following fields: * email: The service account's email address. If not set, the default Compute Engine service account is used. * scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
.google.cloud.batch.v1.ServiceAccount service_account = 9;hasServiceAccount in interface AllocationPolicyOrBuilderpublic ServiceAccount getServiceAccount()
Defines the service account for Batch-created VMs. If omitted, the [default Compute Engine service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. Must match the service account specified in any used instance template configured in the Batch job. Includes the following fields: * email: The service account's email address. If not set, the default Compute Engine service account is used. * scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
.google.cloud.batch.v1.ServiceAccount service_account = 9;getServiceAccount in interface AllocationPolicyOrBuilderpublic AllocationPolicy.Builder setServiceAccount(ServiceAccount value)
Defines the service account for Batch-created VMs. If omitted, the [default Compute Engine service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. Must match the service account specified in any used instance template configured in the Batch job. Includes the following fields: * email: The service account's email address. If not set, the default Compute Engine service account is used. * scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
.google.cloud.batch.v1.ServiceAccount service_account = 9;public AllocationPolicy.Builder setServiceAccount(ServiceAccount.Builder builderForValue)
Defines the service account for Batch-created VMs. If omitted, the [default Compute Engine service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. Must match the service account specified in any used instance template configured in the Batch job. Includes the following fields: * email: The service account's email address. If not set, the default Compute Engine service account is used. * scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
.google.cloud.batch.v1.ServiceAccount service_account = 9;public AllocationPolicy.Builder mergeServiceAccount(ServiceAccount value)
Defines the service account for Batch-created VMs. If omitted, the [default Compute Engine service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. Must match the service account specified in any used instance template configured in the Batch job. Includes the following fields: * email: The service account's email address. If not set, the default Compute Engine service account is used. * scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
.google.cloud.batch.v1.ServiceAccount service_account = 9;public AllocationPolicy.Builder clearServiceAccount()
Defines the service account for Batch-created VMs. If omitted, the [default Compute Engine service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. Must match the service account specified in any used instance template configured in the Batch job. Includes the following fields: * email: The service account's email address. If not set, the default Compute Engine service account is used. * scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
.google.cloud.batch.v1.ServiceAccount service_account = 9;public ServiceAccount.Builder getServiceAccountBuilder()
Defines the service account for Batch-created VMs. If omitted, the [default Compute Engine service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. Must match the service account specified in any used instance template configured in the Batch job. Includes the following fields: * email: The service account's email address. If not set, the default Compute Engine service account is used. * scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
.google.cloud.batch.v1.ServiceAccount service_account = 9;public ServiceAccountOrBuilder getServiceAccountOrBuilder()
Defines the service account for Batch-created VMs. If omitted, the [default Compute Engine service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. Must match the service account specified in any used instance template configured in the Batch job. Includes the following fields: * email: The service account's email address. If not set, the default Compute Engine service account is used. * scopes: Additional OAuth scopes to grant the service account, beyond the default cloud-platform scope. (list of strings)
.google.cloud.batch.v1.ServiceAccount service_account = 9;getServiceAccountOrBuilder in interface AllocationPolicyOrBuilderpublic int getLabelsCount()
AllocationPolicyOrBuilderCustom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple `labels` fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
map<string, string> labels = 6;getLabelsCount in interface AllocationPolicyOrBuilderpublic boolean containsLabels(String key)
Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple `labels` fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
map<string, string> labels = 6;containsLabels in interface AllocationPolicyOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface AllocationPolicyOrBuilderpublic Map<String,String> getLabelsMap()
Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple `labels` fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
map<string, string> labels = 6;getLabelsMap in interface AllocationPolicyOrBuilderpublic String getLabelsOrDefault(String key, String defaultValue)
Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple `labels` fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
map<string, string> labels = 6;getLabelsOrDefault in interface AllocationPolicyOrBuilderpublic String getLabelsOrThrow(String key)
Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple `labels` fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
map<string, string> labels = 6;getLabelsOrThrow in interface AllocationPolicyOrBuilderpublic AllocationPolicy.Builder clearLabels()
public AllocationPolicy.Builder removeLabels(String key)
Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple `labels` fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
map<string, string> labels = 6;@Deprecated public Map<String,String> getMutableLabels()
public AllocationPolicy.Builder putLabels(String key, String value)
Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple `labels` fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
map<string, string> labels = 6;public AllocationPolicy.Builder putAllLabels(Map<String,String> values)
Custom labels to apply to the job and all the Compute Engine resources that both are created by this allocation policy and support labels. Use labels to group and describe the resources they are applied to. Batch automatically applies predefined labels and supports multiple `labels` fields for each job, which each let you apply custom labels to various resources. Label names that start with "goog-" or "google-" are reserved for predefined labels. For more information about labels with Batch, see [Organize resources using labels](https://cloud.google.com/batch/docs/organize-resources-using-labels).
map<string, string> labels = 6;public boolean hasNetwork()
The network policy. If you define an instance template in the `InstancePolicyOrTemplate` field, Batch will use the network settings in the instance template instead of this field.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;hasNetwork in interface AllocationPolicyOrBuilderpublic AllocationPolicy.NetworkPolicy getNetwork()
The network policy. If you define an instance template in the `InstancePolicyOrTemplate` field, Batch will use the network settings in the instance template instead of this field.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;getNetwork in interface AllocationPolicyOrBuilderpublic AllocationPolicy.Builder setNetwork(AllocationPolicy.NetworkPolicy value)
The network policy. If you define an instance template in the `InstancePolicyOrTemplate` field, Batch will use the network settings in the instance template instead of this field.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;public AllocationPolicy.Builder setNetwork(AllocationPolicy.NetworkPolicy.Builder builderForValue)
The network policy. If you define an instance template in the `InstancePolicyOrTemplate` field, Batch will use the network settings in the instance template instead of this field.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;public AllocationPolicy.Builder mergeNetwork(AllocationPolicy.NetworkPolicy value)
The network policy. If you define an instance template in the `InstancePolicyOrTemplate` field, Batch will use the network settings in the instance template instead of this field.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;public AllocationPolicy.Builder clearNetwork()
The network policy. If you define an instance template in the `InstancePolicyOrTemplate` field, Batch will use the network settings in the instance template instead of this field.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;public AllocationPolicy.NetworkPolicy.Builder getNetworkBuilder()
The network policy. If you define an instance template in the `InstancePolicyOrTemplate` field, Batch will use the network settings in the instance template instead of this field.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;public AllocationPolicy.NetworkPolicyOrBuilder getNetworkOrBuilder()
The network policy. If you define an instance template in the `InstancePolicyOrTemplate` field, Batch will use the network settings in the instance template instead of this field.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;getNetworkOrBuilder in interface AllocationPolicyOrBuilderpublic boolean hasPlacement()
The placement policy.
.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10;hasPlacement in interface AllocationPolicyOrBuilderpublic AllocationPolicy.PlacementPolicy getPlacement()
The placement policy.
.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10;getPlacement in interface AllocationPolicyOrBuilderpublic AllocationPolicy.Builder setPlacement(AllocationPolicy.PlacementPolicy value)
The placement policy.
.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10;public AllocationPolicy.Builder setPlacement(AllocationPolicy.PlacementPolicy.Builder builderForValue)
The placement policy.
.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10;public AllocationPolicy.Builder mergePlacement(AllocationPolicy.PlacementPolicy value)
The placement policy.
.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10;public AllocationPolicy.Builder clearPlacement()
The placement policy.
.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10;public AllocationPolicy.PlacementPolicy.Builder getPlacementBuilder()
The placement policy.
.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10;public AllocationPolicy.PlacementPolicyOrBuilder getPlacementOrBuilder()
The placement policy.
.google.cloud.batch.v1.AllocationPolicy.PlacementPolicy placement = 10;getPlacementOrBuilder in interface AllocationPolicyOrBuilderpublic com.google.protobuf.ProtocolStringList getTagsList()
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];getTagsList in interface AllocationPolicyOrBuilderpublic int getTagsCount()
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];getTagsCount in interface AllocationPolicyOrBuilderpublic String getTags(int index)
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];getTags in interface AllocationPolicyOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getTagsBytes(int index)
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];getTagsBytes in interface AllocationPolicyOrBuilderindex - The index of the value to return.public AllocationPolicy.Builder setTags(int index, String value)
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];index - The index to set the value at.value - The tags to set.public AllocationPolicy.Builder addTags(String value)
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];value - The tags to add.public AllocationPolicy.Builder addAllTags(Iterable<String> values)
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];values - The tags to add.public AllocationPolicy.Builder clearTags()
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];public AllocationPolicy.Builder addTagsBytes(com.google.protobuf.ByteString value)
Optional. Tags applied to the VM instances. The tags identify valid sources or targets for network firewalls. Each tag must be 1-63 characters long, and comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL];value - The bytes of the tags to add.public final AllocationPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>public final AllocationPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AllocationPolicy.Builder>Copyright © 2025 Google LLC. All rights reserved.