public static final class AllocationPolicy.InstancePolicyOrTemplate.Builder extends GeneratedMessageV3.Builder<AllocationPolicy.InstancePolicyOrTemplate.Builder> implements AllocationPolicy.InstancePolicyOrTemplateOrBuilder
InstancePolicyOrTemplate lets you define the type of resources to use for
this job either with an InstancePolicy or an instance template.
If undefined, Batch picks the type of VM to use and doesn't include
optional VM resources such as GPUs and extra disks.
Protobuf type google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AllocationPolicy.InstancePolicyOrTemplate.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public AllocationPolicy.InstancePolicyOrTemplate build()
buildPartial()
public AllocationPolicy.InstancePolicyOrTemplate buildPartial()
clear()
public AllocationPolicy.InstancePolicyOrTemplate.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public AllocationPolicy.InstancePolicyOrTemplate.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearInstallGpuDrivers()
public AllocationPolicy.InstancePolicyOrTemplate.Builder clearInstallGpuDrivers()
clearInstanceTemplate()
public AllocationPolicy.InstancePolicyOrTemplate.Builder clearInstanceTemplate()
Name of an instance template used to create VMs.
Named the field as 'instance_template' instead of 'template' to avoid
c++ keyword conflict.
string instance_template = 2;
clearOneof(Descriptors.OneofDescriptor oneof)
public AllocationPolicy.InstancePolicyOrTemplate.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearPolicy()
public AllocationPolicy.InstancePolicyOrTemplate.Builder clearPolicy()
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
clearPolicyTemplate()
public AllocationPolicy.InstancePolicyOrTemplate.Builder clearPolicyTemplate()
clone()
public AllocationPolicy.InstancePolicyOrTemplate.Builder clone()
Overrides
getDefaultInstanceForType()
public AllocationPolicy.InstancePolicyOrTemplate getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getInstallGpuDrivers()
public boolean getInstallGpuDrivers()
Returns |
Type |
Description |
boolean |
The installGpuDrivers.
|
getInstanceTemplate()
public String getInstanceTemplate()
Name of an instance template used to create VMs.
Named the field as 'instance_template' instead of 'template' to avoid
c++ keyword conflict.
string instance_template = 2;
Returns |
Type |
Description |
String |
The instanceTemplate.
|
getInstanceTemplateBytes()
public ByteString getInstanceTemplateBytes()
Name of an instance template used to create VMs.
Named the field as 'instance_template' instead of 'template' to avoid
c++ keyword conflict.
string instance_template = 2;
Returns |
Type |
Description |
ByteString |
The bytes for instanceTemplate.
|
getPolicy()
public AllocationPolicy.InstancePolicy getPolicy()
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
getPolicyBuilder()
public AllocationPolicy.InstancePolicy.Builder getPolicyBuilder()
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
getPolicyOrBuilder()
public AllocationPolicy.InstancePolicyOrBuilder getPolicyOrBuilder()
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
getPolicyTemplateCase()
public AllocationPolicy.InstancePolicyOrTemplate.PolicyTemplateCase getPolicyTemplateCase()
hasInstanceTemplate()
public boolean hasInstanceTemplate()
Name of an instance template used to create VMs.
Named the field as 'instance_template' instead of 'template' to avoid
c++ keyword conflict.
string instance_template = 2;
Returns |
Type |
Description |
boolean |
Whether the instanceTemplate field is set.
|
hasPolicy()
public boolean hasPolicy()
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
Returns |
Type |
Description |
boolean |
Whether the policy field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(AllocationPolicy.InstancePolicyOrTemplate other)
public AllocationPolicy.InstancePolicyOrTemplate.Builder mergeFrom(AllocationPolicy.InstancePolicyOrTemplate other)
public AllocationPolicy.InstancePolicyOrTemplate.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public AllocationPolicy.InstancePolicyOrTemplate.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergePolicy(AllocationPolicy.InstancePolicy value)
public AllocationPolicy.InstancePolicyOrTemplate.Builder mergePolicy(AllocationPolicy.InstancePolicy value)
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AllocationPolicy.InstancePolicyOrTemplate.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public AllocationPolicy.InstancePolicyOrTemplate.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setInstallGpuDrivers(boolean value)
public AllocationPolicy.InstancePolicyOrTemplate.Builder setInstallGpuDrivers(boolean value)
Parameter |
Name |
Description |
value |
boolean
The installGpuDrivers to set.
|
setInstanceTemplate(String value)
public AllocationPolicy.InstancePolicyOrTemplate.Builder setInstanceTemplate(String value)
Name of an instance template used to create VMs.
Named the field as 'instance_template' instead of 'template' to avoid
c++ keyword conflict.
string instance_template = 2;
Parameter |
Name |
Description |
value |
String
The instanceTemplate to set.
|
setInstanceTemplateBytes(ByteString value)
public AllocationPolicy.InstancePolicyOrTemplate.Builder setInstanceTemplateBytes(ByteString value)
Name of an instance template used to create VMs.
Named the field as 'instance_template' instead of 'template' to avoid
c++ keyword conflict.
string instance_template = 2;
Parameter |
Name |
Description |
value |
ByteString
The bytes for instanceTemplate to set.
|
setPolicy(AllocationPolicy.InstancePolicy value)
public AllocationPolicy.InstancePolicyOrTemplate.Builder setPolicy(AllocationPolicy.InstancePolicy value)
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
setPolicy(AllocationPolicy.InstancePolicy.Builder builderForValue)
public AllocationPolicy.InstancePolicyOrTemplate.Builder setPolicy(AllocationPolicy.InstancePolicy.Builder builderForValue)
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public AllocationPolicy.InstancePolicyOrTemplate.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final AllocationPolicy.InstancePolicyOrTemplate.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides