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
CPU_OVERCOMMIT_TYPE_FIELD_NUMBER
public static final int CPU_OVERCOMMIT_TYPE_FIELD_NUMBER
Field Value
CREATION_TIMESTAMP_FIELD_NUMBER
public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value
DISKS_FIELD_NUMBER
public static final int DISKS_FIELD_NUMBER
Field Value
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Field Value
KIND_FIELD_NUMBER
public static final int KIND_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
NODE_AFFINITY_LABELS_FIELD_NUMBER
public static final int NODE_AFFINITY_LABELS_FIELD_NUMBER
Field Value
NODE_TYPE_FIELD_NUMBER
public static final int NODE_TYPE_FIELD_NUMBER
Field Value
NODE_TYPE_FLEXIBILITY_FIELD_NUMBER
public static final int NODE_TYPE_FLEXIBILITY_FIELD_NUMBER
Field Value
REGION_FIELD_NUMBER
public static final int REGION_FIELD_NUMBER
Field Value
SELF_LINK_FIELD_NUMBER
public static final int SELF_LINK_FIELD_NUMBER
Field Value
SERVER_BINDING_FIELD_NUMBER
public static final int SERVER_BINDING_FIELD_NUMBER
Field Value
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER
Field Value
STATUS_MESSAGE_FIELD_NUMBER
public static final int STATUS_MESSAGE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static NodeTemplate getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static NodeTemplate.Builder newBuilder()
Returns
newBuilder(NodeTemplate prototype)
public static NodeTemplate.Builder newBuilder(NodeTemplate prototype)
Parameter
Returns
public static NodeTemplate parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static NodeTemplate parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static NodeTemplate parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static NodeTemplate parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static NodeTemplate parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static NodeTemplate parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static NodeTemplate parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static NodeTemplate parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static NodeTemplate parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static NodeTemplate parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static NodeTemplate parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static NodeTemplate parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<NodeTemplate> parser()
Returns
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
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getAccelerators(int index)
public AcceleratorConfig getAccelerators(int index)
repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;
Parameter
Returns
getAcceleratorsCount()
public int getAcceleratorsCount()
repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;
Returns
getAcceleratorsList()
public List<AcceleratorConfig> getAcceleratorsList()
repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;
Returns
getAcceleratorsOrBuilder(int index)
public AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(int index)
repeated .google.cloud.compute.v1.AcceleratorConfig accelerators = 269577064;
Parameter
Returns
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
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
Returns
getDisksCount()
public int getDisksCount()
repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;
Returns
getDisksList()
public List<LocalDisk> getDisksList()
repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;
Returns
getDisksOrBuilder(int index)
public LocalDiskOrBuilder getDisksOrBuilder(int index)
repeated .google.cloud.compute.v1.LocalDisk disks = 95594102;
Parameter
Returns
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()
[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()
[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
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
getNodeAffinityLabels()
public Map<String,String> getNodeAffinityLabels()
Returns
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
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
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
Returns
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
Returns
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
getNodeTypeFlexibility()
public NodeTemplateNodeTypeFlexibility getNodeTypeFlexibility()
The flexible properties of the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905;
Returns
getNodeTypeFlexibilityOrBuilder()
public NodeTemplateNodeTypeFlexibilityOrBuilder getNodeTypeFlexibilityOrBuilder()
The flexible properties of the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
optional .google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility node_type_flexibility = 315257905;
Returns
getParserForType()
public Parser<NodeTemplate> getParserForType()
Returns
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
getSelfLink()
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
getSerializedSize()
public int getSerializedSize()
Returns
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
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
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
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.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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()
[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()
[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()
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()
The flexible properties of the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. This field is mutually exclusive with the node_type property; you can only define one or the other, but not both.
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.
|
hasSelfLink()
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()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public NodeTemplate.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected NodeTemplate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public NodeTemplate.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions