aws_sdk_securityhub/operation/invite_members/
_invite_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 InviteMembersInput {
6    /// <p>The list of account IDs of the Amazon Web Services accounts to invite to Security Hub as members.</p>
7    pub account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8}
9impl InviteMembersInput {
10    /// <p>The list of account IDs of the Amazon Web Services accounts to invite to Security Hub as members.</p>
11    ///
12    /// 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()`.
13    pub fn account_ids(&self) -> &[::std::string::String] {
14        self.account_ids.as_deref().unwrap_or_default()
15    }
16}
17impl InviteMembersInput {
18    /// Creates a new builder-style object to manufacture [`InviteMembersInput`](crate::operation::invite_members::InviteMembersInput).
19    pub fn builder() -> crate::operation::invite_members::builders::InviteMembersInputBuilder {
20        crate::operation::invite_members::builders::InviteMembersInputBuilder::default()
21    }
22}
23
24/// A builder for [`InviteMembersInput`](crate::operation::invite_members::InviteMembersInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct InviteMembersInputBuilder {
28    pub(crate) account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
29}
30impl InviteMembersInputBuilder {
31    /// Appends an item to `account_ids`.
32    ///
33    /// To override the contents of this collection use [`set_account_ids`](Self::set_account_ids).
34    ///
35    /// <p>The list of account IDs of the Amazon Web Services accounts to invite to Security Hub as members.</p>
36    pub fn account_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
37        let mut v = self.account_ids.unwrap_or_default();
38        v.push(input.into());
39        self.account_ids = ::std::option::Option::Some(v);
40        self
41    }
42    /// <p>The list of account IDs of the Amazon Web Services accounts to invite to Security Hub as members.</p>
43    pub fn set_account_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
44        self.account_ids = input;
45        self
46    }
47    /// <p>The list of account IDs of the Amazon Web Services accounts to invite to Security Hub as members.</p>
48    pub fn get_account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
49        &self.account_ids
50    }
51    /// Consumes the builder and constructs a [`InviteMembersInput`](crate::operation::invite_members::InviteMembersInput).
52    pub fn build(
53        self,
54    ) -> ::std::result::Result<crate::operation::invite_members::InviteMembersInput, ::aws_smithy_types::error::operation::BuildError> {
55        ::std::result::Result::Ok(crate::operation::invite_members::InviteMembersInput {
56            account_ids: self.account_ids,
57        })
58    }
59}