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