aws_sdk_costoptimizationhub/operation/update_preferences/
_update_preferences_input.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePreferencesInput {
    /// <p>Sets the "savings estimation mode" preference.</p>
    pub savings_estimation_mode: ::std::option::Option<crate::types::SavingsEstimationMode>,
    /// <p>Sets the "member account discount visibility" preference.</p>
    pub member_account_discount_visibility: ::std::option::Option<crate::types::MemberAccountDiscountVisibility>,
}
impl UpdatePreferencesInput {
    /// <p>Sets the "savings estimation mode" preference.</p>
    pub fn savings_estimation_mode(&self) -> ::std::option::Option<&crate::types::SavingsEstimationMode> {
        self.savings_estimation_mode.as_ref()
    }
    /// <p>Sets the "member account discount visibility" preference.</p>
    pub fn member_account_discount_visibility(&self) -> ::std::option::Option<&crate::types::MemberAccountDiscountVisibility> {
        self.member_account_discount_visibility.as_ref()
    }
}
impl UpdatePreferencesInput {
    /// Creates a new builder-style object to manufacture [`UpdatePreferencesInput`](crate::operation::update_preferences::UpdatePreferencesInput).
    pub fn builder() -> crate::operation::update_preferences::builders::UpdatePreferencesInputBuilder {
        crate::operation::update_preferences::builders::UpdatePreferencesInputBuilder::default()
    }
}

/// A builder for [`UpdatePreferencesInput`](crate::operation::update_preferences::UpdatePreferencesInput).
#[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 {
    /// <p>Sets the "savings estimation mode" preference.</p>
    pub fn savings_estimation_mode(mut self, input: crate::types::SavingsEstimationMode) -> Self {
        self.savings_estimation_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>Sets the "savings estimation mode" preference.</p>
    pub fn set_savings_estimation_mode(mut self, input: ::std::option::Option<crate::types::SavingsEstimationMode>) -> Self {
        self.savings_estimation_mode = input;
        self
    }
    /// <p>Sets the "savings estimation mode" preference.</p>
    pub fn get_savings_estimation_mode(&self) -> &::std::option::Option<crate::types::SavingsEstimationMode> {
        &self.savings_estimation_mode
    }
    /// <p>Sets the "member account discount visibility" preference.</p>
    pub fn member_account_discount_visibility(mut self, input: crate::types::MemberAccountDiscountVisibility) -> Self {
        self.member_account_discount_visibility = ::std::option::Option::Some(input);
        self
    }
    /// <p>Sets the "member account discount visibility" preference.</p>
    pub fn set_member_account_discount_visibility(mut self, input: ::std::option::Option<crate::types::MemberAccountDiscountVisibility>) -> Self {
        self.member_account_discount_visibility = input;
        self
    }
    /// <p>Sets the "member account discount visibility" preference.</p>
    pub fn get_member_account_discount_visibility(&self) -> &::std::option::Option<crate::types::MemberAccountDiscountVisibility> {
        &self.member_account_discount_visibility
    }
    /// Consumes the builder and constructs a [`UpdatePreferencesInput`](crate::operation::update_preferences::UpdatePreferencesInput).
    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,
        })
    }
}