#[non_exhaustive]pub struct NodeTemplate {Show 16 fields
pub accelerators: Vec<AcceleratorConfig>,
pub cpu_overcommit_type: Option<CpuOvercommitType>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub disks: Vec<LocalDisk>,
pub id: Option<u64>,
pub kind: Option<String>,
pub name: Option<String>,
pub node_affinity_labels: HashMap<String, String>,
pub node_type: Option<String>,
pub node_type_flexibility: Option<NodeTemplateNodeTypeFlexibility>,
pub region: Option<String>,
pub self_link: Option<String>,
pub server_binding: Option<ServerBinding>,
pub status: Option<Status>,
pub status_message: Option<String>,
/* private fields */
}node-templates only.Expand description
Represent a sole-tenant Node Template resource.
You can use a template to define properties for nodes in a node group. For more information, readCreating node groups and instances.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.accelerators: Vec<AcceleratorConfig>§cpu_overcommit_type: Option<CpuOvercommitType>CPU overcommit.
creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource. Provide this property when you create the resource.
disks: Vec<LocalDisk>§id: Option<u64>Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
kind: Option<String>Output only. [Output Only] The type of the resource. Alwayscompute#nodeTemplate for node templates.
name: Option<String>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
withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression [a-z]([-a-z0-9]*[a-z0-9])? 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.
node_affinity_labels: HashMap<String, String>Labels to use for node affinity, which will be used in instance scheduling.
node_type: Option<String>The node type to use for nodes group that are created from this template.
node_type_flexibility: Option<NodeTemplateNodeTypeFlexibility>Do not use. Instead, use the node_type property.
region: Option<String>Output only. [Output Only] The name of the region where the node template resides, such as us-central1.
self_link: Option<String>Output only. [Output Only] Server-defined URL for the resource.
server_binding: Option<ServerBinding>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.
status: Option<Status>Output only. [Output Only] The status of the node template. One of the following values:CREATING, READY, and DELETING.
status_message: Option<String>Output only. [Output Only] An optional, human-readable explanation of the status.
Implementations§
Source§impl NodeTemplate
impl NodeTemplate
Sourcepub fn set_accelerators<T, V>(self, v: T) -> Self
pub fn set_accelerators<T, V>(self, v: T) -> Self
Sets the value of accelerators.
§Example
use google_cloud_compute_v1::model::AcceleratorConfig;
let x = NodeTemplate::new()
.set_accelerators([
AcceleratorConfig::default()/* use setters */,
AcceleratorConfig::default()/* use (different) setters */,
]);Sourcepub fn set_cpu_overcommit_type<T>(self, v: T) -> Selfwhere
T: Into<CpuOvercommitType>,
pub fn set_cpu_overcommit_type<T>(self, v: T) -> Selfwhere
T: Into<CpuOvercommitType>,
Sets the value of cpu_overcommit_type.
§Example
use google_cloud_compute_v1::model::node_template::CpuOvercommitType;
let x0 = NodeTemplate::new().set_cpu_overcommit_type(CpuOvercommitType::Enabled);
let x1 = NodeTemplate::new().set_cpu_overcommit_type(CpuOvercommitType::None);Sourcepub fn set_or_clear_cpu_overcommit_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<CpuOvercommitType>,
pub fn set_or_clear_cpu_overcommit_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<CpuOvercommitType>,
Sets or clears the value of cpu_overcommit_type.
§Example
use google_cloud_compute_v1::model::node_template::CpuOvercommitType;
let x0 = NodeTemplate::new().set_or_clear_cpu_overcommit_type(Some(CpuOvercommitType::Enabled));
let x1 = NodeTemplate::new().set_or_clear_cpu_overcommit_type(Some(CpuOvercommitType::None));
let x_none = NodeTemplate::new().set_or_clear_cpu_overcommit_type(None::<CpuOvercommitType>);Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = NodeTemplate::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = NodeTemplate::new().set_or_clear_creation_timestamp(Some("example"));
let x = NodeTemplate::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = NodeTemplate::new().set_or_clear_description(Some("example"));
let x = NodeTemplate::new().set_or_clear_description(None::<String>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_node_affinity_labels<T, K, V>(self, v: T) -> Self
pub fn set_node_affinity_labels<T, K, V>(self, v: T) -> Self
Sets the value of node_affinity_labels.
§Example
let x = NodeTemplate::new().set_node_affinity_labels([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_node_type<T>(self, v: T) -> Self
pub fn set_node_type<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_node_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_node_type<T>(self, v: Option<T>) -> Self
Sourcepub fn set_node_type_flexibility<T>(self, v: T) -> Selfwhere
T: Into<NodeTemplateNodeTypeFlexibility>,
pub fn set_node_type_flexibility<T>(self, v: T) -> Selfwhere
T: Into<NodeTemplateNodeTypeFlexibility>,
Sets the value of node_type_flexibility.
§Example
use google_cloud_compute_v1::model::NodeTemplateNodeTypeFlexibility;
let x = NodeTemplate::new().set_node_type_flexibility(NodeTemplateNodeTypeFlexibility::default()/* use setters */);Sourcepub fn set_or_clear_node_type_flexibility<T>(self, v: Option<T>) -> Selfwhere
T: Into<NodeTemplateNodeTypeFlexibility>,
pub fn set_or_clear_node_type_flexibility<T>(self, v: Option<T>) -> Selfwhere
T: Into<NodeTemplateNodeTypeFlexibility>,
Sets or clears the value of node_type_flexibility.
§Example
use google_cloud_compute_v1::model::NodeTemplateNodeTypeFlexibility;
let x = NodeTemplate::new().set_or_clear_node_type_flexibility(Some(NodeTemplateNodeTypeFlexibility::default()/* use setters */));
let x = NodeTemplate::new().set_or_clear_node_type_flexibility(None::<NodeTemplateNodeTypeFlexibility>);Sourcepub fn set_region<T>(self, v: T) -> Self
pub fn set_region<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_server_binding<T>(self, v: T) -> Selfwhere
T: Into<ServerBinding>,
pub fn set_server_binding<T>(self, v: T) -> Selfwhere
T: Into<ServerBinding>,
Sets the value of server_binding.
§Example
use google_cloud_compute_v1::model::ServerBinding;
let x = NodeTemplate::new().set_server_binding(ServerBinding::default()/* use setters */);Sourcepub fn set_or_clear_server_binding<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServerBinding>,
pub fn set_or_clear_server_binding<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServerBinding>,
Sets or clears the value of server_binding.
§Example
use google_cloud_compute_v1::model::ServerBinding;
let x = NodeTemplate::new().set_or_clear_server_binding(Some(ServerBinding::default()/* use setters */));
let x = NodeTemplate::new().set_or_clear_server_binding(None::<ServerBinding>);Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of status.
§Example
use google_cloud_compute_v1::model::node_template::Status;
let x0 = NodeTemplate::new().set_or_clear_status(Some(Status::Deleting));
let x1 = NodeTemplate::new().set_or_clear_status(Some(Status::Invalid));
let x2 = NodeTemplate::new().set_or_clear_status(Some(Status::Ready));
let x_none = NodeTemplate::new().set_or_clear_status(None::<Status>);Sourcepub fn set_status_message<T>(self, v: T) -> Self
pub fn set_status_message<T>(self, v: T) -> Self
Sets the value of status_message.
§Example
let x = NodeTemplate::new().set_status_message("example");Sourcepub fn set_or_clear_status_message<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status_message<T>(self, v: Option<T>) -> Self
Sets or clears the value of status_message.
§Example
let x = NodeTemplate::new().set_or_clear_status_message(Some("example"));
let x = NodeTemplate::new().set_or_clear_status_message(None::<String>);Trait Implementations§
Source§impl Clone for NodeTemplate
impl Clone for NodeTemplate
Source§fn clone(&self) -> NodeTemplate
fn clone(&self) -> NodeTemplate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NodeTemplate
impl Debug for NodeTemplate
Source§impl Default for NodeTemplate
impl Default for NodeTemplate
Source§fn default() -> NodeTemplate
fn default() -> NodeTemplate
Source§impl Message for NodeTemplate
impl Message for NodeTemplate
Source§impl PartialEq for NodeTemplate
impl PartialEq for NodeTemplate
impl StructuralPartialEq for NodeTemplate
Auto Trait Implementations§
impl Freeze for NodeTemplate
impl RefUnwindSafe for NodeTemplate
impl Send for NodeTemplate
impl Sync for NodeTemplate
impl Unpin for NodeTemplate
impl UnsafeUnpin for NodeTemplate
impl UnwindSafe for NodeTemplate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request