Class NodeTemplate (1.41.0)

public final class NodeTemplate extends GeneratedMessageV3 implements NodeTemplateOrBuilder

Represent a sole-tenant Node Template resource. You can use a template to define properties for nodes in a node group. For more information, read Creating node groups and instances.

Protobuf type google.cloud.compute.v1.NodeTemplate

Static Fields

ACCELERATORS_FIELD_NUMBER

public static final int ACCELERATORS_FIELD_NUMBER
Field Value
TypeDescription
int

CPU_OVERCOMMIT_TYPE_FIELD_NUMBER

public static final int CPU_OVERCOMMIT_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

DISKS_FIELD_NUMBER

public static final int DISKS_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NODE_AFFINITY_LABELS_FIELD_NUMBER

public static final int NODE_AFFINITY_LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

NODE_TYPE_FIELD_NUMBER

public static final int NODE_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

NODE_TYPE_FLEXIBILITY_FIELD_NUMBER

public static final int NODE_TYPE_FLEXIBILITY_FIELD_NUMBER
Field Value
TypeDescription
int

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
TypeDescription
int

SERVER_BINDING_FIELD_NUMBER

public static final int SERVER_BINDING_FIELD_NUMBER
Field Value
TypeDescription
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
TypeDescription
int

STATUS_MESSAGE_FIELD_NUMBER

public static final int STATUS_MESSAGE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static NodeTemplate getDefaultInstance()
Returns
TypeDescription
NodeTemplate

getDescriptor()

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

newBuilder()

public static NodeTemplate.Builder newBuilder()
Returns
TypeDescription
NodeTemplate.Builder

newBuilder(NodeTemplate prototype)

public static NodeTemplate.Builder newBuilder(NodeTemplate prototype)
Parameter
NameDescription
prototypeNodeTemplate
Returns
TypeDescription
NodeTemplate.Builder

parseDelimitedFrom(InputStream input)

public static NodeTemplate parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static NodeTemplate parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static NodeTemplate parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static NodeTemplate parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static NodeTemplate parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static NodeTemplate parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NodeTemplate
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<NodeTemplate> parser()
Returns
TypeDescription
Parser<NodeTemplate>

Methods

containsNodeAffinityLabels(String key)

public boolean containsNodeAffinityLabels(String key)

Labels to use for node affinity, which will be used in instance scheduling.

map<string, string> node_affinity_labels = 339007161;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAccelerators(int index)

public AcceleratorConfig getAccelerators(int index)

repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;

Parameter
NameDescription
indexint
Returns
TypeDescription
AcceleratorConfig

getAcceleratorsCount()

public int getAcceleratorsCount()

repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;

Returns
TypeDescription
int

getAcceleratorsList()

public List<AcceleratorConfig> getAcceleratorsList()

repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;

Returns
TypeDescription
List<AcceleratorConfig>

getAcceleratorsOrBuilder(int index)

public AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(int index)

repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;

Parameter
NameDescription
indexint
Returns
TypeDescription
AcceleratorConfigOrBuilder

getAcceleratorsOrBuilderList()

public List<? extends AcceleratorConfigOrBuilder> getAcceleratorsOrBuilderList()

repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.AcceleratorConfigOrBuilder>

getCpuOvercommitType()

public String getCpuOvercommitType()

CPU overcommit. Check the CpuOvercommitType enum for the list of possible values.

optional string cpu_overcommit_type = 247727959;

Returns
TypeDescription
String

The cpuOvercommitType.

getCpuOvercommitTypeBytes()

public ByteString getCpuOvercommitTypeBytes()

CPU overcommit. Check the CpuOvercommitType enum for the list of possible values.

optional string cpu_overcommit_type = 247727959;

Returns
TypeDescription
ByteString

The bytes for cpuOvercommitType.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public NodeTemplate getDefaultInstanceForType()
Returns
TypeDescription
NodeTemplate

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDisks(int index)

public LocalDisk getDisks(int index)

repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;

Parameter
NameDescription
indexint
Returns
TypeDescription
LocalDisk

getDisksCount()

public int getDisksCount()

repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;

Returns
TypeDescription
int

getDisksList()

public List<LocalDisk> getDisksList()

repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;

Returns
TypeDescription
List<LocalDisk>

getDisksOrBuilder(int index)

public LocalDiskOrBuilder getDisksOrBuilder(int index)

repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;

Parameter
NameDescription
indexint
Returns
TypeDescription
LocalDiskOrBuilder

getDisksOrBuilderList()

public List<? extends LocalDiskOrBuilder> getDisksOrBuilderList()

repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.LocalDiskOrBuilder>

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
long

The id.

getKind()

public String getKind()

[Output Only] The type of the resource. Always compute#nodeTemplate for node templates.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] The type of the resource. Always compute#nodeTemplate for node templates.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getName()

public String getName()

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getNodeAffinityLabels() (deprecated)

public Map<String,String> getNodeAffinityLabels()
Returns
TypeDescription
Map<String,String>

getNodeAffinityLabelsCount()

public int getNodeAffinityLabelsCount()

Labels to use for node affinity, which will be used in instance scheduling.

map<string, string> node_affinity_labels = 339007161;

Returns
TypeDescription
int

getNodeAffinityLabelsMap()

public Map<String,String> getNodeAffinityLabelsMap()

Labels to use for node affinity, which will be used in instance scheduling.

