Class AllocationPolicy.Builder (0.1.0)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

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
NameDescription
valuesIterable<? extends com.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate>
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
valueAllocationPolicy.InstancePolicyOrTemplate
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
builderForValueAllocationPolicy.InstancePolicyOrTemplate.Builder
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
indexint
valueAllocationPolicy.InstancePolicyOrTemplate
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
indexint
builderForValueAllocationPolicy.InstancePolicyOrTemplate.Builder
Returns
TypeDescription
AllocationPolicy.Builder

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
TypeDescription
AllocationPolicy.InstancePolicyOrTemplate.Builder

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
NameDescription
indexint
Returns
TypeDescription
AllocationPolicy.InstancePolicyOrTemplate.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AllocationPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AllocationPolicy.Builder
Overrides

build()

public AllocationPolicy build()
Returns
TypeDescription
AllocationPolicy

buildPartial()

public AllocationPolicy buildPartial()
Returns
TypeDescription
AllocationPolicy

clear()

public AllocationPolicy.Builder clear()
Returns
TypeDescription
AllocationPolicy.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public AllocationPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AllocationPolicy.Builder
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
TypeDescription
AllocationPolicy.Builder

clearLabels()

public AllocationPolicy.Builder clearLabels()
Returns
TypeDescription
AllocationPolicy.Builder

clearLocation()

public AllocationPolicy.Builder clearLocation()

Location where compute resources should be allocated for the Job.

.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;

Returns
TypeDescription
AllocationPolicy.Builder

clearNetwork()

public AllocationPolicy.Builder clearNetwork()

The network policy.

.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;

Returns
TypeDescription
AllocationPolicy.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AllocationPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AllocationPolicy.Builder
Overrides

clone()

public AllocationPolicy.Builder clone()
Returns
TypeDescription
AllocationPolicy.Builder
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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public AllocationPolicy getDefaultInstanceForType()
Returns
TypeDescription
AllocationPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
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
NameDescription
indexint
Returns
TypeDescription
AllocationPolicy.InstancePolicyOrTemplate

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
NameDescription
indexint
Returns
TypeDescription
AllocationPolicy.InstancePolicyOrTemplate.Builder

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
TypeDescription
List<Builder>

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
TypeDescription
int

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
TypeDescription
List<InstancePolicyOrTemplate>

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
NameDescription
indexint
Returns
TypeDescription
AllocationPolicy.InstancePolicyOrTemplateOrBuilder

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
TypeDescription
List<? extends com.google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplateOrBuilder>

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

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
TypeDescription
int

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
TypeDescription
Map<String,String>

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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

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
NameDescription
keyString
Returns
TypeDescription
String

getLocation()

public AllocationPolicy.LocationPolicy getLocation()

Location where compute resources should be allocated for the Job.

.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;

Returns
TypeDescription
AllocationPolicy.LocationPolicy

The location.

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
TypeDescription
AllocationPolicy.LocationPolicy.Builder

getLocationOrBuilder()

public AllocationPolicy.LocationPolicyOrBuilder getLocationOrBuilder()

Location where compute resources should be allocated for the Job.

.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;

Returns
TypeDescription
AllocationPolicy.LocationPolicyOrBuilder

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getNetwork()

public AllocationPolicy.NetworkPolicy getNetwork()

The network policy.

.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;

Returns
TypeDescription
AllocationPolicy.NetworkPolicy

The network.

getNetworkBuilder()

public AllocationPolicy.NetworkPolicy.Builder getNetworkBuilder()

The network policy.

.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;

Returns
TypeDescription
AllocationPolicy.NetworkPolicy.Builder

getNetworkOrBuilder()

public AllocationPolicy.NetworkPolicyOrBuilder getNetworkOrBuilder()

The network policy.

.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;

Returns
TypeDescription
AllocationPolicy.NetworkPolicyOrBuilder

hasLocation()

public boolean hasLocation()

Location where compute resources should be allocated for the Job.

.google.cloud.batch.v1.AllocationPolicy.LocationPolicy location = 1;

Returns
TypeDescription
boolean

Whether the location field is set.

hasNetwork()

public boolean hasNetwork()

The network policy.

.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;

Returns
TypeDescription
boolean

Whether the network field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AllocationPolicy other)

public AllocationPolicy.Builder mergeFrom(AllocationPolicy other)
Parameter
NameDescription
otherAllocationPolicy
Returns
TypeDescription
AllocationPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AllocationPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AllocationPolicy.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AllocationPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AllocationPolicy.Builder
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
NameDescription
valueAllocationPolicy.LocationPolicy
Returns
TypeDescription
AllocationPolicy.Builder

mergeNetwork(AllocationPolicy.NetworkPolicy value)

public AllocationPolicy.Builder mergeNetwork(AllocationPolicy.NetworkPolicy value)

The network policy.

.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;

Parameter
NameDescription
valueAllocationPolicy.NetworkPolicy
Returns
TypeDescription
AllocationPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AllocationPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AllocationPolicy.Builder
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
keyString
valueString
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
indexint
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
keyString
Returns
TypeDescription
AllocationPolicy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AllocationPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AllocationPolicy.Builder
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
NameDescription
indexint
valueAllocationPolicy.InstancePolicyOrTemplate
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
indexint
builderForValueAllocationPolicy.InstancePolicyOrTemplate.Builder
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
valueAllocationPolicy.LocationPolicy
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
builderForValueAllocationPolicy.LocationPolicy.Builder
Returns
TypeDescription
AllocationPolicy.Builder

setNetwork(AllocationPolicy.NetworkPolicy value)

public AllocationPolicy.Builder setNetwork(AllocationPolicy.NetworkPolicy value)

The network policy.

.google.cloud.batch.v1.AllocationPolicy.NetworkPolicy network = 7;

Parameter
NameDescription
valueAllocationPolicy.NetworkPolicy
Returns
TypeDescription
AllocationPolicy.Builder

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
NameDescription
builderForValueAllocationPolicy.NetworkPolicy.Builder
Returns
TypeDescription
AllocationPolicy.Builder

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

public AllocationPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AllocationPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AllocationPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AllocationPolicy.Builder
Overrides