Class NodeTemplate (1.59.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
Type Description
int

CPU_OVERCOMMIT_TYPE_FIELD_NUMBER

public static final int CPU_OVERCOMMIT_TYPE_FIELD_NUMBER
Field Value
Type Description
int

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISKS_FIELD_NUMBER

public static final int DISKS_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NODE_AFFINITY_LABELS_FIELD_NUMBER

public static final int NODE_AFFINITY_LABELS_FIELD_NUMBER
Field Value
Type Description
int

NODE_TYPE_FIELD_NUMBER

public static final int NODE_TYPE_FIELD_NUMBER
Field Value
Type Description
int

NODE_TYPE_FLEXIBILITY_FIELD_NUMBER

public static final int NODE_TYPE_FLEXIBILITY_FIELD_NUMBER
Field Value
Type Description
int

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
Type Description
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
Type Description
int

SERVER_BINDING_FIELD_NUMBER

public static final int SERVER_BINDING_FIELD_NUMBER
Field Value
Type Description
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
Type Description
int

STATUS_MESSAGE_FIELD_NUMBER

public static final int STATUS_MESSAGE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static NodeTemplate getDefaultInstance()
Returns
Type Description
NodeTemplate

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static NodeTemplate.Builder newBuilder()
Returns
Type Description
NodeTemplate.Builder

newBuilder(NodeTemplate prototype)

public static NodeTemplate.Builder newBuilder(NodeTemplate prototype)
Parameter
Name Description
prototype NodeTemplate
Returns
Type Description
NodeTemplate.Builder

parseDelimitedFrom(InputStream input)

public static NodeTemplate parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
NodeTemplate
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NodeTemplate
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static NodeTemplate parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
NodeTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NodeTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static NodeTemplate parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
NodeTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NodeTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static NodeTemplate parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
NodeTemplate
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NodeTemplate
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static NodeTemplate parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
NodeTemplate
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NodeTemplate
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static NodeTemplate parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
NodeTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static NodeTemplate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NodeTemplate
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<NodeTemplate> parser()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAccelerators(int index)

public AcceleratorConfig getAccelerators(int index)

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

Parameter
Name Description
index int
Returns
Type Description
AcceleratorConfig

getAcceleratorsCount()

public int getAcceleratorsCount()

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

Returns
Type Description
int

getAcceleratorsList()

public List<AcceleratorConfig> getAcceleratorsList()

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

Returns
Type Description
List<AcceleratorConfig>

getAcceleratorsOrBuilder(int index)

public AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(int index)

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

Parameter
Name Description
index int
Returns
Type Description
AcceleratorConfigOrBuilder

getAcceleratorsOrBuilderList()

public List<? extends AcceleratorConfigOrBuilder> getAcceleratorsOrBuilderList()

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

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for cpuOvercommitType.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public NodeTemplate getDefaultInstanceForType()
Returns
Type Description
NodeTemplate

getDescription()

public String getDescription()

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

optional string description = 422937596;

Returns
Type Description
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
Type Description
ByteString

The bytes for description.

getDisks(int index)

public LocalDisk getDisks(int index)

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

Parameter
Name Description
index int
Returns
Type Description
LocalDisk

getDisksCount()

public int getDisksCount()

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

Returns
Type Description
int

getDisksList()

public List<LocalDisk> getDisksList()

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

Returns
Type Description
List<LocalDisk>

getDisksOrBuilder(int index)

public LocalDiskOrBuilder getDisksOrBuilder(int index)

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

Parameter
Name Description
index int
Returns
Type Description
LocalDiskOrBuilder

getDisksOrBuilderList()

public List<? extends LocalDiskOrBuilder> getDisksOrBuilderList()

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

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for name.

getNodeAffinityLabels() (deprecated)

public Map<String,String> getNodeAffinityLabels()
Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
NodeTemplateNodeTypeFlexibilityOrBuilder

getParserForType()

public Parser<NodeTemplate> getParserForType()
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for region.

public String getSelfLink()

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

optional string self_link = 456214797;

Returns
Type Description
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

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

optional string self_link = 456214797;

Returns
Type Description
ByteString

The bytes for selfLink.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
String

The statusMessage.

getStatusMessageBytes()

public ByteString getStatusMessageBytes()

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

optional string status_message = 297428154;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the region field is set.

public boolean hasSelfLink()

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

optional string self_link = 456214797;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the statusMessage field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public NodeTemplate.Builder newBuilderForType()
Returns
Type Description
NodeTemplate.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected NodeTemplate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
NodeTemplate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public NodeTemplate.Builder toBuilder()
Returns
Type Description
NodeTemplate.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException