#[non_exhaustive]pub struct AllocationAggregateReservation {
pub in_use_resources: Vec<AllocationAggregateReservationReservedResourceInfo>,
pub reserved_resources: Vec<AllocationAggregateReservationReservedResourceInfo>,
pub vm_family: Option<VmFamily>,
pub workload_type: Option<WorkloadType>,
/* private fields */
}Available on crate features
future-reservations or region-commitments or reservations only.Expand description
This reservation type is specified by total resource amounts (e.g. total count of CPUs) and can account for multiple instance SKUs. In other words, one can create instances of varying shapes against this reservation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.in_use_resources: Vec<AllocationAggregateReservationReservedResourceInfo>Output only. [Output only] List of resources currently in use.
reserved_resources: Vec<AllocationAggregateReservationReservedResourceInfo>List of reserved resources (CPUs, memory, accelerators).
vm_family: Option<VmFamily>The VM family that all instances scheduled against this reservation must belong to.
workload_type: Option<WorkloadType>The workload type of the instances that will target this reservation.
Implementations§
Source§impl AllocationAggregateReservation
impl AllocationAggregateReservation
pub fn new() -> Self
Sourcepub fn set_in_use_resources<T, V>(self, v: T) -> Self
pub fn set_in_use_resources<T, V>(self, v: T) -> Self
Sets the value of in_use_resources.
§Example
ⓘ
use google_cloud_compute_v1::model::AllocationAggregateReservationReservedResourceInfo;
let x = AllocationAggregateReservation::new()
.set_in_use_resources([
AllocationAggregateReservationReservedResourceInfo::default()/* use setters */,
AllocationAggregateReservationReservedResourceInfo::default()/* use (different) setters */,
]);Sourcepub fn set_reserved_resources<T, V>(self, v: T) -> Self
pub fn set_reserved_resources<T, V>(self, v: T) -> Self
Sets the value of reserved_resources.
§Example
ⓘ
use google_cloud_compute_v1::model::AllocationAggregateReservationReservedResourceInfo;
let x = AllocationAggregateReservation::new()
.set_reserved_resources([
AllocationAggregateReservationReservedResourceInfo::default()/* use setters */,
AllocationAggregateReservationReservedResourceInfo::default()/* use (different) setters */,
]);Sourcepub fn set_vm_family<T>(self, v: T) -> Self
pub fn set_vm_family<T>(self, v: T) -> Self
Sets the value of vm_family.
§Example
ⓘ
use google_cloud_compute_v1::model::allocation_aggregate_reservation::VmFamily;
let x0 = AllocationAggregateReservation::new().set_vm_family(VmFamily::CloudTpuLiteDeviceCt5L);
let x1 = AllocationAggregateReservation::new().set_vm_family(VmFamily::CloudTpuLitePodSliceCt5Lp);
let x2 = AllocationAggregateReservation::new().set_vm_family(VmFamily::CloudTpuLitePodSliceCt6E);Sourcepub fn set_or_clear_vm_family<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_vm_family<T>(self, v: Option<T>) -> Self
Sets or clears the value of vm_family.
§Example
ⓘ
use google_cloud_compute_v1::model::allocation_aggregate_reservation::VmFamily;
let x0 = AllocationAggregateReservation::new().set_or_clear_vm_family(Some(VmFamily::CloudTpuLiteDeviceCt5L));
let x1 = AllocationAggregateReservation::new().set_or_clear_vm_family(Some(VmFamily::CloudTpuLitePodSliceCt5Lp));
let x2 = AllocationAggregateReservation::new().set_or_clear_vm_family(Some(VmFamily::CloudTpuLitePodSliceCt6E));
let x_none = AllocationAggregateReservation::new().set_or_clear_vm_family(None::<VmFamily>);Sourcepub fn set_workload_type<T>(self, v: T) -> Selfwhere
T: Into<WorkloadType>,
pub fn set_workload_type<T>(self, v: T) -> Selfwhere
T: Into<WorkloadType>,
Sets the value of workload_type.
§Example
ⓘ
use google_cloud_compute_v1::model::allocation_aggregate_reservation::WorkloadType;
let x0 = AllocationAggregateReservation::new().set_workload_type(WorkloadType::Serving);
let x1 = AllocationAggregateReservation::new().set_workload_type(WorkloadType::Unspecified);Sourcepub fn set_or_clear_workload_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<WorkloadType>,
pub fn set_or_clear_workload_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<WorkloadType>,
Sets or clears the value of workload_type.
§Example
ⓘ
use google_cloud_compute_v1::model::allocation_aggregate_reservation::WorkloadType;
let x0 = AllocationAggregateReservation::new().set_or_clear_workload_type(Some(WorkloadType::Serving));
let x1 = AllocationAggregateReservation::new().set_or_clear_workload_type(Some(WorkloadType::Unspecified));
let x_none = AllocationAggregateReservation::new().set_or_clear_workload_type(None::<WorkloadType>);Trait Implementations§
Source§impl Clone for AllocationAggregateReservation
impl Clone for AllocationAggregateReservation
Source§fn clone(&self) -> AllocationAggregateReservation
fn clone(&self) -> AllocationAggregateReservation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for AllocationAggregateReservation
impl Default for AllocationAggregateReservation
Source§fn default() -> AllocationAggregateReservation
fn default() -> AllocationAggregateReservation
Returns the “default value” for a type. Read more
Source§impl PartialEq for AllocationAggregateReservation
impl PartialEq for AllocationAggregateReservation
Source§fn eq(&self, other: &AllocationAggregateReservation) -> bool
fn eq(&self, other: &AllocationAggregateReservation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AllocationAggregateReservation
Auto Trait Implementations§
impl Freeze for AllocationAggregateReservation
impl RefUnwindSafe for AllocationAggregateReservation
impl Send for AllocationAggregateReservation
impl Sync for AllocationAggregateReservation
impl Unpin for AllocationAggregateReservation
impl UnwindSafe for AllocationAggregateReservation
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
Mutably borrows from an owned value. Read more