#[non_exhaustive]pub struct Impact {
pub category: Category,
pub projection: Option<Projection>,
/* private fields */
}Expand description
Contains the impact a recommendation can have for a given category.
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.category: CategoryCategory that is being targeted.
projection: Option<Projection>Contains projections (if any) for this category.
Implementations§
Source§impl Impact
impl Impact
Sourcepub fn set_category<T: Into<Category>>(self, v: T) -> Self
pub fn set_category<T: Into<Category>>(self, v: T) -> Self
Sourcepub fn set_projection<T: Into<Option<Projection>>>(self, v: T) -> Self
pub fn set_projection<T: Into<Option<Projection>>>(self, v: T) -> Self
Sets the value of projection.
Note that all the setters affecting projection are mutually
exclusive.
§Example
use google_cloud_recommender_v1::model::CostProjection;
let x = Impact::new().set_projection(Some(
google_cloud_recommender_v1::model::impact::Projection::CostProjection(CostProjection::default().into())));Sourcepub fn cost_projection(&self) -> Option<&Box<CostProjection>>
pub fn cost_projection(&self) -> Option<&Box<CostProjection>>
The value of projection
if it holds a CostProjection, None if the field is not set or
holds a different branch.
Sourcepub fn set_cost_projection<T: Into<Box<CostProjection>>>(self, v: T) -> Self
pub fn set_cost_projection<T: Into<Box<CostProjection>>>(self, v: T) -> Self
Sets the value of projection
to hold a CostProjection.
Note that all the setters affecting projection are
mutually exclusive.
§Example
use google_cloud_recommender_v1::model::CostProjection;
let x = Impact::new().set_cost_projection(CostProjection::default()/* use setters */);
assert!(x.cost_projection().is_some());
assert!(x.security_projection().is_none());
assert!(x.sustainability_projection().is_none());
assert!(x.reliability_projection().is_none());Sourcepub fn security_projection(&self) -> Option<&Box<SecurityProjection>>
pub fn security_projection(&self) -> Option<&Box<SecurityProjection>>
The value of projection
if it holds a SecurityProjection, None if the field is not set or
holds a different branch.
Sourcepub fn set_security_projection<T: Into<Box<SecurityProjection>>>(
self,
v: T,
) -> Self
pub fn set_security_projection<T: Into<Box<SecurityProjection>>>( self, v: T, ) -> Self
Sets the value of projection
to hold a SecurityProjection.
Note that all the setters affecting projection are
mutually exclusive.
§Example
use google_cloud_recommender_v1::model::SecurityProjection;
let x = Impact::new().set_security_projection(SecurityProjection::default()/* use setters */);
assert!(x.security_projection().is_some());
assert!(x.cost_projection().is_none());
assert!(x.sustainability_projection().is_none());
assert!(x.reliability_projection().is_none());Sourcepub fn sustainability_projection(
&self,
) -> Option<&Box<SustainabilityProjection>>
pub fn sustainability_projection( &self, ) -> Option<&Box<SustainabilityProjection>>
The value of projection
if it holds a SustainabilityProjection, None if the field is not set or
holds a different branch.
Sourcepub fn set_sustainability_projection<T: Into<Box<SustainabilityProjection>>>(
self,
v: T,
) -> Self
pub fn set_sustainability_projection<T: Into<Box<SustainabilityProjection>>>( self, v: T, ) -> Self
Sets the value of projection
to hold a SustainabilityProjection.
Note that all the setters affecting projection are
mutually exclusive.
§Example
use google_cloud_recommender_v1::model::SustainabilityProjection;
let x = Impact::new().set_sustainability_projection(SustainabilityProjection::default()/* use setters */);
assert!(x.sustainability_projection().is_some());
assert!(x.cost_projection().is_none());
assert!(x.security_projection().is_none());
assert!(x.reliability_projection().is_none());Sourcepub fn reliability_projection(&self) -> Option<&Box<ReliabilityProjection>>
pub fn reliability_projection(&self) -> Option<&Box<ReliabilityProjection>>
The value of projection
if it holds a ReliabilityProjection, None if the field is not set or
holds a different branch.
Sourcepub fn set_reliability_projection<T: Into<Box<ReliabilityProjection>>>(
self,
v: T,
) -> Self
pub fn set_reliability_projection<T: Into<Box<ReliabilityProjection>>>( self, v: T, ) -> Self
Sets the value of projection
to hold a ReliabilityProjection.
Note that all the setters affecting projection are
mutually exclusive.
§Example
use google_cloud_recommender_v1::model::ReliabilityProjection;
let x = Impact::new().set_reliability_projection(ReliabilityProjection::default()/* use setters */);
assert!(x.reliability_projection().is_some());
assert!(x.cost_projection().is_none());
assert!(x.security_projection().is_none());
assert!(x.sustainability_projection().is_none());