aws_sdk_config/types/
_aggregation_authorization.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AggregationAuthorization {
7 pub aggregation_authorization_arn: ::std::option::Option<::std::string::String>,
9 pub authorized_account_id: ::std::option::Option<::std::string::String>,
11 pub authorized_aws_region: ::std::option::Option<::std::string::String>,
13 pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
15}
16impl AggregationAuthorization {
17 pub fn aggregation_authorization_arn(&self) -> ::std::option::Option<&str> {
19 self.aggregation_authorization_arn.as_deref()
20 }
21 pub fn authorized_account_id(&self) -> ::std::option::Option<&str> {
23 self.authorized_account_id.as_deref()
24 }
25 pub fn authorized_aws_region(&self) -> ::std::option::Option<&str> {
27 self.authorized_aws_region.as_deref()
28 }
29 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
31 self.creation_time.as_ref()
32 }
33}
34impl AggregationAuthorization {
35 pub fn builder() -> crate::types::builders::AggregationAuthorizationBuilder {
37 crate::types::builders::AggregationAuthorizationBuilder::default()
38 }
39}
40
41#[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 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 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 pub fn get_aggregation_authorization_arn(&self) -> &::std::option::Option<::std::string::String> {
63 &self.aggregation_authorization_arn
64 }
65 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 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 pub fn get_authorized_account_id(&self) -> &::std::option::Option<::std::string::String> {
77 &self.authorized_account_id
78 }
79 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 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 pub fn get_authorized_aws_region(&self) -> &::std::option::Option<::std::string::String> {
91 &self.authorized_aws_region
92 }
93 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 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 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
105 &self.creation_time
106 }
107 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}