aws_sdk_costoptimizationhub/operation/update_preferences/
_update_preferences_input.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePreferencesInput {
pub savings_estimation_mode: ::std::option::Option<crate::types::SavingsEstimationMode>,
pub member_account_discount_visibility: ::std::option::Option<crate::types::MemberAccountDiscountVisibility>,
}
impl UpdatePreferencesInput {
pub fn savings_estimation_mode(&self) -> ::std::option::Option<&crate::types::SavingsEstimationMode> {
self.savings_estimation_mode.as_ref()
}
pub fn member_account_discount_visibility(&self) -> ::std::option::Option<&crate::types::MemberAccountDiscountVisibility> {
self.member_account_discount_visibility.as_ref()
}
}
impl UpdatePreferencesInput {
pub fn builder() -> crate::operation::update_preferences::builders::UpdatePreferencesInputBuilder {
crate::operation::update_preferences::builders::UpdatePreferencesInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdatePreferencesInputBuilder {
pub(crate) savings_estimation_mode: ::std::option::Option<crate::types::SavingsEstimationMode>,
pub(crate) member_account_discount_visibility: ::std::option::Option<crate::types::MemberAccountDiscountVisibility>,
}
impl UpdatePreferencesInputBuilder {
pub fn savings_estimation_mode(mut self, input: crate::types::SavingsEstimationMode) -> Self {
self.savings_estimation_mode = ::std::option::Option::Some(input);
self
}
pub fn set_savings_estimation_mode(mut self, input: ::std::option::Option<crate::types::SavingsEstimationMode>) -> Self {
self.savings_estimation_mode = input;
self
}
pub fn get_savings_estimation_mode(&self) -> &::std::option::Option<crate::types::SavingsEstimationMode> {
&self.savings_estimation_mode
}
pub fn member_account_discount_visibility(mut self, input: crate::types::MemberAccountDiscountVisibility) -> Self {
self.member_account_discount_visibility = ::std::option::Option::Some(input);
self
}
pub fn set_member_account_discount_visibility(mut self, input: ::std::option::Option<crate::types::MemberAccountDiscountVisibility>) -> Self {
self.member_account_discount_visibility = input;
self
}
pub fn get_member_account_discount_visibility(&self) -> &::std::option::Option<crate::types::MemberAccountDiscountVisibility> {
&self.member_account_discount_visibility
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_preferences::UpdatePreferencesInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_preferences::UpdatePreferencesInput {
savings_estimation_mode: self.savings_estimation_mode,
member_account_discount_visibility: self.member_account_discount_visibility,
})
}
}