map<string, string> node_affinity_labels = 339007161;

Returns
TypeDescription
Map<String,String>

getNodeAffinityLabelsOrDefault(String key, String defaultValue)

public String getNodeAffinityLabelsOrDefault(String key, String defaultValue)

Labels to use for node affinity, which will be used in instance scheduling.

map<string, string> node_affinity_labels = 339007161;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getNodeAffinityLabelsOrThrow(String key)

public String getNodeAffinityLabelsOrThrow(String key)

Labels to use for node affinity, which will be used in instance scheduling.

map<string, string> node_affinity_labels = 339007161;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getNodeType()

public String getNodeType()

The node type to use for nodes group that are created from this template.

optional string node_type = 465832791;

Returns
TypeDescription
String

The nodeType.

getNodeTypeBytes()

public ByteString getNodeTypeBytes()

The node type to use for nodes group that are created from this template.

optional string node_type = 465832791;

Returns
TypeDescription
ByteString

The bytes for nodeType.

getNodeTypeFlexibility()

public NodeTemplateNodeTypeFlexibility getNodeTypeFlexibility()

Do not use. Instead, use the node_type property.

optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905;

Returns
TypeDescription
NodeTemplateNodeTypeFlexibility

The nodeTypeFlexibility.

getNodeTypeFlexibilityOrBuilder()

public NodeTemplateNodeTypeFlexibilityOrBuilder getNodeTypeFlexibilityOrBuilder()

Do not use. Instead, use the node_type property.

optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905;

Returns
TypeDescription
NodeTemplateNodeTypeFlexibilityOrBuilder

getParserForType()

public Parser<NodeTemplate> getParserForType()
Returns
TypeDescription
Parser<NodeTemplate>
Overrides

getRegion()

public String getRegion()

[Output Only] The name of the region where the node template resides, such as us-central1.

optional string region = 138946292;

Returns
TypeDescription
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

[Output Only] The name of the region where the node template resides, such as us-central1.

optional string region = 138946292;

Returns
TypeDescription
ByteString

The bytes for region.

public String getSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
ByteString

The bytes for selfLink.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getServerBinding()

public ServerBinding getServerBinding()

Sets the binding properties for the physical server. Valid values include: - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information.

optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;

Returns
TypeDescription
ServerBinding

The serverBinding.

getServerBindingOrBuilder()

public ServerBindingOrBuilder getServerBindingOrBuilder()

Sets the binding properties for the physical server. Valid values include: - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information.

optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;

Returns
TypeDescription
ServerBindingOrBuilder

getStatus()

public String getStatus()

[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
String

The status.

getStatusBytes()

public ByteString getStatusBytes()

[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
ByteString

The bytes for status.

getStatusMessage()

public String getStatusMessage()

[Output Only] An optional, human-readable explanation of the status.

optional string status_message = 297428154;

Returns
TypeDescription
String

The statusMessage.

getStatusMessageBytes()

public ByteString getStatusMessageBytes()

[Output Only] An optional, human-readable explanation of the status.

optional string status_message = 297428154;

Returns
TypeDescription
ByteString

The bytes for statusMessage.

hasCpuOvercommitType()

public boolean hasCpuOvercommitType()

CPU overcommit. Check the CpuOvercommitType enum for the list of possible values.

optional string cpu_overcommit_type = 247727959;

Returns
TypeDescription
boolean

Whether the cpuOvercommitType field is set.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

[Output Only] The type of the resource. Always compute#nodeTemplate for node templates.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasName()

public boolean hasName()

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasNodeType()

public boolean hasNodeType()

The node type to use for nodes group that are created from this template.

optional string node_type = 465832791;

Returns
TypeDescription
boolean

Whether the nodeType field is set.

hasNodeTypeFlexibility()

public boolean hasNodeTypeFlexibility()

Do not use. Instead, use the node_type property.

optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905;

Returns
TypeDescription
boolean

Whether the nodeTypeFlexibility field is set.

hasRegion()

public boolean hasRegion()

[Output Only] The name of the region where the node template resides, such as us-central1.

optional string region = 138946292;

Returns
TypeDescription
boolean

Whether the region field is set.

public boolean hasSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
boolean

Whether the selfLink field is set.

hasServerBinding()

public boolean hasServerBinding()

Sets the binding properties for the physical server. Valid values include: - [Default] RESTART_NODE_ON_ANY_SERVER: Restarts VMs on any available physical server - RESTART_NODE_ON_MINIMAL_SERVER: Restarts VMs on the same physical server whenever possible See Sole-tenant node options for more information.

optional .google.cloud.compute.v1.ServerBinding server_binding = 208179593;

Returns
TypeDescription
boolean

Whether the serverBinding field is set.

hasStatus()

public boolean hasStatus()

[Output Only] The status of the node template. One of the following values: CREATING, READY, and DELETING. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
boolean

Whether the status field is set.

hasStatusMessage()

public boolean hasStatusMessage()

[Output Only] An optional, human-readable explanation of the status.

optional string status_message = 297428154;

Returns
TypeDescription
boolean

Whether the statusMessage field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public NodeTemplate.Builder newBuilderForType()
Returns
TypeDescription
NodeTemplate.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected NodeTemplate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
NodeTemplate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public NodeTemplate.Builder toBuilder()
Returns
TypeDescription
NodeTemplate.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException