#[non_exhaustive]pub struct CostProjection {
pub cost: Option<Money>,
pub duration: Option<Duration>,
pub cost_in_local_currency: Option<Money>,
/* private fields */
}Expand description
Contains metadata about how much money a recommendation can save or incur.
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.cost: Option<Money>An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units.
A user’s permissions may affect whether the cost is computed using list prices or custom contract prices.
duration: Option<Duration>Duration for which this cost applies.
cost_in_local_currency: Option<Money>The approximate cost savings in the billing account’s local currency.
Implementations§
Source§impl CostProjection
impl CostProjection
Sourcepub fn set_or_clear_cost<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cost<T>(self, v: Option<T>) -> Self
Sourcepub fn set_duration<T>(self, v: T) -> Self
pub fn set_duration<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_duration<T>(self, v: Option<T>) -> Self
Sourcepub fn set_cost_in_local_currency<T>(self, v: T) -> Self
pub fn set_cost_in_local_currency<T>(self, v: T) -> Self
Sets the value of cost_in_local_currency.
§Example
ⓘ
use google_cloud_type::model::Money;
let x = CostProjection::new().set_cost_in_local_currency(Money::default()/* use setters */);Sourcepub fn set_or_clear_cost_in_local_currency<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_cost_in_local_currency<T>(self, v: Option<T>) -> Self
Sets or clears the value of cost_in_local_currency.
§Example
ⓘ
use google_cloud_type::model::Money;
let x = CostProjection::new().set_or_clear_cost_in_local_currency(Some(Money::default()/* use setters */));
let x = CostProjection::new().set_or_clear_cost_in_local_currency(None::<Money>);Trait Implementations§
Source§impl Clone for CostProjection
impl Clone for CostProjection
Source§fn clone(&self) -> CostProjection
fn clone(&self) -> CostProjection
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 Debug for CostProjection
impl Debug for CostProjection
Source§impl Default for CostProjection
impl Default for CostProjection
Source§fn default() -> CostProjection
fn default() -> CostProjection
Returns the “default value” for a type. Read more
Source§impl Message for CostProjection
impl Message for CostProjection
Source§impl PartialEq for CostProjection
impl PartialEq for CostProjection
impl StructuralPartialEq for CostProjection
Auto Trait Implementations§
impl Freeze for CostProjection
impl RefUnwindSafe for CostProjection
impl Send for CostProjection
impl Sync for CostProjection
impl Unpin for CostProjection
impl UnsafeUnpin for CostProjection
impl UnwindSafe for CostProjection
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