aws_sdk_config/types/
_aggregation_authorization.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object that represents the authorizations granted to aggregator accounts and regions.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AggregationAuthorization {
7    /// <p>The Amazon Resource Name (ARN) of the aggregation object.</p>
8    pub aggregation_authorization_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
10    pub authorized_account_id: ::std::option::Option<::std::string::String>,
11    /// <p>The region authorized to collect aggregated data.</p>
12    pub authorized_aws_region: ::std::option::Option<::std::string::String>,
13    /// <p>The time stamp when the aggregation authorization was created.</p>
14    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
15}
16impl AggregationAuthorization {
17    /// <p>The Amazon Resource Name (ARN) of the aggregation object.</p>
18    pub fn aggregation_authorization_arn(&self) -> ::std::option::Option<&str> {
19        self.aggregation_authorization_arn.as_deref()
20    }
21    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
22    pub fn authorized_account_id(&self) -> ::std::option::Option<&str> {
23        self.authorized_account_id.as_deref()
24    }
25    /// <p>The region authorized to collect aggregated data.</p>
26    pub fn authorized_aws_region(&self) -> ::std::option::Option<&str> {
27        self.authorized_aws_region.as_deref()
28    }
29    /// <p>The time stamp when the aggregation authorization was created.</p>
30    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31        self.creation_time.as_ref()
32    }
33}
34impl AggregationAuthorization {
35    /// Creates a new builder-style object to manufacture [`AggregationAuthorization`](crate::types::AggregationAuthorization).
36    pub fn builder() -> crate::types::builders::AggregationAuthorizationBuilder {
37        crate::types::builders::AggregationAuthorizationBuilder::default()
38    }
39}
40
41/// A builder for [`AggregationAuthorization`](crate::types::AggregationAuthorization).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct AggregationAuthorizationBuilder {
45    pub(crate) aggregation_authorization_arn: ::std::option::Option<::std::string::String>,
46    pub(crate) authorized_account_id: ::std::option::Option<::std::string::String>,
47    pub(crate) authorized_aws_region: ::std::option::Option<::std::string::String>,
48    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
49}
50impl AggregationAuthorizationBuilder {
51    /// <p>The Amazon Resource Name (ARN) of the aggregation object.</p>
52    pub fn aggregation_authorization_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.aggregation_authorization_arn = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The Amazon Resource Name (ARN) of the aggregation object.</p>
57    pub fn set_aggregation_authorization_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.aggregation_authorization_arn = input;
59        self
60    }
61    /// <p>The Amazon Resource Name (ARN) of the aggregation object.</p>
62    pub fn get_aggregation_authorization_arn(&self) -> &::std::option::Option<::std::string::String> {
63        &self.aggregation_authorization_arn
64    }
65    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
66    pub fn authorized_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.authorized_account_id = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
71    pub fn set_authorized_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.authorized_account_id = input;
73        self
74    }
75    /// <p>The 12-digit account ID of the account authorized to aggregate data.</p>
76    pub fn get_authorized_account_id(&self) -> &::std::option::Option<::std::string::String> {
77        &self.authorized_account_id
78    }
79    /// <p>The region authorized to collect aggregated data.</p>
80    pub fn authorized_aws_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.authorized_aws_region = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The region authorized to collect aggregated data.</p>
85    pub fn set_authorized_aws_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.authorized_aws_region = input;
87        self
88    }
89    /// <p>The region authorized to collect aggregated data.</p>
90    pub fn get_authorized_aws_region(&self) -> &::std::option::Option<::std::string::String> {
91        &self.authorized_aws_region
92    }
93    /// <p>The time stamp when the aggregation authorization was created.</p>
94    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
95        self.creation_time = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>The time stamp when the aggregation authorization was created.</p>
99    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
100        self.creation_time = input;
101        self
102    }
103    /// <p>The time stamp when the aggregation authorization was created.</p>
104    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
105        &self.creation_time
106    }
107    /// Consumes the builder and constructs a [`AggregationAuthorization`](crate::types::AggregationAuthorization).
108    pub fn build(self) -> crate::types::AggregationAuthorization {
109        crate::types::AggregationAuthorization {
110            aggregation_authorization_arn: self.aggregation_authorization_arn,
111            authorized_account_id: self.authorized_account_id,
112            authorized_aws_region: self.authorized_aws_region,
113            creation_time: self.creation_time,
114        }
115    }
116}