aws_sdk_detective/operation/create_members/_create_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)]
5pub struct CreateMembersInput {
6 /// <p>The ARN of the behavior graph.</p>
7 pub graph_arn: ::std::option::Option<::std::string::String>,
8 /// <p>Customized message text to include in the invitation email message to the invited member accounts.</p>
9 pub message: ::std::option::Option<::std::string::String>,
10 /// <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>
11 /// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
12 pub disable_email_notification: ::std::option::Option<bool>,
13 /// <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>
14 pub accounts: ::std::option::Option<::std::vec::Vec<crate::types::Account>>,
15}
16impl CreateMembersInput {
17 /// <p>The ARN of the behavior graph.</p>
18 pub fn graph_arn(&self) -> ::std::option::Option<&str> {
19 self.graph_arn.as_deref()
20 }
21 /// <p>Customized message text to include in the invitation email message to the invited member accounts.</p>
22 pub fn message(&self) -> ::std::option::Option<&str> {
23 self.message.as_deref()
24 }
25 /// <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>
26 /// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
27 pub fn disable_email_notification(&self) -> ::std::option::Option<bool> {
28 self.disable_email_notification
29 }
30 /// <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>
31 ///
32 /// 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()`.
33 pub fn accounts(&self) -> &[crate::types::Account] {
34 self.accounts.as_deref().unwrap_or_default()
35 }
36}
37impl ::std::fmt::Debug for CreateMembersInput {
38 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
39 let mut formatter = f.debug_struct("CreateMembersInput");
40 formatter.field("graph_arn", &self.graph_arn);
41 formatter.field("message", &"*** Sensitive Data Redacted ***");
42 formatter.field("disable_email_notification", &self.disable_email_notification);
43 formatter.field("accounts", &self.accounts);
44 formatter.finish()
45 }
46}
47impl CreateMembersInput {
48 /// Creates a new builder-style object to manufacture [`CreateMembersInput`](crate::operation::create_members::CreateMembersInput).
49 pub fn builder() -> crate::operation::create_members::builders::CreateMembersInputBuilder {
50 crate::operation::create_members::builders::CreateMembersInputBuilder::default()
51 }
52}
53
54/// A builder for [`CreateMembersInput`](crate::operation::create_members::CreateMembersInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
56#[non_exhaustive]
57pub struct CreateMembersInputBuilder {
58 pub(crate) graph_arn: ::std::option::Option<::std::string::String>,
59 pub(crate) message: ::std::option::Option<::std::string::String>,
60 pub(crate) disable_email_notification: ::std::option::Option<bool>,
61 pub(crate) accounts: ::std::option::Option<::std::vec::Vec<crate::types::Account>>,
62}
63impl CreateMembersInputBuilder {
64 /// <p>The ARN of the behavior graph.</p>
65 /// This field is required.
66 pub fn graph_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.graph_arn = ::std::option::Option::Some(input.into());
68 self
69 }
70 /// <p>The ARN of the behavior graph.</p>
71 pub fn set_graph_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.graph_arn = input;
73 self
74 }
75 /// <p>The ARN of the behavior graph.</p>
76 pub fn get_graph_arn(&self) -> &::std::option::Option<::std::string::String> {
77 &self.graph_arn
78 }
79 /// <p>Customized message text to include in the invitation email message to the invited member accounts.</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>Customized message text to include in the invitation email message to the invited member accounts.</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>Customized message text to include in the invitation email message to the invited member accounts.</p>
90 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
91 &self.message
92 }
93 /// <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>
94 /// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
95 pub fn disable_email_notification(mut self, input: bool) -> Self {
96 self.disable_email_notification = ::std::option::Option::Some(input);
97 self
98 }
99 /// <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>
100 /// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
101 pub fn set_disable_email_notification(mut self, input: ::std::option::Option<bool>) -> Self {
102 self.disable_email_notification = input;
103 self
104 }
105 /// <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>
106 /// <p>Organization accounts in the organization behavior graph do not receive email notifications.</p>
107 pub fn get_disable_email_notification(&self) -> &::std::option::Option<bool> {
108 &self.disable_email_notification
109 }
110 /// Appends an item to `accounts`.
111 ///
112 /// To override the contents of this collection use [`set_accounts`](Self::set_accounts).
113 ///
114 /// <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>
115 pub fn accounts(mut self, input: crate::types::Account) -> Self {
116 let mut v = self.accounts.unwrap_or_default();
117 v.push(input);
118 self.accounts = ::std::option::Option::Some(v);
119 self
120 }
121 /// <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>
122 pub fn set_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Account>>) -> Self {
123 self.accounts = input;
124 self
125 }
126 /// <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>
127 pub fn get_accounts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Account>> {
128 &self.accounts
129 }
130 /// Consumes the builder and constructs a [`CreateMembersInput`](crate::operation::create_members::CreateMembersInput).
131 pub fn build(
132 self,
133 ) -> ::std::result::Result<crate::operation::create_members::CreateMembersInput, ::aws_smithy_types::error::operation::BuildError> {
134 ::std::result::Result::Ok(crate::operation::create_members::CreateMembersInput {
135 graph_arn: self.graph_arn,
136 message: self.message,
137 disable_email_notification: self.disable_email_notification,
138 accounts: self.accounts,
139 })
140 }
141}
142impl ::std::fmt::Debug for CreateMembersInputBuilder {
143 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
144 let mut formatter = f.debug_struct("CreateMembersInputBuilder");
145 formatter.field("graph_arn", &self.graph_arn);
146 formatter.field("message", &"*** Sensitive Data Redacted ***");
147 formatter.field("disable_email_notification", &self.disable_email_notification);
148 formatter.field("accounts", &self.accounts);
149 formatter.finish()
150 }
151}