Send feedback
Class AllocationPolicy.InstancePolicyOrTemplate.Builder (0.6.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.6.0 keyboard_arrow_down
public static final class AllocationPolicy . InstancePolicyOrTemplate . Builder extends GeneratedMessageV3 . Builder<AllocationPolicy . InstancePolicyOrTemplate . Builder > implements AllocationPolicy . InstancePolicyOrTemplateOrBuilder
Either an InstancePolicy or an instance template.
Protobuf type google.cloud.batch.v1.AllocationPolicy.InstancePolicyOrTemplate
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
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AllocationPolicy . InstancePolicyOrTemplate . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public AllocationPolicy . InstancePolicyOrTemplate build ()
Returns
buildPartial()
public AllocationPolicy . InstancePolicyOrTemplate buildPartial ()
Returns
clear()
public AllocationPolicy . InstancePolicyOrTemplate . Builder clear ()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public AllocationPolicy . InstancePolicyOrTemplate . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearInstallGpuDrivers()
public AllocationPolicy . InstancePolicyOrTemplate . Builder clearInstallGpuDrivers ()
Set this field true if users want Batch to help fetch drivers from a
third party location and install them for GPUs specified in
policy.accelerators or instance_template on their behalf. Default is
false.
bool install_gpu_drivers = 3;
Returns
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;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public AllocationPolicy . InstancePolicyOrTemplate . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
clearPolicy()
public AllocationPolicy . InstancePolicyOrTemplate . Builder clearPolicy ()
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
Returns
clearPolicyTemplate()
public AllocationPolicy . InstancePolicyOrTemplate . Builder clearPolicyTemplate ()
Returns
clone()
public AllocationPolicy . InstancePolicyOrTemplate . Builder clone ()
Returns
Overrides
getDefaultInstanceForType()
public AllocationPolicy . InstancePolicyOrTemplate getDefaultInstanceForType ()
Returns
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getInstallGpuDrivers()
public boolean getInstallGpuDrivers ()
Set this field true if users want Batch to help fetch drivers from a
third party location and install them for GPUs specified in
policy.accelerators or instance_template on their behalf. Default is
false.
bool install_gpu_drivers = 3;
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;
Returns
getPolicyBuilder()
public AllocationPolicy . InstancePolicy . Builder getPolicyBuilder ()
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
Returns
getPolicyOrBuilder()
public AllocationPolicy . InstancePolicyOrBuilder getPolicyOrBuilder ()
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
Returns
getPolicyTemplateCase()
public AllocationPolicy . InstancePolicyOrTemplate . PolicyTemplateCase getPolicyTemplateCase ()
Returns
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 ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
mergeFrom(AllocationPolicy.InstancePolicyOrTemplate other)
public AllocationPolicy . InstancePolicyOrTemplate . Builder mergeFrom ( AllocationPolicy . InstancePolicyOrTemplate other )
Parameter
Returns
public AllocationPolicy . InstancePolicyOrTemplate . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public AllocationPolicy . InstancePolicyOrTemplate . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergePolicy(AllocationPolicy.InstancePolicy value)
public AllocationPolicy . InstancePolicyOrTemplate . Builder mergePolicy ( AllocationPolicy . InstancePolicy value )
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AllocationPolicy . InstancePolicyOrTemplate . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public AllocationPolicy . InstancePolicyOrTemplate . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setInstallGpuDrivers(boolean value)
public AllocationPolicy . InstancePolicyOrTemplate . Builder setInstallGpuDrivers ( boolean value )
Set this field true if users want Batch to help fetch drivers from a
third party location and install them for GPUs specified in
policy.accelerators or instance_template on their behalf. Default is
false.
bool install_gpu_drivers = 3;
Parameter
Name
Description
value
boolean
The installGpuDrivers to set.
Returns
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.
Returns
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.
Returns
setPolicy(AllocationPolicy.InstancePolicy value)
public AllocationPolicy . InstancePolicyOrTemplate . Builder setPolicy ( AllocationPolicy . InstancePolicy value )
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
Parameter
Returns
setPolicy(AllocationPolicy.InstancePolicy.Builder builderForValue)
public AllocationPolicy . InstancePolicyOrTemplate . Builder setPolicy ( AllocationPolicy . InstancePolicy . Builder builderForValue )
InstancePolicy.
.google.cloud.batch.v1.AllocationPolicy.InstancePolicy policy = 1;
Parameter
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public AllocationPolicy . InstancePolicyOrTemplate . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final AllocationPolicy . InstancePolicyOrTemplate . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[],[]]