#[non_exhaustive]pub struct ComputeResourceConfig {
pub config: Option<Config>,
/* private fields */
}Expand description
Describes how a compute resource should be created at runtime.
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.config: Option<Config>Particular type of configuration for this compute resource.
Implementations§
Source§impl ComputeResourceConfig
impl ComputeResourceConfig
Sourcepub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
pub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
Sets the value of config.
Note that all the setters affecting config are mutually
exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NewOnDemandInstancesConfig;
let x = ComputeResourceConfig::new().set_config(Some(
google_cloud_hypercomputecluster_v1::model::compute_resource_config::Config::NewOnDemandInstances(NewOnDemandInstancesConfig::default().into())));Sourcepub fn new_on_demand_instances(
&self,
) -> Option<&Box<NewOnDemandInstancesConfig>>
pub fn new_on_demand_instances( &self, ) -> Option<&Box<NewOnDemandInstancesConfig>>
The value of config
if it holds a NewOnDemandInstances, None if the field is not set or
holds a different branch.
Sourcepub fn set_new_on_demand_instances<T: Into<Box<NewOnDemandInstancesConfig>>>(
self,
v: T,
) -> Self
pub fn set_new_on_demand_instances<T: Into<Box<NewOnDemandInstancesConfig>>>( self, v: T, ) -> Self
Sets the value of config
to hold a NewOnDemandInstances.
Note that all the setters affecting config are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NewOnDemandInstancesConfig;
let x = ComputeResourceConfig::new().set_new_on_demand_instances(NewOnDemandInstancesConfig::default()/* use setters */);
assert!(x.new_on_demand_instances().is_some());
assert!(x.new_spot_instances().is_none());
assert!(x.new_reserved_instances().is_none());
assert!(x.new_flex_start_instances().is_none());Sourcepub fn new_spot_instances(&self) -> Option<&Box<NewSpotInstancesConfig>>
pub fn new_spot_instances(&self) -> Option<&Box<NewSpotInstancesConfig>>
The value of config
if it holds a NewSpotInstances, None if the field is not set or
holds a different branch.
Sourcepub fn set_new_spot_instances<T: Into<Box<NewSpotInstancesConfig>>>(
self,
v: T,
) -> Self
pub fn set_new_spot_instances<T: Into<Box<NewSpotInstancesConfig>>>( self, v: T, ) -> Self
Sets the value of config
to hold a NewSpotInstances.
Note that all the setters affecting config are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NewSpotInstancesConfig;
let x = ComputeResourceConfig::new().set_new_spot_instances(NewSpotInstancesConfig::default()/* use setters */);
assert!(x.new_spot_instances().is_some());
assert!(x.new_on_demand_instances().is_none());
assert!(x.new_reserved_instances().is_none());
assert!(x.new_flex_start_instances().is_none());Sourcepub fn new_reserved_instances(&self) -> Option<&Box<NewReservedInstancesConfig>>
pub fn new_reserved_instances(&self) -> Option<&Box<NewReservedInstancesConfig>>
The value of config
if it holds a NewReservedInstances, None if the field is not set or
holds a different branch.
Sourcepub fn set_new_reserved_instances<T: Into<Box<NewReservedInstancesConfig>>>(
self,
v: T,
) -> Self
pub fn set_new_reserved_instances<T: Into<Box<NewReservedInstancesConfig>>>( self, v: T, ) -> Self
Sets the value of config
to hold a NewReservedInstances.
Note that all the setters affecting config are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NewReservedInstancesConfig;
let x = ComputeResourceConfig::new().set_new_reserved_instances(NewReservedInstancesConfig::default()/* use setters */);
assert!(x.new_reserved_instances().is_some());
assert!(x.new_on_demand_instances().is_none());
assert!(x.new_spot_instances().is_none());
assert!(x.new_flex_start_instances().is_none());Sourcepub fn new_flex_start_instances(
&self,
) -> Option<&Box<NewFlexStartInstancesConfig>>
pub fn new_flex_start_instances( &self, ) -> Option<&Box<NewFlexStartInstancesConfig>>
The value of config
if it holds a NewFlexStartInstances, None if the field is not set or
holds a different branch.
Sourcepub fn set_new_flex_start_instances<T: Into<Box<NewFlexStartInstancesConfig>>>(
self,
v: T,
) -> Self
pub fn set_new_flex_start_instances<T: Into<Box<NewFlexStartInstancesConfig>>>( self, v: T, ) -> Self
Sets the value of config
to hold a NewFlexStartInstances.
Note that all the setters affecting config are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::NewFlexStartInstancesConfig;
let x = ComputeResourceConfig::new().set_new_flex_start_instances(NewFlexStartInstancesConfig::default()/* use setters */);
assert!(x.new_flex_start_instances().is_some());
assert!(x.new_on_demand_instances().is_none());
assert!(x.new_spot_instances().is_none());
assert!(x.new_reserved_instances().is_none());Trait Implementations§
Source§impl Clone for ComputeResourceConfig
impl Clone for ComputeResourceConfig
Source§fn clone(&self) -> ComputeResourceConfig
fn clone(&self) -> ComputeResourceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputeResourceConfig
impl Debug for ComputeResourceConfig
Source§impl Default for ComputeResourceConfig
impl Default for ComputeResourceConfig
Source§fn default() -> ComputeResourceConfig
fn default() -> ComputeResourceConfig
Source§impl Message for ComputeResourceConfig
impl Message for ComputeResourceConfig
Source§impl PartialEq for ComputeResourceConfig
impl PartialEq for ComputeResourceConfig
impl StructuralPartialEq for ComputeResourceConfig
Auto Trait Implementations§
impl Freeze for ComputeResourceConfig
impl RefUnwindSafe for ComputeResourceConfig
impl Send for ComputeResourceConfig
impl Sync for ComputeResourceConfig
impl Unpin for ComputeResourceConfig
impl UnsafeUnpin for ComputeResourceConfig
impl UnwindSafe for ComputeResourceConfig
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