aws-sdk-detective 1.76.0

AWS SDK for Amazon Detective
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListMembersOutput {
    /// <p>The list of member accounts in the behavior graph.</p>
    /// <p>For invited accounts, the results include member accounts that did not pass verification and member accounts that have not yet accepted the invitation to the behavior graph. The results do not include member accounts that were removed from the behavior graph.</p>
    /// <p>For the organization behavior graph, the results do not include organization accounts that the Detective administrator account has not enabled as member accounts.</p>
    pub member_details: ::std::option::Option<::std::vec::Vec<crate::types::MemberDetail>>,
    /// <p>If there are more member accounts remaining in the results, then use this pagination token to request the next page of member accounts.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListMembersOutput {
    /// <p>The list of member accounts in the behavior graph.</p>
    /// <p>For invited accounts, the results include member accounts that did not pass verification and member accounts that have not yet accepted the invitation to the behavior graph. The results do not include member accounts that were removed from the behavior graph.</p>
    /// <p>For the organization behavior graph, the results do not include organization accounts that the Detective administrator account has not enabled as member accounts.</p>
    ///
    /// 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()`.
    pub fn member_details(&self) -> &[crate::types::MemberDetail] {
        self.member_details.as_deref().unwrap_or_default()
    }
    /// <p>If there are more member accounts remaining in the results, then use this pagination token to request the next page of member accounts.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for ListMembersOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ListMembersOutput {
    /// Creates a new builder-style object to manufacture [`ListMembersOutput`](crate::operation::list_members::ListMembersOutput).
    pub fn builder() -> crate::operation::list_members::builders::ListMembersOutputBuilder {
        crate::operation::list_members::builders::ListMembersOutputBuilder::default()
    }
}

/// A builder for [`ListMembersOutput`](crate::operation::list_members::ListMembersOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListMembersOutputBuilder {
    pub(crate) member_details: ::std::option::Option<::std::vec::Vec<crate::types::MemberDetail>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl ListMembersOutputBuilder {
    /// Appends an item to `member_details`.
    ///
    /// To override the contents of this collection use [`set_member_details`](Self::set_member_details).
    ///
    /// <p>The list of member accounts in the behavior graph.</p>
    /// <p>For invited accounts, the results include member accounts that did not pass verification and member accounts that have not yet accepted the invitation to the behavior graph. The results do not include member accounts that were removed from the behavior graph.</p>
    /// <p>For the organization behavior graph, the results do not include organization accounts that the Detective administrator account has not enabled as member accounts.</p>
    pub fn member_details(mut self, input: crate::types::MemberDetail) -> Self {
        let mut v = self.member_details.unwrap_or_default();
        v.push(input);
        self.member_details = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of member accounts in the behavior graph.</p>
    /// <p>For invited accounts, the results include member accounts that did not pass verification and member accounts that have not yet accepted the invitation to the behavior graph. The results do not include member accounts that were removed from the behavior graph.</p>
    /// <p>For the organization behavior graph, the results do not include organization accounts that the Detective administrator account has not enabled as member accounts.</p>
    pub fn set_member_details(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MemberDetail>>) -> Self {
        self.member_details = input;
        self
    }
    /// <p>The list of member accounts in the behavior graph.</p>
    /// <p>For invited accounts, the results include member accounts that did not pass verification and member accounts that have not yet accepted the invitation to the behavior graph. The results do not include member accounts that were removed from the behavior graph.</p>
    /// <p>For the organization behavior graph, the results do not include organization accounts that the Detective administrator account has not enabled as member accounts.</p>
    pub fn get_member_details(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MemberDetail>> {
        &self.member_details
    }
    /// <p>If there are more member accounts remaining in the results, then use this pagination token to request the next page of member accounts.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If there are more member accounts remaining in the results, then use this pagination token to request the next page of member accounts.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If there are more member accounts remaining in the results, then use this pagination token to request the next page of member accounts.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`ListMembersOutput`](crate::operation::list_members::ListMembersOutput).
    pub fn build(self) -> crate::operation::list_members::ListMembersOutput {
        crate::operation::list_members::ListMembersOutput {
            member_details: self.member_details,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}