aws_sdk_macie2/operation/create_invitations/
_create_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 CreateInvitationsInput {
6    /// <p>An array that lists Amazon Web Services account IDs, one for each account to send the invitation to.</p>
7    pub account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>Specifies whether to send the invitation as an email message. If this value is false, Amazon Macie sends the invitation (as an email message) to the email address that you specified for the recipient's account when you associated the account with your account. The default value is false.</p>
9    pub disable_email_notification: ::std::option::Option<bool>,
10    /// <p>Custom text to include in the email message that contains the invitation. The text can contain as many as 80 alphanumeric characters.</p>
11    pub message: ::std::option::Option<::std::string::String>,
12}
13impl CreateInvitationsInput {
14    /// <p>An array that lists Amazon Web Services account IDs, one for each account to send the invitation to.</p>
15    ///
16    /// 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()`.
17    pub fn account_ids(&self) -> &[::std::string::String] {
18        self.account_ids.as_deref().unwrap_or_default()
19    }
20    /// <p>Specifies whether to send the invitation as an email message. If this value is false, Amazon Macie sends the invitation (as an email message) to the email address that you specified for the recipient's account when you associated the account with your account. The default value is false.</p>
21    pub fn disable_email_notification(&self) -> ::std::option::Option<bool> {
22        self.disable_email_notification
23    }
24    /// <p>Custom text to include in the email message that contains the invitation. The text can contain as many as 80 alphanumeric characters.</p>
25    pub fn message(&self) -> ::std::option::Option<&str> {
26        self.message.as_deref()
27    }
28}
29impl CreateInvitationsInput {
30    /// Creates a new builder-style object to manufacture [`CreateInvitationsInput`](crate::operation::create_invitations::CreateInvitationsInput).
31    pub fn builder() -> crate::operation::create_invitations::builders::CreateInvitationsInputBuilder {
32        crate::operation::create_invitations::builders::CreateInvitationsInputBuilder::default()
33    }
34}
35
36/// A builder for [`CreateInvitationsInput`](crate::operation::create_invitations::CreateInvitationsInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct CreateInvitationsInputBuilder {
40    pub(crate) account_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
41    pub(crate) disable_email_notification: ::std::option::Option<bool>,
42    pub(crate) message: ::std::option::Option<::std::string::String>,
43}
44impl CreateInvitationsInputBuilder {
45    /// Appends an item to `account_ids`.
46    ///
47    /// To override the contents of this collection use [`set_account_ids`](Self::set_account_ids).
48    ///
49    /// <p>An array that lists Amazon Web Services account IDs, one for each account to send the invitation to.</p>
50    pub fn account_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
51        let mut v = self.account_ids.unwrap_or_default();
52        v.push(input.into());
53        self.account_ids = ::std::option::Option::Some(v);
54        self
55    }
56    /// <p>An array that lists Amazon Web Services account IDs, one for each account to send the invitation to.</p>
57    pub fn set_account_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
58        self.account_ids = input;
59        self
60    }
61    /// <p>An array that lists Amazon Web Services account IDs, one for each account to send the invitation to.</p>
62    pub fn get_account_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
63        &self.account_ids
64    }
65    /// <p>Specifies whether to send the invitation as an email message. If this value is false, Amazon Macie sends the invitation (as an email message) to the email address that you specified for the recipient's account when you associated the account with your account. The default value is false.</p>
66    pub fn disable_email_notification(mut self, input: bool) -> Self {
67        self.disable_email_notification = ::std::option::Option::Some(input);
68        self
69    }
70    /// <p>Specifies whether to send the invitation as an email message. If this value is false, Amazon Macie sends the invitation (as an email message) to the email address that you specified for the recipient's account when you associated the account with your account. The default value is false.</p>
71    pub fn set_disable_email_notification(mut self, input: ::std::option::Option<bool>) -> Self {
72        self.disable_email_notification = input;
73        self
74    }
75    /// <p>Specifies whether to send the invitation as an email message. If this value is false, Amazon Macie sends the invitation (as an email message) to the email address that you specified for the recipient's account when you associated the account with your account. The default value is false.</p>
76    pub fn get_disable_email_notification(&self) -> &::std::option::Option<bool> {
77        &self.disable_email_notification
78    }
79    /// <p>Custom text to include in the email message that contains the invitation. The text can contain as many as 80 alphanumeric characters.</p>
80    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.message = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>Custom text to include in the email message that contains the invitation. The text can contain as many as 80 alphanumeric characters.</p>
85    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.message = input;
87        self
88    }
89    /// <p>Custom text to include in the email message that contains the invitation. The text can contain as many as 80 alphanumeric characters.</p>
90    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
91        &self.message
92    }
93    /// Consumes the builder and constructs a [`CreateInvitationsInput`](crate::operation::create_invitations::CreateInvitationsInput).
94    pub fn build(
95        self,
96    ) -> ::std::result::Result<crate::operation::create_invitations::CreateInvitationsInput, ::aws_smithy_types::error::operation::BuildError> {
97        ::std::result::Result::Ok(crate::operation::create_invitations::CreateInvitationsInput {
98            account_ids: self.account_ids,
99            disable_email_notification: self.disable_email_notification,
100            message: self.message,
101        })
102    }
103}