aws_sdk_detective/operation/create_members/_create_members_input.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateMembersInput {
/// <p>The ARN of the behavior graph.</p>
pub graph_arn: ::std::option::Option<::std::string::String>,
/// <p>Customized message text to include in the invitation email message to the invited member accounts.</p>
pub message: ::std::option::Option<::std::string::String>,
/// <p>if set to <code>true</code>, then the invited accounts do not receive email notifications. By default, this is set to <code>false</code>, and the invited accounts receive email notifications.</p>
/// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
pub disable_email_notification: ::std::option::Option<bool>,
/// <p>The list of Amazon Web Services accounts to invite or to enable. You can invite or enable up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the Amazon Web Services account root user email address. For organization accounts in the organization behavior graph, the email address is not required.</p>
pub accounts: ::std::option::Option<::std::vec::Vec<crate::types::Account>>,
}
impl CreateMembersInput {
/// <p>The ARN of the behavior graph.</p>
pub fn graph_arn(&self) -> ::std::option::Option<&str> {
self.graph_arn.as_deref()
}
/// <p>Customized message text to include in the invitation email message to the invited member accounts.</p>
pub fn message(&self) -> ::std::option::Option<&str> {
self.message.as_deref()
}
/// <p>if set to <code>true</code>, then the invited accounts do not receive email notifications. By default, this is set to <code>false</code>, and the invited accounts receive email notifications.</p>
/// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
pub fn disable_email_notification(&self) -> ::std::option::Option<bool> {
self.disable_email_notification
}
/// <p>The list of Amazon Web Services accounts to invite or to enable. You can invite or enable up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the Amazon Web Services account root user email address. For organization accounts in the organization behavior graph, the email address is not required.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.accounts.is_none()`.
pub fn accounts(&self) -> &[crate::types::Account] {
self.accounts.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for CreateMembersInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateMembersInput");
formatter.field("graph_arn", &self.graph_arn);
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.field("disable_email_notification", &self.disable_email_notification);
formatter.field("accounts", &self.accounts);
formatter.finish()
}
}
impl CreateMembersInput {
/// Creates a new builder-style object to manufacture [`CreateMembersInput`](crate::operation::create_members::CreateMembersInput).
pub fn builder() -> crate::operation::create_members::builders::CreateMembersInputBuilder {
crate::operation::create_members::builders::CreateMembersInputBuilder::default()
}
}
/// A builder for [`CreateMembersInput`](crate::operation::create_members::CreateMembersInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateMembersInputBuilder {
pub(crate) graph_arn: ::std::option::Option<::std::string::String>,
pub(crate) message: ::std::option::Option<::std::string::String>,
pub(crate) disable_email_notification: ::std::option::Option<bool>,
pub(crate) accounts: ::std::option::Option<::std::vec::Vec<crate::types::Account>>,
}
impl CreateMembersInputBuilder {
/// <p>The ARN of the behavior graph.</p>
/// This field is required.
pub fn graph_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.graph_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the behavior graph.</p>
pub fn set_graph_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.graph_arn = input;
self
}
/// <p>The ARN of the behavior graph.</p>
pub fn get_graph_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.graph_arn
}
/// <p>Customized message text to include in the invitation email message to the invited member accounts.</p>
pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message = ::std::option::Option::Some(input.into());
self
}
/// <p>Customized message text to include in the invitation email message to the invited member accounts.</p>
pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message = input;
self
}
/// <p>Customized message text to include in the invitation email message to the invited member accounts.</p>
pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
&self.message
}
/// <p>if set to <code>true</code>, then the invited accounts do not receive email notifications. By default, this is set to <code>false</code>, and the invited accounts receive email notifications.</p>
/// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
pub fn disable_email_notification(mut self, input: bool) -> Self {
self.disable_email_notification = ::std::option::Option::Some(input);
self
}
/// <p>if set to <code>true</code>, then the invited accounts do not receive email notifications. By default, this is set to <code>false</code>, and the invited accounts receive email notifications.</p>
/// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
pub fn set_disable_email_notification(mut self, input: ::std::option::Option<bool>) -> Self {
self.disable_email_notification = input;
self
}
/// <p>if set to <code>true</code>, then the invited accounts do not receive email notifications. By default, this is set to <code>false</code>, and the invited accounts receive email notifications.</p>
/// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
pub fn get_disable_email_notification(&self) -> &::std::option::Option<bool> {
&self.disable_email_notification
}
/// Appends an item to `accounts`.
///
/// To override the contents of this collection use [`set_accounts`](Self::set_accounts).
///
/// <p>The list of Amazon Web Services accounts to invite or to enable. You can invite or enable up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the Amazon Web Services account root user email address. For organization accounts in the organization behavior graph, the email address is not required.</p>
pub fn accounts(mut self, input: crate::types::Account) -> Self {
let mut v = self.accounts.unwrap_or_default();
v.push(input);
self.accounts = ::std::option::Option::Some(v);
self
}
/// <p>The list of Amazon Web Services accounts to invite or to enable. You can invite or enable up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the Amazon Web Services account root user email address. For organization accounts in the organization behavior graph, the email address is not required.</p>
pub fn set_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Account>>) -> Self {
self.accounts = input;
self
}
/// <p>The list of Amazon Web Services accounts to invite or to enable. You can invite or enable up to 50 accounts at a time. For each invited account, the account list contains the account identifier and the Amazon Web Services account root user email address. For organization accounts in the organization behavior graph, the email address is not required.</p>
pub fn get_accounts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Account>> {
&self.accounts
}
/// Consumes the builder and constructs a [`CreateMembersInput`](crate::operation::create_members::CreateMembersInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_members::CreateMembersInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_members::CreateMembersInput {
graph_arn: self.graph_arn,
message: self.message,
disable_email_notification: self.disable_email_notification,
accounts: self.accounts,
})
}
}
impl ::std::fmt::Debug for CreateMembersInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateMembersInputBuilder");
formatter.field("graph_arn", &self.graph_arn);
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.field("disable_email_notification", &self.disable_email_notification);
formatter.field("accounts", &self.accounts);
formatter.finish()
}
}