#[non_exhaustive]pub struct AllocationSpecificSKUAllocationReservedInstanceProperties {
pub guest_accelerators: Vec<AcceleratorConfig>,
pub local_ssds: Vec<AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk>,
pub location_hint: Option<String>,
pub machine_type: Option<String>,
pub min_cpu_platform: Option<String>,
/* private fields */
}future-reservations or region-commitments or reservations only.Expand description
Properties of the SKU instances being reserved. Next ID: 9
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.guest_accelerators: Vec<AcceleratorConfig>Specifies accelerator type and count.
local_ssds: Vec<AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk>Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.
location_hint: Option<String>An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.
machine_type: Option<String>Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.
min_cpu_platform: Option<String>Minimum cpu platform the reservation.
Implementations§
Source§impl AllocationSpecificSKUAllocationReservedInstanceProperties
impl AllocationSpecificSKUAllocationReservedInstanceProperties
pub fn new() -> Self
Sourcepub fn set_guest_accelerators<T, V>(self, v: T) -> Self
pub fn set_guest_accelerators<T, V>(self, v: T) -> Self
Sets the value of guest_accelerators.
§Example
use google_cloud_compute_v1::model::AcceleratorConfig;
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new()
.set_guest_accelerators([
AcceleratorConfig::default()/* use setters */,
AcceleratorConfig::default()/* use (different) setters */,
]);Sourcepub fn set_local_ssds<T, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = V>,
V: Into<AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk>,
pub fn set_local_ssds<T, V>(self, v: T) -> Selfwhere
T: IntoIterator<Item = V>,
V: Into<AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk>,
Sets the value of local_ssds.
§Example
use google_cloud_compute_v1::model::AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk;
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new()
.set_local_ssds([
AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk::default()/* use setters */,
AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk::default()/* use (different) setters */,
]);Sourcepub fn set_location_hint<T>(self, v: T) -> Self
pub fn set_location_hint<T>(self, v: T) -> Self
Sets the value of location_hint.
§Example
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_location_hint("example");Sourcepub fn set_or_clear_location_hint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_location_hint<T>(self, v: Option<T>) -> Self
Sets or clears the value of location_hint.
§Example
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_or_clear_location_hint(Some("example"));
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_or_clear_location_hint(None::<String>);Sourcepub fn set_machine_type<T>(self, v: T) -> Self
pub fn set_machine_type<T>(self, v: T) -> Self
Sets the value of machine_type.
§Example
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_machine_type("example");Sourcepub fn set_or_clear_machine_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_machine_type<T>(self, v: Option<T>) -> Self
Sets or clears the value of machine_type.
§Example
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_or_clear_machine_type(Some("example"));
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_or_clear_machine_type(None::<String>);Sourcepub fn set_min_cpu_platform<T>(self, v: T) -> Self
pub fn set_min_cpu_platform<T>(self, v: T) -> Self
Sets the value of min_cpu_platform.
§Example
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_min_cpu_platform("example");Sourcepub fn set_or_clear_min_cpu_platform<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_min_cpu_platform<T>(self, v: Option<T>) -> Self
Sets or clears the value of min_cpu_platform.
§Example
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_or_clear_min_cpu_platform(Some("example"));
let x = AllocationSpecificSKUAllocationReservedInstanceProperties::new().set_or_clear_min_cpu_platform(None::<String>);Trait Implementations§
Source§impl Clone for AllocationSpecificSKUAllocationReservedInstanceProperties
impl Clone for AllocationSpecificSKUAllocationReservedInstanceProperties
Source§fn clone(&self) -> AllocationSpecificSKUAllocationReservedInstanceProperties
fn clone(&self) -> AllocationSpecificSKUAllocationReservedInstanceProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for AllocationSpecificSKUAllocationReservedInstanceProperties
impl Default for AllocationSpecificSKUAllocationReservedInstanceProperties
Source§fn default() -> AllocationSpecificSKUAllocationReservedInstanceProperties
fn default() -> AllocationSpecificSKUAllocationReservedInstanceProperties
Source§impl PartialEq for AllocationSpecificSKUAllocationReservedInstanceProperties
impl PartialEq for AllocationSpecificSKUAllocationReservedInstanceProperties
Source§fn eq(
&self,
other: &AllocationSpecificSKUAllocationReservedInstanceProperties,
) -> bool
fn eq( &self, other: &AllocationSpecificSKUAllocationReservedInstanceProperties, ) -> bool
self and other values to be equal, and is used by ==.