#[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: 10
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
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 (const: unstable) · 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
impl StructuralPartialEq for AllocationSpecificSKUAllocationReservedInstanceProperties
Auto Trait Implementations§
impl Freeze for AllocationSpecificSKUAllocationReservedInstanceProperties
impl RefUnwindSafe for AllocationSpecificSKUAllocationReservedInstanceProperties
impl Send for AllocationSpecificSKUAllocationReservedInstanceProperties
impl Sync for AllocationSpecificSKUAllocationReservedInstanceProperties
impl Unpin for AllocationSpecificSKUAllocationReservedInstanceProperties
impl UnsafeUnpin for AllocationSpecificSKUAllocationReservedInstanceProperties
impl UnwindSafe for AllocationSpecificSKUAllocationReservedInstanceProperties
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