#[non_exhaustive]pub struct MachineType {Show 16 fields
pub accelerators: Vec<Accelerators>,
pub architecture: Option<Architecture>,
pub creation_timestamp: Option<String>,
pub deprecated: Option<DeprecationStatus>,
pub description: Option<String>,
pub guest_cpus: Option<i32>,
pub id: Option<u64>,
pub image_space_gb: Option<i32>,
pub is_shared_cpu: Option<bool>,
pub kind: Option<String>,
pub maximum_persistent_disks: Option<i32>,
pub maximum_persistent_disks_size_gb: Option<i64>,
pub memory_mb: Option<i32>,
pub name: Option<String>,
pub self_link: Option<String>,
pub zone: Option<String>,
/* private fields */
}machine-types only.Expand description
Represents a Machine Type resource.
You can use specific machine types for your VM instances based on performance and pricing requirements. For more information, readMachine Types.
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<Accelerators>[Output Only] A list of accelerator configurations assigned to this machine type.
architecture: Option<Architecture>[Output Only] The architecture of the machine type.
creation_timestamp: Option<String>[Output Only] Creation timestamp inRFC3339 text format.
deprecated: Option<DeprecationStatus>[Output Only] The deprecation status associated with this machine type. Only applicable if the machine type is unavailable.
description: Option<String>[Output Only] An optional textual description of the resource.
guest_cpus: Option<i32>[Output Only] The number of virtual CPUs that are available to the instance.
id: Option<u64>[Output Only] The unique identifier for the resource. This identifier is defined by the server.
image_space_gb: Option<i32>[Deprecated] This property is deprecated and will never be populated with any relevant values.
[Output Only] Whether this machine type has a shared CPU. SeeShared-core machine types for more information.
kind: Option<String>Output only. [Output Only] The type of the resource. Alwayscompute#machineType for machine types.
maximum_persistent_disks: Option<i32>[Output Only] Maximum persistent disks allowed.
maximum_persistent_disks_size_gb: Option<i64>[Output Only] Maximum total persistent disks size (GB) allowed.
memory_mb: Option<i32>[Output Only] The amount of physical memory available to the instance, defined in MB.
name: Option<String>[Output Only] Name of the resource.
self_link: Option<String>[Output Only] Server-defined URL for the resource.
zone: Option<String>[Output Only] The name of the zone where the machine type resides, such as us-central1-a.
Implementations§
Source§impl MachineType
impl MachineType
pub fn new() -> Self
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::machine_type::Accelerators;
let x = MachineType::new()
.set_accelerators([
Accelerators::default()/* use setters */,
Accelerators::default()/* use (different) setters */,
]);Sourcepub fn set_architecture<T>(self, v: T) -> Selfwhere
T: Into<Architecture>,
pub fn set_architecture<T>(self, v: T) -> Selfwhere
T: Into<Architecture>,
Sets the value of architecture.
§Example
use google_cloud_compute_v1::model::machine_type::Architecture;
let x0 = MachineType::new().set_architecture(Architecture::Arm64);
let x1 = MachineType::new().set_architecture(Architecture::X8664);Sourcepub fn set_or_clear_architecture<T>(self, v: Option<T>) -> Selfwhere
T: Into<Architecture>,
pub fn set_or_clear_architecture<T>(self, v: Option<T>) -> Selfwhere
T: Into<Architecture>,
Sets or clears the value of architecture.
§Example
use google_cloud_compute_v1::model::machine_type::Architecture;
let x0 = MachineType::new().set_or_clear_architecture(Some(Architecture::Arm64));
let x1 = MachineType::new().set_or_clear_architecture(Some(Architecture::X8664));
let x_none = MachineType::new().set_or_clear_architecture(None::<Architecture>);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 = MachineType::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 = MachineType::new().set_or_clear_creation_timestamp(Some("example"));
let x = MachineType::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_deprecated<T>(self, v: T) -> Selfwhere
T: Into<DeprecationStatus>,
pub fn set_deprecated<T>(self, v: T) -> Selfwhere
T: Into<DeprecationStatus>,
Sets the value of deprecated.
§Example
use google_cloud_compute_v1::model::DeprecationStatus;
let x = MachineType::new().set_deprecated(DeprecationStatus::default()/* use setters */);Sourcepub fn set_or_clear_deprecated<T>(self, v: Option<T>) -> Selfwhere
T: Into<DeprecationStatus>,
pub fn set_or_clear_deprecated<T>(self, v: Option<T>) -> Selfwhere
T: Into<DeprecationStatus>,
Sets or clears the value of deprecated.
§Example
use google_cloud_compute_v1::model::DeprecationStatus;
let x = MachineType::new().set_or_clear_deprecated(Some(DeprecationStatus::default()/* use setters */));
let x = MachineType::new().set_or_clear_deprecated(None::<DeprecationStatus>);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 = MachineType::new().set_or_clear_description(Some("example"));
let x = MachineType::new().set_or_clear_description(None::<String>);Sourcepub fn set_guest_cpus<T>(self, v: T) -> Self
pub fn set_guest_cpus<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_guest_cpus<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_guest_cpus<T>(self, v: Option<T>) -> Self
Sets or clears the value of guest_cpus.
§Example
let x = MachineType::new().set_or_clear_guest_cpus(Some(42));
let x = MachineType::new().set_or_clear_guest_cpus(None::<i32>);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_image_space_gb<T>(self, v: T) -> Self
pub fn set_image_space_gb<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_image_space_gb<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_image_space_gb<T>(self, v: Option<T>) -> Self
Sets or clears the value of image_space_gb.
§Example
let x = MachineType::new().set_or_clear_image_space_gb(Some(42));
let x = MachineType::new().set_or_clear_image_space_gb(None::<i32>);Sets or clears the value of is_shared_cpu.
§Example
let x = MachineType::new().set_or_clear_is_shared_cpu(Some(false));
let x = MachineType::new().set_or_clear_is_shared_cpu(None::<bool>);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_maximum_persistent_disks<T>(self, v: T) -> Self
pub fn set_maximum_persistent_disks<T>(self, v: T) -> Self
Sets the value of maximum_persistent_disks.
§Example
let x = MachineType::new().set_maximum_persistent_disks(42);Sourcepub fn set_or_clear_maximum_persistent_disks<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_maximum_persistent_disks<T>(self, v: Option<T>) -> Self
Sets or clears the value of maximum_persistent_disks.
§Example
let x = MachineType::new().set_or_clear_maximum_persistent_disks(Some(42));
let x = MachineType::new().set_or_clear_maximum_persistent_disks(None::<i32>);Sourcepub fn set_maximum_persistent_disks_size_gb<T>(self, v: T) -> Self
pub fn set_maximum_persistent_disks_size_gb<T>(self, v: T) -> Self
Sets the value of maximum_persistent_disks_size_gb.
§Example
let x = MachineType::new().set_maximum_persistent_disks_size_gb(42);Sourcepub fn set_or_clear_maximum_persistent_disks_size_gb<T>(
self,
v: Option<T>,
) -> Self
pub fn set_or_clear_maximum_persistent_disks_size_gb<T>( self, v: Option<T>, ) -> Self
Sets or clears the value of maximum_persistent_disks_size_gb.
§Example
let x = MachineType::new().set_or_clear_maximum_persistent_disks_size_gb(Some(42));
let x = MachineType::new().set_or_clear_maximum_persistent_disks_size_gb(None::<i32>);Sourcepub fn set_memory_mb<T>(self, v: T) -> Self
pub fn set_memory_mb<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_memory_mb<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_memory_mb<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_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
Trait Implementations§
Source§impl Clone for MachineType
impl Clone for MachineType
Source§fn clone(&self) -> MachineType
fn clone(&self) -> MachineType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more