#[non_exhaustive]pub struct FutureResourcesSpecAggregateResources {
pub accelerator_count: Option<i64>,
pub vm_family: Option<VmFamily>,
pub workload_type: Option<WorkloadType>,
/* private fields */
}Available on crate feature
advice only.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.accelerator_count: Option<i64>Size of the request, in accelerator (chip) count.
vm_family: Option<VmFamily>The VM family that all instances scheduled against this reservation must belong to. Use for TPU reservations.
workload_type: Option<WorkloadType>Workload type. Use for TPU reservations.
Implementations§
Source§impl FutureResourcesSpecAggregateResources
impl FutureResourcesSpecAggregateResources
pub fn new() -> Self
Sourcepub fn set_accelerator_count<T>(self, v: T) -> Self
pub fn set_accelerator_count<T>(self, v: T) -> Self
Sets the value of accelerator_count.
§Example
ⓘ
let x = FutureResourcesSpecAggregateResources::new().set_accelerator_count(42);Sourcepub fn set_or_clear_accelerator_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_accelerator_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of accelerator_count.
§Example
ⓘ
let x = FutureResourcesSpecAggregateResources::new().set_or_clear_accelerator_count(Some(42));
let x = FutureResourcesSpecAggregateResources::new().set_or_clear_accelerator_count(None::<i32>);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::future_resources_spec_aggregate_resources::VmFamily;
let x0 = FutureResourcesSpecAggregateResources::new().set_vm_family(VmFamily::CloudTpuLiteDeviceCt5L);
let x1 = FutureResourcesSpecAggregateResources::new().set_vm_family(VmFamily::CloudTpuLitePodSliceCt5Lp);
let x2 = FutureResourcesSpecAggregateResources::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::future_resources_spec_aggregate_resources::VmFamily;
let x0 = FutureResourcesSpecAggregateResources::new().set_or_clear_vm_family(Some(VmFamily::CloudTpuLiteDeviceCt5L));
let x1 = FutureResourcesSpecAggregateResources::new().set_or_clear_vm_family(Some(VmFamily::CloudTpuLitePodSliceCt5Lp));
let x2 = FutureResourcesSpecAggregateResources::new().set_or_clear_vm_family(Some(VmFamily::CloudTpuLitePodSliceCt6E));
let x_none = FutureResourcesSpecAggregateResources::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::future_resources_spec_aggregate_resources::WorkloadType;
let x0 = FutureResourcesSpecAggregateResources::new().set_workload_type(WorkloadType::Serving);
let x1 = FutureResourcesSpecAggregateResources::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::future_resources_spec_aggregate_resources::WorkloadType;
let x0 = FutureResourcesSpecAggregateResources::new().set_or_clear_workload_type(Some(WorkloadType::Serving));
let x1 = FutureResourcesSpecAggregateResources::new().set_or_clear_workload_type(Some(WorkloadType::Unspecified));
let x_none = FutureResourcesSpecAggregateResources::new().set_or_clear_workload_type(None::<WorkloadType>);Trait Implementations§
Source§impl Clone for FutureResourcesSpecAggregateResources
impl Clone for FutureResourcesSpecAggregateResources
Source§fn clone(&self) -> FutureResourcesSpecAggregateResources
fn clone(&self) -> FutureResourcesSpecAggregateResources
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 FutureResourcesSpecAggregateResources
impl Default for FutureResourcesSpecAggregateResources
Source§fn default() -> FutureResourcesSpecAggregateResources
fn default() -> FutureResourcesSpecAggregateResources
Returns the “default value” for a type. Read more
Source§impl PartialEq for FutureResourcesSpecAggregateResources
impl PartialEq for FutureResourcesSpecAggregateResources
Source§fn eq(&self, other: &FutureResourcesSpecAggregateResources) -> bool
fn eq(&self, other: &FutureResourcesSpecAggregateResources) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FutureResourcesSpecAggregateResources
Auto Trait Implementations§
impl Freeze for FutureResourcesSpecAggregateResources
impl RefUnwindSafe for FutureResourcesSpecAggregateResources
impl Send for FutureResourcesSpecAggregateResources
impl Sync for FutureResourcesSpecAggregateResources
impl Unpin for FutureResourcesSpecAggregateResources
impl UnwindSafe for FutureResourcesSpecAggregateResources
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