aws_sdk_billingconductor/operation/update_billing_group/
_update_billing_group_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateBillingGroupInput {
6    /// <p>The Amazon Resource Name (ARN) of the billing group being updated.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the billing group. The names must be unique to each billing group.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The status of the billing group. Only one of the valid values can be used.</p>
11    pub status: ::std::option::Option<crate::types::BillingGroupStatus>,
12    /// <p>The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.</p>
13    pub computation_preference: ::std::option::Option<crate::types::ComputationPreference>,
14    /// <p>A description of the billing group.</p>
15    pub description: ::std::option::Option<::std::string::String>,
16    /// <p>Specifies if the billing group has automatic account association (<code>AutoAssociate</code>) enabled.</p>
17    pub account_grouping: ::std::option::Option<crate::types::UpdateBillingGroupAccountGrouping>,
18}
19impl UpdateBillingGroupInput {
20    /// <p>The Amazon Resource Name (ARN) of the billing group being updated.</p>
21    pub fn arn(&self) -> ::std::option::Option<&str> {
22        self.arn.as_deref()
23    }
24    /// <p>The name of the billing group. The names must be unique to each billing group.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The status of the billing group. Only one of the valid values can be used.</p>
29    pub fn status(&self) -> ::std::option::Option<&crate::types::BillingGroupStatus> {
30        self.status.as_ref()
31    }
32    /// <p>The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.</p>
33    pub fn computation_preference(&self) -> ::std::option::Option<&crate::types::ComputationPreference> {
34        self.computation_preference.as_ref()
35    }
36    /// <p>A description of the billing group.</p>
37    pub fn description(&self) -> ::std::option::Option<&str> {
38        self.description.as_deref()
39    }
40    /// <p>Specifies if the billing group has automatic account association (<code>AutoAssociate</code>) enabled.</p>
41    pub fn account_grouping(&self) -> ::std::option::Option<&crate::types::UpdateBillingGroupAccountGrouping> {
42        self.account_grouping.as_ref()
43    }
44}
45impl ::std::fmt::Debug for UpdateBillingGroupInput {
46    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
47        let mut formatter = f.debug_struct("UpdateBillingGroupInput");
48        formatter.field("arn", &self.arn);
49        formatter.field("name", &"*** Sensitive Data Redacted ***");
50        formatter.field("status", &self.status);
51        formatter.field("computation_preference", &self.computation_preference);
52        formatter.field("description", &"*** Sensitive Data Redacted ***");
53        formatter.field("account_grouping", &self.account_grouping);
54        formatter.finish()
55    }
56}
57impl UpdateBillingGroupInput {
58    /// Creates a new builder-style object to manufacture [`UpdateBillingGroupInput`](crate::operation::update_billing_group::UpdateBillingGroupInput).
59    pub fn builder() -> crate::operation::update_billing_group::builders::UpdateBillingGroupInputBuilder {
60        crate::operation::update_billing_group::builders::UpdateBillingGroupInputBuilder::default()
61    }
62}
63
64/// A builder for [`UpdateBillingGroupInput`](crate::operation::update_billing_group::UpdateBillingGroupInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
66#[non_exhaustive]
67pub struct UpdateBillingGroupInputBuilder {
68    pub(crate) arn: ::std::option::Option<::std::string::String>,
69    pub(crate) name: ::std::option::Option<::std::string::String>,
70    pub(crate) status: ::std::option::Option<crate::types::BillingGroupStatus>,
71    pub(crate) computation_preference: ::std::option::Option<crate::types::ComputationPreference>,
72    pub(crate) description: ::std::option::Option<::std::string::String>,
73    pub(crate) account_grouping: ::std::option::Option<crate::types::UpdateBillingGroupAccountGrouping>,
74}
75impl UpdateBillingGroupInputBuilder {
76    /// <p>The Amazon Resource Name (ARN) of the billing group being updated.</p>
77    /// This field is required.
78    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79        self.arn = ::std::option::Option::Some(input.into());
80        self
81    }
82    /// <p>The Amazon Resource Name (ARN) of the billing group being updated.</p>
83    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.arn = input;
85        self
86    }
87    /// <p>The Amazon Resource Name (ARN) of the billing group being updated.</p>
88    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
89        &self.arn
90    }
91    /// <p>The name of the billing group. The names must be unique to each billing group.</p>
92    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93        self.name = ::std::option::Option::Some(input.into());
94        self
95    }
96    /// <p>The name of the billing group. The names must be unique to each billing group.</p>
97    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.name = input;
99        self
100    }
101    /// <p>The name of the billing group. The names must be unique to each billing group.</p>
102    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
103        &self.name
104    }
105    /// <p>The status of the billing group. Only one of the valid values can be used.</p>
106    pub fn status(mut self, input: crate::types::BillingGroupStatus) -> Self {
107        self.status = ::std::option::Option::Some(input);
108        self
109    }
110    /// <p>The status of the billing group. Only one of the valid values can be used.</p>
111    pub fn set_status(mut self, input: ::std::option::Option<crate::types::BillingGroupStatus>) -> Self {
112        self.status = input;
113        self
114    }
115    /// <p>The status of the billing group. Only one of the valid values can be used.</p>
116    pub fn get_status(&self) -> &::std::option::Option<crate::types::BillingGroupStatus> {
117        &self.status
118    }
119    /// <p>The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.</p>
120    pub fn computation_preference(mut self, input: crate::types::ComputationPreference) -> Self {
121        self.computation_preference = ::std::option::Option::Some(input);
122        self
123    }
124    /// <p>The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.</p>
125    pub fn set_computation_preference(mut self, input: ::std::option::Option<crate::types::ComputationPreference>) -> Self {
126        self.computation_preference = input;
127        self
128    }
129    /// <p>The preferences and settings that will be used to compute the Amazon Web Services charges for a billing group.</p>
130    pub fn get_computation_preference(&self) -> &::std::option::Option<crate::types::ComputationPreference> {
131        &self.computation_preference
132    }
133    /// <p>A description of the billing group.</p>
134    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.description = ::std::option::Option::Some(input.into());
136        self
137    }
138    /// <p>A description of the billing group.</p>
139    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.description = input;
141        self
142    }
143    /// <p>A description of the billing group.</p>
144    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
145        &self.description
146    }
147    /// <p>Specifies if the billing group has automatic account association (<code>AutoAssociate</code>) enabled.</p>
148    pub fn account_grouping(mut self, input: crate::types::UpdateBillingGroupAccountGrouping) -> Self {
149        self.account_grouping = ::std::option::Option::Some(input);
150        self
151    }
152    /// <p>Specifies if the billing group has automatic account association (<code>AutoAssociate</code>) enabled.</p>
153    pub fn set_account_grouping(mut self, input: ::std::option::Option<crate::types::UpdateBillingGroupAccountGrouping>) -> Self {
154        self.account_grouping = input;
155        self
156    }
157    /// <p>Specifies if the billing group has automatic account association (<code>AutoAssociate</code>) enabled.</p>
158    pub fn get_account_grouping(&self) -> &::std::option::Option<crate::types::UpdateBillingGroupAccountGrouping> {
159        &self.account_grouping
160    }
161    /// Consumes the builder and constructs a [`UpdateBillingGroupInput`](crate::operation::update_billing_group::UpdateBillingGroupInput).
162    pub fn build(
163        self,
164    ) -> ::std::result::Result<crate::operation::update_billing_group::UpdateBillingGroupInput, ::aws_smithy_types::error::operation::BuildError>
165    {
166        ::std::result::Result::Ok(crate::operation::update_billing_group::UpdateBillingGroupInput {
167            arn: self.arn,
168            name: self.name,
169            status: self.status,
170            computation_preference: self.computation_preference,
171            description: self.description,
172            account_grouping: self.account_grouping,
173        })
174    }
175}
176impl ::std::fmt::Debug for UpdateBillingGroupInputBuilder {
177    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
178        let mut formatter = f.debug_struct("UpdateBillingGroupInputBuilder");
179        formatter.field("arn", &self.arn);
180        formatter.field("name", &"*** Sensitive Data Redacted ***");
181        formatter.field("status", &self.status);
182        formatter.field("computation_preference", &self.computation_preference);
183        formatter.field("description", &"*** Sensitive Data Redacted ***");
184        formatter.field("account_grouping", &self.account_grouping);
185        formatter.finish()
186    }
187}