#[non_exhaustive]pub struct Node {Show 25 fields
pub name: String,
pub description: String,
pub accelerator_type: String,
pub state: State,
pub health_description: String,
pub runtime_version: String,
pub network_config: Option<NetworkConfig>,
pub network_configs: Vec<NetworkConfig>,
pub cidr_block: String,
pub service_account: Option<ServiceAccount>,
pub create_time: Option<Timestamp>,
pub scheduling_config: Option<SchedulingConfig>,
pub network_endpoints: Vec<NetworkEndpoint>,
pub health: Health,
pub labels: HashMap<String, String>,
pub metadata: HashMap<String, String>,
pub tags: Vec<String>,
pub id: i64,
pub data_disks: Vec<AttachedDisk>,
pub api_version: ApiVersion,
pub symptoms: Vec<Symptom>,
pub shielded_instance_config: Option<ShieldedInstanceConfig>,
pub accelerator_config: Option<AcceleratorConfig>,
pub queued_resource: String,
pub multislice_node: bool,
/* private fields */
}Expand description
A TPU instance.
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.name: StringOutput only. Immutable. The name of the TPU.
description: StringThe user-supplied description of the TPU. Maximum of 512 characters.
accelerator_type: StringOptional. The type of hardware accelerators associated with this node.
state: StateOutput only. The current state for the TPU Node.
health_description: StringOutput only. If this field is populated, it contains a description of why the TPU Node is unhealthy.
runtime_version: StringRequired. The runtime version running in the Node.
network_config: Option<NetworkConfig>Network configurations for the TPU node. network_config and network_configs are mutually exclusive, you can only specify one of them. If both are specified, an error will be returned.
network_configs: Vec<NetworkConfig>Optional. Repeated network configurations for the TPU node. This field is used to specify multiple networks configs for the TPU node. network_config and network_configs are mutually exclusive, you can only specify one of them. If both are specified, an error will be returned.
cidr_block: StringThe CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user’s provided network, or the provided network is peered with another network that is using that CIDR block.
service_account: Option<ServiceAccount>The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used.
create_time: Option<Timestamp>Output only. The time when the node was created.
scheduling_config: Option<SchedulingConfig>The scheduling options for this node.
network_endpoints: Vec<NetworkEndpoint>Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.
health: HealthThe health status of the TPU node.
labels: HashMap<String, String>Resource labels to represent user-provided metadata.
metadata: HashMap<String, String>Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script
Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.
id: i64Output only. The unique identifier for the TPU Node.
data_disks: Vec<AttachedDisk>The additional data disks for the Node.
api_version: ApiVersionOutput only. The API version that created this Node.
symptoms: Vec<Symptom>Output only. The Symptoms that have occurred to the TPU Node.
shielded_instance_config: Option<ShieldedInstanceConfig>Shielded Instance options.
accelerator_config: Option<AcceleratorConfig>The AccleratorConfig for the TPU Node.
queued_resource: StringOutput only. The qualified name of the QueuedResource that requested this Node.
multislice_node: boolOutput only. Whether the Node belongs to a Multislice group.
Implementations§
Source§impl Node
impl Node
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_accelerator_type<T: Into<String>>(self, v: T) -> Self
pub fn set_accelerator_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_health_description<T: Into<String>>(self, v: T) -> Self
pub fn set_health_description<T: Into<String>>(self, v: T) -> Self
Sets the value of health_description.
§Example
let x = Node::new().set_health_description("example");Sourcepub fn set_runtime_version<T: Into<String>>(self, v: T) -> Self
pub fn set_runtime_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_network_config<T>(self, v: T) -> Selfwhere
T: Into<NetworkConfig>,
pub fn set_network_config<T>(self, v: T) -> Selfwhere
T: Into<NetworkConfig>,
Sets the value of network_config.
§Example
use google_cloud_tpu_v2::model::NetworkConfig;
let x = Node::new().set_network_config(NetworkConfig::default()/* use setters */);Sourcepub fn set_or_clear_network_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkConfig>,
pub fn set_or_clear_network_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<NetworkConfig>,
Sets or clears the value of network_config.
§Example
use google_cloud_tpu_v2::model::NetworkConfig;
let x = Node::new().set_or_clear_network_config(Some(NetworkConfig::default()/* use setters */));
let x = Node::new().set_or_clear_network_config(None::<NetworkConfig>);Sourcepub fn set_network_configs<T, V>(self, v: T) -> Self
pub fn set_network_configs<T, V>(self, v: T) -> Self
Sets the value of network_configs.
§Example
use google_cloud_tpu_v2::model::NetworkConfig;
let x = Node::new()
.set_network_configs([
NetworkConfig::default()/* use setters */,
NetworkConfig::default()/* use (different) setters */,
]);Sourcepub fn set_cidr_block<T: Into<String>>(self, v: T) -> Self
pub fn set_cidr_block<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_service_account<T>(self, v: T) -> Selfwhere
T: Into<ServiceAccount>,
pub fn set_service_account<T>(self, v: T) -> Selfwhere
T: Into<ServiceAccount>,
Sets the value of service_account.
§Example
use google_cloud_tpu_v2::model::ServiceAccount;
let x = Node::new().set_service_account(ServiceAccount::default()/* use setters */);Sourcepub fn set_or_clear_service_account<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceAccount>,
pub fn set_or_clear_service_account<T>(self, v: Option<T>) -> Selfwhere
T: Into<ServiceAccount>,
Sets or clears the value of service_account.
§Example
use google_cloud_tpu_v2::model::ServiceAccount;
let x = Node::new().set_or_clear_service_account(Some(ServiceAccount::default()/* use setters */));
let x = Node::new().set_or_clear_service_account(None::<ServiceAccount>);Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Node::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Node::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Node::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_scheduling_config<T>(self, v: T) -> Selfwhere
T: Into<SchedulingConfig>,
pub fn set_scheduling_config<T>(self, v: T) -> Selfwhere
T: Into<SchedulingConfig>,
Sets the value of scheduling_config.
§Example
use google_cloud_tpu_v2::model::SchedulingConfig;
let x = Node::new().set_scheduling_config(SchedulingConfig::default()/* use setters */);Sourcepub fn set_or_clear_scheduling_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SchedulingConfig>,
pub fn set_or_clear_scheduling_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SchedulingConfig>,
Sets or clears the value of scheduling_config.
§Example
use google_cloud_tpu_v2::model::SchedulingConfig;
let x = Node::new().set_or_clear_scheduling_config(Some(SchedulingConfig::default()/* use setters */));
let x = Node::new().set_or_clear_scheduling_config(None::<SchedulingConfig>);Sourcepub fn set_network_endpoints<T, V>(self, v: T) -> Self
pub fn set_network_endpoints<T, V>(self, v: T) -> Self
Sets the value of network_endpoints.
§Example
use google_cloud_tpu_v2::model::NetworkEndpoint;
let x = Node::new()
.set_network_endpoints([
NetworkEndpoint::default()/* use setters */,
NetworkEndpoint::default()/* use (different) setters */,
]);Sourcepub fn set_health<T: Into<Health>>(self, v: T) -> Self
pub fn set_health<T: Into<Health>>(self, v: T) -> Self
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_metadata<T, K, V>(self, v: T) -> Self
pub fn set_metadata<T, K, V>(self, v: T) -> Self
Sourcepub fn set_data_disks<T, V>(self, v: T) -> Self
pub fn set_data_disks<T, V>(self, v: T) -> Self
Sets the value of data_disks.
§Example
use google_cloud_tpu_v2::model::AttachedDisk;
let x = Node::new()
.set_data_disks([
AttachedDisk::default()/* use setters */,
AttachedDisk::default()/* use (different) setters */,
]);Sourcepub fn set_api_version<T: Into<ApiVersion>>(self, v: T) -> Self
pub fn set_api_version<T: Into<ApiVersion>>(self, v: T) -> Self
Sets the value of api_version.
§Example
use google_cloud_tpu_v2::model::node::ApiVersion;
let x0 = Node::new().set_api_version(ApiVersion::V1Alpha1);
let x1 = Node::new().set_api_version(ApiVersion::V1);
let x2 = Node::new().set_api_version(ApiVersion::V2Alpha1);Sourcepub fn set_symptoms<T, V>(self, v: T) -> Self
pub fn set_symptoms<T, V>(self, v: T) -> Self
Sourcepub fn set_shielded_instance_config<T>(self, v: T) -> Selfwhere
T: Into<ShieldedInstanceConfig>,
pub fn set_shielded_instance_config<T>(self, v: T) -> Selfwhere
T: Into<ShieldedInstanceConfig>,
Sets the value of shielded_instance_config.
§Example
use google_cloud_tpu_v2::model::ShieldedInstanceConfig;
let x = Node::new().set_shielded_instance_config(ShieldedInstanceConfig::default()/* use setters */);Sourcepub fn set_or_clear_shielded_instance_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ShieldedInstanceConfig>,
pub fn set_or_clear_shielded_instance_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ShieldedInstanceConfig>,
Sets or clears the value of shielded_instance_config.
§Example
use google_cloud_tpu_v2::model::ShieldedInstanceConfig;
let x = Node::new().set_or_clear_shielded_instance_config(Some(ShieldedInstanceConfig::default()/* use setters */));
let x = Node::new().set_or_clear_shielded_instance_config(None::<ShieldedInstanceConfig>);Sourcepub fn set_accelerator_config<T>(self, v: T) -> Selfwhere
T: Into<AcceleratorConfig>,
pub fn set_accelerator_config<T>(self, v: T) -> Selfwhere
T: Into<AcceleratorConfig>,
Sets the value of accelerator_config.
§Example
use google_cloud_tpu_v2::model::AcceleratorConfig;
let x = Node::new().set_accelerator_config(AcceleratorConfig::default()/* use setters */);Sourcepub fn set_or_clear_accelerator_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<AcceleratorConfig>,
pub fn set_or_clear_accelerator_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<AcceleratorConfig>,
Sets or clears the value of accelerator_config.
§Example
use google_cloud_tpu_v2::model::AcceleratorConfig;
let x = Node::new().set_or_clear_accelerator_config(Some(AcceleratorConfig::default()/* use setters */));
let x = Node::new().set_or_clear_accelerator_config(None::<AcceleratorConfig>);