aws_sdk_guardduty/operation/decline_invitations/_decline_invitations_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 DeclineInvitationsInput {
6 /// <p>A list of account IDs of the Amazon Web Services accounts that sent invitations to the current member account that you want to decline invitations from.</p>
7 pub account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8}
9impl DeclineInvitationsInput {
10 /// <p>A list of account IDs of the Amazon Web Services accounts that sent invitations to the current member account that you want to decline invitations from.</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 DeclineInvitationsInput {
18 /// Creates a new builder-style object to manufacture [`DeclineInvitationsInput`](crate::operation::decline_invitations::DeclineInvitationsInput).
19 pub fn builder() -> crate::operation::decline_invitations::builders::DeclineInvitationsInputBuilder {
20 crate::operation::decline_invitations::builders::DeclineInvitationsInputBuilder::default()
21 }
22}
23
24/// A builder for [`DeclineInvitationsInput`](crate::operation::decline_invitations::DeclineInvitationsInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct DeclineInvitationsInputBuilder {
28 pub(crate) account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
29}
30impl DeclineInvitationsInputBuilder {
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>A list of account IDs of the Amazon Web Services accounts that sent invitations to the current member account that you want to decline invitations from.</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>A list of account IDs of the Amazon Web Services accounts that sent invitations to the current member account that you want to decline invitations from.</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>A list of account IDs of the Amazon Web Services accounts that sent invitations to the current member account that you want to decline invitations from.</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 [`DeclineInvitationsInput`](crate::operation::decline_invitations::DeclineInvitationsInput).
52 pub fn build(
53 self,
54 ) -> ::std::result::Result<crate::operation::decline_invitations::DeclineInvitationsInput, ::aws_smithy_types::error::operation::BuildError> {
55 ::std::result::Result::Ok(crate::operation::decline_invitations::DeclineInvitationsInput {
56 account_ids: self.account_ids,
57 })
58 }
59}