aws_sdk_detective/operation/get_members/
_get_members_input.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 GetMembersInput {
6    /// <p>The ARN of the behavior graph for which to request the member details.</p>
7    pub graph_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.</p>
9    /// <p>You cannot use <code>GetMembers</code> to retrieve information about member accounts that were removed from the behavior graph.</p>
10    pub account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11}
12impl GetMembersInput {
13    /// <p>The ARN of the behavior graph for which to request the member details.</p>
14    pub fn graph_arn(&self) -> ::std::option::Option<&str> {
15        self.graph_arn.as_deref()
16    }
17    /// <p>The list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.</p>
18    /// <p>You cannot use <code>GetMembers</code> to retrieve information about member accounts that were removed from the behavior graph.</p>
19    ///
20    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.account_ids.is_none()`.
21    pub fn account_ids(&self) -> &[::std::string::String] {
22        self.account_ids.as_deref().unwrap_or_default()
23    }
24}
25impl GetMembersInput {
26    /// Creates a new builder-style object to manufacture [`GetMembersInput`](crate::operation::get_members::GetMembersInput).
27    pub fn builder() -> crate::operation::get_members::builders::GetMembersInputBuilder {
28        crate::operation::get_members::builders::GetMembersInputBuilder::default()
29    }
30}
31
32/// A builder for [`GetMembersInput`](crate::operation::get_members::GetMembersInput).
33#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
34#[non_exhaustive]
35pub struct GetMembersInputBuilder {
36    pub(crate) graph_arn: ::std::option::Option<::std::string::String>,
37    pub(crate) account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
38}
39impl GetMembersInputBuilder {
40    /// <p>The ARN of the behavior graph for which to request the member details.</p>
41    /// This field is required.
42    pub fn graph_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
43        self.graph_arn = ::std::option::Option::Some(input.into());
44        self
45    }
46    /// <p>The ARN of the behavior graph for which to request the member details.</p>
47    pub fn set_graph_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
48        self.graph_arn = input;
49        self
50    }
51    /// <p>The ARN of the behavior graph for which to request the member details.</p>
52    pub fn get_graph_arn(&self) -> &::std::option::Option<::std::string::String> {
53        &self.graph_arn
54    }
55    /// Appends an item to `account_ids`.
56    ///
57    /// To override the contents of this collection use [`set_account_ids`](Self::set_account_ids).
58    ///
59    /// <p>The list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.</p>
60    /// <p>You cannot use <code>GetMembers</code> to retrieve information about member accounts that were removed from the behavior graph.</p>
61    pub fn account_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        let mut v = self.account_ids.unwrap_or_default();
63        v.push(input.into());
64        self.account_ids = ::std::option::Option::Some(v);
65        self
66    }
67    /// <p>The list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.</p>
68    /// <p>You cannot use <code>GetMembers</code> to retrieve information about member accounts that were removed from the behavior graph.</p>
69    pub fn set_account_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
70        self.account_ids = input;
71        self
72    }
73    /// <p>The list of Amazon Web Services account identifiers for the member account for which to return member details. You can request details for up to 50 member accounts at a time.</p>
74    /// <p>You cannot use <code>GetMembers</code> to retrieve information about member accounts that were removed from the behavior graph.</p>
75    pub fn get_account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
76        &self.account_ids
77    }
78    /// Consumes the builder and constructs a [`GetMembersInput`](crate::operation::get_members::GetMembersInput).
79    pub fn build(self) -> ::std::result::Result<crate::operation::get_members::GetMembersInput, ::aws_smithy_types::error::operation::BuildError> {
80        ::std::result::Result::Ok(crate::operation::get_members::GetMembersInput {
81            graph_arn: self.graph_arn,
82            account_ids: self.account_ids,
83        })
84    }
85}