aws_sdk_macie2/operation/get_member/
_get_member_output.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, ::std::fmt::Debug)]
5pub struct GetMemberOutput {
6    /// <p>The Amazon Web Services account ID for the account.</p>
7    pub account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Web Services account ID for the administrator account.</p>
9    pub administrator_account_id: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the account.</p>
11    pub arn: ::std::option::Option<::std::string::String>,
12    /// <p>The email address for the account. This value is null if the account is associated with the administrator account through Organizations.</p>
13    pub email: ::std::option::Option<::std::string::String>,
14    /// <p>The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie membership invitation hasn't been sent to the account.</p>
15    pub invited_at: ::std::option::Option<::aws_smithy_types::DateTime>,
16    /// <p>(Deprecated) The Amazon Web Services account ID for the administrator account. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
17    pub master_account_id: ::std::option::Option<::std::string::String>,
18    /// <p>The current status of the relationship between the account and the administrator account.</p>
19    pub relationship_status: ::std::option::Option<crate::types::RelationshipStatus>,
20    /// <p>A map of key-value pairs that specifies which tags (keys and values) are associated with the account in Amazon Macie.</p>
21    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22    /// <p>The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the relationship between the account and the administrator account.</p>
23    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24    _request_id: Option<String>,
25}
26impl GetMemberOutput {
27    /// <p>The Amazon Web Services account ID for the account.</p>
28    pub fn account_id(&self) -> ::std::option::Option<&str> {
29        self.account_id.as_deref()
30    }
31    /// <p>The Amazon Web Services account ID for the administrator account.</p>
32    pub fn administrator_account_id(&self) -> ::std::option::Option<&str> {
33        self.administrator_account_id.as_deref()
34    }
35    /// <p>The Amazon Resource Name (ARN) of the account.</p>
36    pub fn arn(&self) -> ::std::option::Option<&str> {
37        self.arn.as_deref()
38    }
39    /// <p>The email address for the account. This value is null if the account is associated with the administrator account through Organizations.</p>
40    pub fn email(&self) -> ::std::option::Option<&str> {
41        self.email.as_deref()
42    }
43    /// <p>The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie membership invitation hasn't been sent to the account.</p>
44    pub fn invited_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
45        self.invited_at.as_ref()
46    }
47    /// <p>(Deprecated) The Amazon Web Services account ID for the administrator account. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
48    pub fn master_account_id(&self) -> ::std::option::Option<&str> {
49        self.master_account_id.as_deref()
50    }
51    /// <p>The current status of the relationship between the account and the administrator account.</p>
52    pub fn relationship_status(&self) -> ::std::option::Option<&crate::types::RelationshipStatus> {
53        self.relationship_status.as_ref()
54    }
55    /// <p>A map of key-value pairs that specifies which tags (keys and values) are associated with the account in Amazon Macie.</p>
56    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
57        self.tags.as_ref()
58    }
59    /// <p>The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the relationship between the account and the administrator account.</p>
60    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61        self.updated_at.as_ref()
62    }
63}
64impl ::aws_types::request_id::RequestId for GetMemberOutput {
65    fn request_id(&self) -> Option<&str> {
66        self._request_id.as_deref()
67    }
68}
69impl GetMemberOutput {
70    /// Creates a new builder-style object to manufacture [`GetMemberOutput`](crate::operation::get_member::GetMemberOutput).
71    pub fn builder() -> crate::operation::get_member::builders::GetMemberOutputBuilder {
72        crate::operation::get_member::builders::GetMemberOutputBuilder::default()
73    }
74}
75
76/// A builder for [`GetMemberOutput`](crate::operation::get_member::GetMemberOutput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct GetMemberOutputBuilder {
80    pub(crate) account_id: ::std::option::Option<::std::string::String>,
81    pub(crate) administrator_account_id: ::std::option::Option<::std::string::String>,
82    pub(crate) arn: ::std::option::Option<::std::string::String>,
83    pub(crate) email: ::std::option::Option<::std::string::String>,
84    pub(crate) invited_at: ::std::option::Option<::aws_smithy_types::DateTime>,
85    pub(crate) master_account_id: ::std::option::Option<::std::string::String>,
86    pub(crate) relationship_status: ::std::option::Option<crate::types::RelationshipStatus>,
87    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
88    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
89    _request_id: Option<String>,
90}
91impl GetMemberOutputBuilder {
92    /// <p>The Amazon Web Services account ID for the account.</p>
93    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.account_id = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The Amazon Web Services account ID for the account.</p>
98    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.account_id = input;
100        self
101    }
102    /// <p>The Amazon Web Services account ID for the account.</p>
103    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
104        &self.account_id
105    }
106    /// <p>The Amazon Web Services account ID for the administrator account.</p>
107    pub fn administrator_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.administrator_account_id = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The Amazon Web Services account ID for the administrator account.</p>
112    pub fn set_administrator_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.administrator_account_id = input;
114        self
115    }
116    /// <p>The Amazon Web Services account ID for the administrator account.</p>
117    pub fn get_administrator_account_id(&self) -> &::std::option::Option<::std::string::String> {
118        &self.administrator_account_id
119    }
120    /// <p>The Amazon Resource Name (ARN) of the account.</p>
121    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122        self.arn = ::std::option::Option::Some(input.into());
123        self
124    }
125    /// <p>The Amazon Resource Name (ARN) of the account.</p>
126    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.arn = input;
128        self
129    }
130    /// <p>The Amazon Resource Name (ARN) of the account.</p>
131    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
132        &self.arn
133    }
134    /// <p>The email address for the account. This value is null if the account is associated with the administrator account through Organizations.</p>
135    pub fn email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.email = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>The email address for the account. This value is null if the account is associated with the administrator account through Organizations.</p>
140    pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.email = input;
142        self
143    }
144    /// <p>The email address for the account. This value is null if the account is associated with the administrator account through Organizations.</p>
145    pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
146        &self.email
147    }
148    /// <p>The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie membership invitation hasn't been sent to the account.</p>
149    pub fn invited_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
150        self.invited_at = ::std::option::Option::Some(input);
151        self
152    }
153    /// <p>The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie membership invitation hasn't been sent to the account.</p>
154    pub fn set_invited_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
155        self.invited_at = input;
156        self
157    }
158    /// <p>The date and time, in UTC and extended ISO 8601 format, when an Amazon Macie membership invitation was last sent to the account. This value is null if a Macie membership invitation hasn't been sent to the account.</p>
159    pub fn get_invited_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
160        &self.invited_at
161    }
162    /// <p>(Deprecated) The Amazon Web Services account ID for the administrator account. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
163    pub fn master_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164        self.master_account_id = ::std::option::Option::Some(input.into());
165        self
166    }
167    /// <p>(Deprecated) The Amazon Web Services account ID for the administrator account. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
168    pub fn set_master_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169        self.master_account_id = input;
170        self
171    }
172    /// <p>(Deprecated) The Amazon Web Services account ID for the administrator account. This property has been replaced by the administratorAccountId property and is retained only for backward compatibility.</p>
173    pub fn get_master_account_id(&self) -> &::std::option::Option<::std::string::String> {
174        &self.master_account_id
175    }
176    /// <p>The current status of the relationship between the account and the administrator account.</p>
177    pub fn relationship_status(mut self, input: crate::types::RelationshipStatus) -> Self {
178        self.relationship_status = ::std::option::Option::Some(input);
179        self
180    }
181    /// <p>The current status of the relationship between the account and the administrator account.</p>
182    pub fn set_relationship_status(mut self, input: ::std::option::Option<crate::types::RelationshipStatus>) -> Self {
183        self.relationship_status = input;
184        self
185    }
186    /// <p>The current status of the relationship between the account and the administrator account.</p>
187    pub fn get_relationship_status(&self) -> &::std::option::Option<crate::types::RelationshipStatus> {
188        &self.relationship_status
189    }
190    /// Adds a key-value pair to `tags`.
191    ///
192    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
193    ///
194    /// <p>A map of key-value pairs that specifies which tags (keys and values) are associated with the account in Amazon Macie.</p>
195    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
196        let mut hash_map = self.tags.unwrap_or_default();
197        hash_map.insert(k.into(), v.into());
198        self.tags = ::std::option::Option::Some(hash_map);
199        self
200    }
201    /// <p>A map of key-value pairs that specifies which tags (keys and values) are associated with the account in Amazon Macie.</p>
202    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
203        self.tags = input;
204        self
205    }
206    /// <p>A map of key-value pairs that specifies which tags (keys and values) are associated with the account in Amazon Macie.</p>
207    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
208        &self.tags
209    }
210    /// <p>The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the relationship between the account and the administrator account.</p>
211    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
212        self.updated_at = ::std::option::Option::Some(input);
213        self
214    }
215    /// <p>The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the relationship between the account and the administrator account.</p>
216    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
217        self.updated_at = input;
218        self
219    }
220    /// <p>The date and time, in UTC and extended ISO 8601 format, of the most recent change to the status of the relationship between the account and the administrator account.</p>
221    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
222        &self.updated_at
223    }
224    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
225        self._request_id = Some(request_id.into());
226        self
227    }
228
229    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
230        self._request_id = request_id;
231        self
232    }
233    /// Consumes the builder and constructs a [`GetMemberOutput`](crate::operation::get_member::GetMemberOutput).
234    pub fn build(self) -> crate::operation::get_member::GetMemberOutput {
235        crate::operation::get_member::GetMemberOutput {
236            account_id: self.account_id,
237            administrator_account_id: self.administrator_account_id,
238            arn: self.arn,
239            email: self.email,
240            invited_at: self.invited_at,
241            master_account_id: self.master_account_id,
242            relationship_status: self.relationship_status,
243            tags: self.tags,
244            updated_at: self.updated_at,
245            _request_id: self._request_id,
246        }
247    }
248}