aws_sdk_detective/operation/get_members/
_get_members_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 GetMembersOutput {
6    /// <p>The member account details that Detective is returning in response to the request.</p>
7    pub member_details: ::std::option::Option<::std::vec::Vec<crate::types::MemberDetail>>,
8    /// <p>The requested member accounts for which Detective was unable to return member details.</p>
9    /// <p>For each account, provides the reason why the request could not be processed.</p>
10    pub unprocessed_accounts: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedAccount>>,
11    _request_id: Option<String>,
12}
13impl GetMembersOutput {
14    /// <p>The member account details that Detective is returning in response to the request.</p>
15    ///
16    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.member_details.is_none()`.
17    pub fn member_details(&self) -> &[crate::types::MemberDetail] {
18        self.member_details.as_deref().unwrap_or_default()
19    }
20    /// <p>The requested member accounts for which Detective was unable to return member details.</p>
21    /// <p>For each account, provides the reason why the request could not be processed.</p>
22    ///
23    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.unprocessed_accounts.is_none()`.
24    pub fn unprocessed_accounts(&self) -> &[crate::types::UnprocessedAccount] {
25        self.unprocessed_accounts.as_deref().unwrap_or_default()
26    }
27}
28impl ::aws_types::request_id::RequestId for GetMembersOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl GetMembersOutput {
34    /// Creates a new builder-style object to manufacture [`GetMembersOutput`](crate::operation::get_members::GetMembersOutput).
35    pub fn builder() -> crate::operation::get_members::builders::GetMembersOutputBuilder {
36        crate::operation::get_members::builders::GetMembersOutputBuilder::default()
37    }
38}
39
40/// A builder for [`GetMembersOutput`](crate::operation::get_members::GetMembersOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetMembersOutputBuilder {
44    pub(crate) member_details: ::std::option::Option<::std::vec::Vec<crate::types::MemberDetail>>,
45    pub(crate) unprocessed_accounts: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedAccount>>,
46    _request_id: Option<String>,
47}
48impl GetMembersOutputBuilder {
49    /// Appends an item to `member_details`.
50    ///
51    /// To override the contents of this collection use [`set_member_details`](Self::set_member_details).
52    ///
53    /// <p>The member account details that Detective is returning in response to the request.</p>
54    pub fn member_details(mut self, input: crate::types::MemberDetail) -> Self {
55        let mut v = self.member_details.unwrap_or_default();
56        v.push(input);
57        self.member_details = ::std::option::Option::Some(v);
58        self
59    }
60    /// <p>The member account details that Detective is returning in response to the request.</p>
61    pub fn set_member_details(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MemberDetail>>) -> Self {
62        self.member_details = input;
63        self
64    }
65    /// <p>The member account details that Detective is returning in response to the request.</p>
66    pub fn get_member_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MemberDetail>> {
67        &self.member_details
68    }
69    /// Appends an item to `unprocessed_accounts`.
70    ///
71    /// To override the contents of this collection use [`set_unprocessed_accounts`](Self::set_unprocessed_accounts).
72    ///
73    /// <p>The requested member accounts for which Detective was unable to return member details.</p>
74    /// <p>For each account, provides the reason why the request could not be processed.</p>
75    pub fn unprocessed_accounts(mut self, input: crate::types::UnprocessedAccount) -> Self {
76        let mut v = self.unprocessed_accounts.unwrap_or_default();
77        v.push(input);
78        self.unprocessed_accounts = ::std::option::Option::Some(v);
79        self
80    }
81    /// <p>The requested member accounts for which Detective was unable to return member details.</p>
82    /// <p>For each account, provides the reason why the request could not be processed.</p>
83    pub fn set_unprocessed_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedAccount>>) -> Self {
84        self.unprocessed_accounts = input;
85        self
86    }
87    /// <p>The requested member accounts for which Detective was unable to return member details.</p>
88    /// <p>For each account, provides the reason why the request could not be processed.</p>
89    pub fn get_unprocessed_accounts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UnprocessedAccount>> {
90        &self.unprocessed_accounts
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`GetMembersOutput`](crate::operation::get_members::GetMembersOutput).
102    pub fn build(self) -> crate::operation::get_members::GetMembersOutput {
103        crate::operation::get_members::GetMembersOutput {
104            member_details: self.member_details,
105            unprocessed_accounts: self.unprocessed_accounts,
106            _request_id: self._request_id,
107        }
108    }
109}