public static final class AllocationPolicy.Builder extends 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
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllInstances(Iterable<? extends AllocationPolicy.InstancePolicyOrTemplate> values)
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;
Parameter
Name |
Description |
values |
Iterable<? extends com.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate>
|
Returns
addInstances(AllocationPolicy.InstancePolicyOrTemplate value)
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;
Parameter
Returns
addInstances(AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
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;
Parameter
Returns
addInstances(int index, AllocationPolicy.InstancePolicyOrTemplate value)
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;
Parameters
Returns
addInstances(int index, AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
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;
Parameters
Returns
addInstancesBuilder()
public 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;
Returns
addInstancesBuilder(int index)
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;
Parameter
Name |
Description |
index |
int
|
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AllocationPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public AllocationPolicy build()
Returns
buildPartial()
public AllocationPolicy buildPartial()
Returns
clear()
public AllocationPolicy.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public AllocationPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearInstances()
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;
Returns
clearLabels()
public AllocationPolicy.Builder clearLabels()
Returns
clearLocation()
public AllocationPolicy.Builder clearLocation()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;
Returns
clearNetwork()
public AllocationPolicy.Builder clearNetwork()
The network policy.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public AllocationPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearServiceAccount()
public AllocationPolicy.Builder clearServiceAccount()
Service account that VMs will run as.
.google.cloud.batch.v1.ServiceAccount service_account = 9;
Returns
clone()
public AllocationPolicy.Builder clone()
Returns
Overrides
containsLabels(String key)
public boolean containsLabels(String key)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameter
Returns
getDefaultInstanceForType()
public AllocationPolicy getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getInstances(int index)
public 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;
Parameter
Name |
Description |
index |
int
|
Returns
getInstancesBuilder(int index)
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;
Parameter
Name |
Description |
index |
int
|
Returns
getInstancesBuilderList()
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;
Returns
getInstancesCount()
public 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;
Returns
getInstancesList()
public 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;
Returns
getInstancesOrBuilder(int index)
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;
Parameter
Name |
Description |
index |
int
|
Returns
getInstancesOrBuilderList()
public 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;
Returns
Type |
Description |
List<? extends com.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplateOrBuilder> |
|
getLabels()
public Map<String,String> getLabels()
Returns
getLabelsCount()
public int getLabelsCount()
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Returns
getLabelsMap()
public Map<String,String> getLabelsMap()
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Returns
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameters
Returns
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameter
Returns
getLocation()
public AllocationPolicy.LocationPolicy getLocation()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;
Returns
getLocationBuilder()
public AllocationPolicy.LocationPolicy.Builder getLocationBuilder()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;
Returns
getLocationOrBuilder()
public AllocationPolicy.LocationPolicyOrBuilder getLocationOrBuilder()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;
Returns
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Returns
getNetwork()
public AllocationPolicy.NetworkPolicy getNetwork()
The network policy.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;
Returns
getNetworkBuilder()
public AllocationPolicy.NetworkPolicy.Builder getNetworkBuilder()
The network policy.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;
Returns
getNetworkOrBuilder()
public AllocationPolicy.NetworkPolicyOrBuilder getNetworkOrBuilder()
The network policy.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;
Returns
getServiceAccount()
public ServiceAccount getServiceAccount()
Service account that VMs will run as.
.google.cloud.batch.v1.ServiceAccount service_account = 9;
Returns
getServiceAccountBuilder()
public ServiceAccount.Builder getServiceAccountBuilder()
Service account that VMs will run as.
.google.cloud.batch.v1.ServiceAccount service_account = 9;
Returns
getServiceAccountOrBuilder()
public ServiceAccountOrBuilder getServiceAccountOrBuilder()
Service account that VMs will run as.
.google.cloud.batch.v1.ServiceAccount service_account = 9;
Returns
hasLocation()
public boolean hasLocation()
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;
Returns
Type |
Description |
boolean |
Whether the location field is set.
|
hasNetwork()
public boolean hasNetwork()
The network policy.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;
Returns
Type |
Description |
boolean |
Whether the network field is set.
|
hasServiceAccount()
public boolean hasServiceAccount()
Service account that VMs will run as.
.google.cloud.batch.v1.ServiceAccount service_account = 9;
Returns
Type |
Description |
boolean |
Whether the serviceAccount field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Name |
Description |
number |
int
|
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Name |
Description |
number |
int
|
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(AllocationPolicy other)
public AllocationPolicy.Builder mergeFrom(AllocationPolicy other)
Parameter
Returns
public AllocationPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public AllocationPolicy.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeLocation(AllocationPolicy.LocationPolicy value)
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;
Parameter
Returns
mergeNetwork(AllocationPolicy.NetworkPolicy value)
public AllocationPolicy.Builder mergeNetwork(AllocationPolicy.NetworkPolicy value)
The network policy.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;
Parameter
Returns
mergeServiceAccount(ServiceAccount value)
public AllocationPolicy.Builder mergeServiceAccount(ServiceAccount value)
Service account that VMs will run as.
.google.cloud.batch.v1.ServiceAccount service_account = 9;
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AllocationPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllLabels(Map<String,String> values)
public AllocationPolicy.Builder putAllLabels(Map<String,String> values)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameter
Returns
putLabels(String key, String value)
public AllocationPolicy.Builder putLabels(String key, String value)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameters
Returns
removeInstances(int index)
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;
Parameter
Name |
Description |
index |
int
|
Returns
removeLabels(String key)
public AllocationPolicy.Builder removeLabels(String key)
Labels applied to all VM instances and other resources
created by AllocationPolicy.
Labels could be user provided or system generated.
You can assign up to 64 labels. Google Compute Engine label
restrictions
apply.
Label names that start with "goog-" or "google-" are reserved.
map<string, string> labels = 6;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public AllocationPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setInstances(int index, AllocationPolicy.InstancePolicyOrTemplate value)
public 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;
Parameters
Returns
setInstances(int index, AllocationPolicy.InstancePolicyOrTemplate.Builder builderForValue)
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;
Parameters
Returns
setLocation(AllocationPolicy.LocationPolicy value)
public AllocationPolicy.Builder setLocation(AllocationPolicy.LocationPolicy value)
Location where compute resources should be allocated for the Job.
.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;
Parameter
Returns
setLocation(AllocationPolicy.LocationPolicy.Builder builderForValue)
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;
Parameter
Returns
setNetwork(AllocationPolicy.NetworkPolicy value)
public AllocationPolicy.Builder setNetwork(AllocationPolicy.NetworkPolicy value)
The network policy.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;
Parameter
Returns
setNetwork(AllocationPolicy.NetworkPolicy.Builder builderForValue)
public AllocationPolicy.Builder setNetwork(AllocationPolicy.NetworkPolicy.Builder builderForValue)
The network policy.
.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;
Parameter
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public AllocationPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setServiceAccount(ServiceAccount value)
public AllocationPolicy.Builder setServiceAccount(ServiceAccount value)
Service account that VMs will run as.
.google.cloud.batch.v1.ServiceAccount service_account = 9;
Parameter
Returns
setServiceAccount(ServiceAccount.Builder builderForValue)
public AllocationPolicy.Builder setServiceAccount(ServiceAccount.Builder builderForValue)
Service account that VMs will run as.
.google.cloud.batch.v1.ServiceAccount service_account = 9;
Parameter
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final AllocationPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides