aws_sdk_sesv2/operation/send_email/
_send_email_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents a request to send a single formatted email using Amazon SES. For more information, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-formatted.html">Amazon SES Developer Guide</a>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SendEmailInput {
7    /// <p>The email address to use as the "From" address for the email. The address that you specify has to be verified.</p>
8    pub from_email_address: ::std::option::Option<::std::string::String>,
9    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FromEmailAddress</code> parameter.</p>
10    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use sender@example.com, then you would specify the <code>FromEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FromEmailAddress</code> to be sender@example.com.</p>
11    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
12    /// <p>For Raw emails, the <code>FromEmailAddressIdentityArn</code> value overrides the X-SES-SOURCE-ARN and X-SES-FROM-ARN headers specified in raw email message content.</p>
13    pub from_email_address_identity_arn: ::std::option::Option<::std::string::String>,
14    /// <p>An object that contains the recipients of the email message.</p>
15    pub destination: ::std::option::Option<crate::types::Destination>,
16    /// <p>The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.</p>
17    pub reply_to_addresses: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
18    /// <p>The address that you want bounce and complaint notifications to be sent to.</p>
19    pub feedback_forwarding_email_address: ::std::option::Option<::std::string::String>,
20    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FeedbackForwardingEmailAddress</code> parameter.</p>
21    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the <code>FeedbackForwardingEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FeedbackForwardingEmailAddress</code> to be feedback@example.com.</p>
22    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
23    pub feedback_forwarding_email_address_identity_arn: ::std::option::Option<::std::string::String>,
24    /// <p>An object that contains the body of the message. You can send either a Simple message, Raw message, or a Templated message.</p>
25    pub content: ::std::option::Option<crate::types::EmailContent>,
26    /// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using the <code>SendEmail</code> operation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
27    pub email_tags: ::std::option::Option<::std::vec::Vec<crate::types::MessageTag>>,
28    /// <p>The name of the configuration set to use when sending the email.</p>
29    pub configuration_set_name: ::std::option::Option<::std::string::String>,
30    /// <p>The ID of the multi-region endpoint (global-endpoint).</p>
31    pub endpoint_id: ::std::option::Option<::std::string::String>,
32    /// <p>The name of the tenant through which this email will be sent.</p><note>
33    /// <p>The email sending operation will only succeed if all referenced resources (identities, configuration sets, and templates) are associated with this tenant.</p>
34    /// </note>
35    pub tenant_name: ::std::option::Option<::std::string::String>,
36    /// <p>An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to unsubscribe.</p>
37    pub list_management_options: ::std::option::Option<crate::types::ListManagementOptions>,
38}
39impl SendEmailInput {
40    /// <p>The email address to use as the "From" address for the email. The address that you specify has to be verified.</p>
41    pub fn from_email_address(&self) -> ::std::option::Option<&str> {
42        self.from_email_address.as_deref()
43    }
44    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FromEmailAddress</code> parameter.</p>
45    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use sender@example.com, then you would specify the <code>FromEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FromEmailAddress</code> to be sender@example.com.</p>
46    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
47    /// <p>For Raw emails, the <code>FromEmailAddressIdentityArn</code> value overrides the X-SES-SOURCE-ARN and X-SES-FROM-ARN headers specified in raw email message content.</p>
48    pub fn from_email_address_identity_arn(&self) -> ::std::option::Option<&str> {
49        self.from_email_address_identity_arn.as_deref()
50    }
51    /// <p>An object that contains the recipients of the email message.</p>
52    pub fn destination(&self) -> ::std::option::Option<&crate::types::Destination> {
53        self.destination.as_ref()
54    }
55    /// <p>The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.</p>
56    ///
57    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.reply_to_addresses.is_none()`.
58    pub fn reply_to_addresses(&self) -> &[::std::string::String] {
59        self.reply_to_addresses.as_deref().unwrap_or_default()
60    }
61    /// <p>The address that you want bounce and complaint notifications to be sent to.</p>
62    pub fn feedback_forwarding_email_address(&self) -> ::std::option::Option<&str> {
63        self.feedback_forwarding_email_address.as_deref()
64    }
65    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FeedbackForwardingEmailAddress</code> parameter.</p>
66    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the <code>FeedbackForwardingEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FeedbackForwardingEmailAddress</code> to be feedback@example.com.</p>
67    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
68    pub fn feedback_forwarding_email_address_identity_arn(&self) -> ::std::option::Option<&str> {
69        self.feedback_forwarding_email_address_identity_arn.as_deref()
70    }
71    /// <p>An object that contains the body of the message. You can send either a Simple message, Raw message, or a Templated message.</p>
72    pub fn content(&self) -> ::std::option::Option<&crate::types::EmailContent> {
73        self.content.as_ref()
74    }
75    /// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using the <code>SendEmail</code> operation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
76    ///
77    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.email_tags.is_none()`.
78    pub fn email_tags(&self) -> &[crate::types::MessageTag] {
79        self.email_tags.as_deref().unwrap_or_default()
80    }
81    /// <p>The name of the configuration set to use when sending the email.</p>
82    pub fn configuration_set_name(&self) -> ::std::option::Option<&str> {
83        self.configuration_set_name.as_deref()
84    }
85    /// <p>The ID of the multi-region endpoint (global-endpoint).</p>
86    pub fn endpoint_id(&self) -> ::std::option::Option<&str> {
87        self.endpoint_id.as_deref()
88    }
89    /// <p>The name of the tenant through which this email will be sent.</p><note>
90    /// <p>The email sending operation will only succeed if all referenced resources (identities, configuration sets, and templates) are associated with this tenant.</p>
91    /// </note>
92    pub fn tenant_name(&self) -> ::std::option::Option<&str> {
93        self.tenant_name.as_deref()
94    }
95    /// <p>An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to unsubscribe.</p>
96    pub fn list_management_options(&self) -> ::std::option::Option<&crate::types::ListManagementOptions> {
97        self.list_management_options.as_ref()
98    }
99}
100impl SendEmailInput {
101    /// Creates a new builder-style object to manufacture [`SendEmailInput`](crate::operation::send_email::SendEmailInput).
102    pub fn builder() -> crate::operation::send_email::builders::SendEmailInputBuilder {
103        crate::operation::send_email::builders::SendEmailInputBuilder::default()
104    }
105}
106
107/// A builder for [`SendEmailInput`](crate::operation::send_email::SendEmailInput).
108#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
109#[non_exhaustive]
110pub struct SendEmailInputBuilder {
111    pub(crate) from_email_address: ::std::option::Option<::std::string::String>,
112    pub(crate) from_email_address_identity_arn: ::std::option::Option<::std::string::String>,
113    pub(crate) destination: ::std::option::Option<crate::types::Destination>,
114    pub(crate) reply_to_addresses: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
115    pub(crate) feedback_forwarding_email_address: ::std::option::Option<::std::string::String>,
116    pub(crate) feedback_forwarding_email_address_identity_arn: ::std::option::Option<::std::string::String>,
117    pub(crate) content: ::std::option::Option<crate::types::EmailContent>,
118    pub(crate) email_tags: ::std::option::Option<::std::vec::Vec<crate::types::MessageTag>>,
119    pub(crate) configuration_set_name: ::std::option::Option<::std::string::String>,
120    pub(crate) endpoint_id: ::std::option::Option<::std::string::String>,
121    pub(crate) tenant_name: ::std::option::Option<::std::string::String>,
122    pub(crate) list_management_options: ::std::option::Option<crate::types::ListManagementOptions>,
123}
124impl SendEmailInputBuilder {
125    /// <p>The email address to use as the "From" address for the email. The address that you specify has to be verified.</p>
126    pub fn from_email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.from_email_address = ::std::option::Option::Some(input.into());
128        self
129    }
130    /// <p>The email address to use as the "From" address for the email. The address that you specify has to be verified.</p>
131    pub fn set_from_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.from_email_address = input;
133        self
134    }
135    /// <p>The email address to use as the "From" address for the email. The address that you specify has to be verified.</p>
136    pub fn get_from_email_address(&self) -> &::std::option::Option<::std::string::String> {
137        &self.from_email_address
138    }
139    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FromEmailAddress</code> parameter.</p>
140    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use sender@example.com, then you would specify the <code>FromEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FromEmailAddress</code> to be sender@example.com.</p>
141    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
142    /// <p>For Raw emails, the <code>FromEmailAddressIdentityArn</code> value overrides the X-SES-SOURCE-ARN and X-SES-FROM-ARN headers specified in raw email message content.</p>
143    pub fn from_email_address_identity_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.from_email_address_identity_arn = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FromEmailAddress</code> parameter.</p>
148    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use sender@example.com, then you would specify the <code>FromEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FromEmailAddress</code> to be sender@example.com.</p>
149    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
150    /// <p>For Raw emails, the <code>FromEmailAddressIdentityArn</code> value overrides the X-SES-SOURCE-ARN and X-SES-FROM-ARN headers specified in raw email message content.</p>
151    pub fn set_from_email_address_identity_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.from_email_address_identity_arn = input;
153        self
154    }
155    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FromEmailAddress</code> parameter.</p>
156    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use sender@example.com, then you would specify the <code>FromEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FromEmailAddress</code> to be sender@example.com.</p>
157    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
158    /// <p>For Raw emails, the <code>FromEmailAddressIdentityArn</code> value overrides the X-SES-SOURCE-ARN and X-SES-FROM-ARN headers specified in raw email message content.</p>
159    pub fn get_from_email_address_identity_arn(&self) -> &::std::option::Option<::std::string::String> {
160        &self.from_email_address_identity_arn
161    }
162    /// <p>An object that contains the recipients of the email message.</p>
163    pub fn destination(mut self, input: crate::types::Destination) -> Self {
164        self.destination = ::std::option::Option::Some(input);
165        self
166    }
167    /// <p>An object that contains the recipients of the email message.</p>
168    pub fn set_destination(mut self, input: ::std::option::Option<crate::types::Destination>) -> Self {
169        self.destination = input;
170        self
171    }
172    /// <p>An object that contains the recipients of the email message.</p>
173    pub fn get_destination(&self) -> &::std::option::Option<crate::types::Destination> {
174        &self.destination
175    }
176    /// Appends an item to `reply_to_addresses`.
177    ///
178    /// To override the contents of this collection use [`set_reply_to_addresses`](Self::set_reply_to_addresses).
179    ///
180    /// <p>The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.</p>
181    pub fn reply_to_addresses(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        let mut v = self.reply_to_addresses.unwrap_or_default();
183        v.push(input.into());
184        self.reply_to_addresses = ::std::option::Option::Some(v);
185        self
186    }
187    /// <p>The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.</p>
188    pub fn set_reply_to_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
189        self.reply_to_addresses = input;
190        self
191    }
192    /// <p>The "Reply-to" email addresses for the message. When the recipient replies to the message, each Reply-to address receives the reply.</p>
193    pub fn get_reply_to_addresses(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
194        &self.reply_to_addresses
195    }
196    /// <p>The address that you want bounce and complaint notifications to be sent to.</p>
197    pub fn feedback_forwarding_email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
198        self.feedback_forwarding_email_address = ::std::option::Option::Some(input.into());
199        self
200    }
201    /// <p>The address that you want bounce and complaint notifications to be sent to.</p>
202    pub fn set_feedback_forwarding_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203        self.feedback_forwarding_email_address = input;
204        self
205    }
206    /// <p>The address that you want bounce and complaint notifications to be sent to.</p>
207    pub fn get_feedback_forwarding_email_address(&self) -> &::std::option::Option<::std::string::String> {
208        &self.feedback_forwarding_email_address
209    }
210    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FeedbackForwardingEmailAddress</code> parameter.</p>
211    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the <code>FeedbackForwardingEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FeedbackForwardingEmailAddress</code> to be feedback@example.com.</p>
212    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
213    pub fn feedback_forwarding_email_address_identity_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.feedback_forwarding_email_address_identity_arn = ::std::option::Option::Some(input.into());
215        self
216    }
217    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FeedbackForwardingEmailAddress</code> parameter.</p>
218    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the <code>FeedbackForwardingEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FeedbackForwardingEmailAddress</code> to be feedback@example.com.</p>
219    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
220    pub fn set_feedback_forwarding_email_address_identity_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221        self.feedback_forwarding_email_address_identity_arn = input;
222        self
223    }
224    /// <p>This parameter is used only for sending authorization. It is the ARN of the identity that is associated with the sending authorization policy that permits you to use the email address specified in the <code>FeedbackForwardingEmailAddress</code> parameter.</p>
225    /// <p>For example, if the owner of example.com (which has ARN arn:aws:ses:us-east-1:123456789012:identity/example.com) attaches a policy to it that authorizes you to use feedback@example.com, then you would specify the <code>FeedbackForwardingEmailAddressIdentityArn</code> to be arn:aws:ses:us-east-1:123456789012:identity/example.com, and the <code>FeedbackForwardingEmailAddress</code> to be feedback@example.com.</p>
226    /// <p>For more information about sending authorization, see the <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html">Amazon SES Developer Guide</a>.</p>
227    pub fn get_feedback_forwarding_email_address_identity_arn(&self) -> &::std::option::Option<::std::string::String> {
228        &self.feedback_forwarding_email_address_identity_arn
229    }
230    /// <p>An object that contains the body of the message. You can send either a Simple message, Raw message, or a Templated message.</p>
231    /// This field is required.
232    pub fn content(mut self, input: crate::types::EmailContent) -> Self {
233        self.content = ::std::option::Option::Some(input);
234        self
235    }
236    /// <p>An object that contains the body of the message. You can send either a Simple message, Raw message, or a Templated message.</p>
237    pub fn set_content(mut self, input: ::std::option::Option<crate::types::EmailContent>) -> Self {
238        self.content = input;
239        self
240    }
241    /// <p>An object that contains the body of the message. You can send either a Simple message, Raw message, or a Templated message.</p>
242    pub fn get_content(&self) -> &::std::option::Option<crate::types::EmailContent> {
243        &self.content
244    }
245    /// Appends an item to `email_tags`.
246    ///
247    /// To override the contents of this collection use [`set_email_tags`](Self::set_email_tags).
248    ///
249    /// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using the <code>SendEmail</code> operation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
250    pub fn email_tags(mut self, input: crate::types::MessageTag) -> Self {
251        let mut v = self.email_tags.unwrap_or_default();
252        v.push(input);
253        self.email_tags = ::std::option::Option::Some(v);
254        self
255    }
256    /// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using the <code>SendEmail</code> operation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
257    pub fn set_email_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MessageTag>>) -> Self {
258        self.email_tags = input;
259        self
260    }
261    /// <p>A list of tags, in the form of name/value pairs, to apply to an email that you send using the <code>SendEmail</code> operation. Tags correspond to characteristics of the email that you define, so that you can publish email sending events.</p>
262    pub fn get_email_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MessageTag>> {
263        &self.email_tags
264    }
265    /// <p>The name of the configuration set to use when sending the email.</p>
266    pub fn configuration_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267        self.configuration_set_name = ::std::option::Option::Some(input.into());
268        self
269    }
270    /// <p>The name of the configuration set to use when sending the email.</p>
271    pub fn set_configuration_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
272        self.configuration_set_name = input;
273        self
274    }
275    /// <p>The name of the configuration set to use when sending the email.</p>
276    pub fn get_configuration_set_name(&self) -> &::std::option::Option<::std::string::String> {
277        &self.configuration_set_name
278    }
279    /// <p>The ID of the multi-region endpoint (global-endpoint).</p>
280    pub fn endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281        self.endpoint_id = ::std::option::Option::Some(input.into());
282        self
283    }
284    /// <p>The ID of the multi-region endpoint (global-endpoint).</p>
285    pub fn set_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
286        self.endpoint_id = input;
287        self
288    }
289    /// <p>The ID of the multi-region endpoint (global-endpoint).</p>
290    pub fn get_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
291        &self.endpoint_id
292    }
293    /// <p>The name of the tenant through which this email will be sent.</p><note>
294    /// <p>The email sending operation will only succeed if all referenced resources (identities, configuration sets, and templates) are associated with this tenant.</p>
295    /// </note>
296    pub fn tenant_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
297        self.tenant_name = ::std::option::Option::Some(input.into());
298        self
299    }
300    /// <p>The name of the tenant through which this email will be sent.</p><note>
301    /// <p>The email sending operation will only succeed if all referenced resources (identities, configuration sets, and templates) are associated with this tenant.</p>
302    /// </note>
303    pub fn set_tenant_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
304        self.tenant_name = input;
305        self
306    }
307    /// <p>The name of the tenant through which this email will be sent.</p><note>
308    /// <p>The email sending operation will only succeed if all referenced resources (identities, configuration sets, and templates) are associated with this tenant.</p>
309    /// </note>
310    pub fn get_tenant_name(&self) -> &::std::option::Option<::std::string::String> {
311        &self.tenant_name
312    }
313    /// <p>An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to unsubscribe.</p>
314    pub fn list_management_options(mut self, input: crate::types::ListManagementOptions) -> Self {
315        self.list_management_options = ::std::option::Option::Some(input);
316        self
317    }
318    /// <p>An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to unsubscribe.</p>
319    pub fn set_list_management_options(mut self, input: ::std::option::Option<crate::types::ListManagementOptions>) -> Self {
320        self.list_management_options = input;
321        self
322    }
323    /// <p>An object used to specify a list or topic to which an email belongs, which will be used when a contact chooses to unsubscribe.</p>
324    pub fn get_list_management_options(&self) -> &::std::option::Option<crate::types::ListManagementOptions> {
325        &self.list_management_options
326    }
327    /// Consumes the builder and constructs a [`SendEmailInput`](crate::operation::send_email::SendEmailInput).
328    pub fn build(self) -> ::std::result::Result<crate::operation::send_email::SendEmailInput, ::aws_smithy_types::error::operation::BuildError> {
329        ::std::result::Result::Ok(crate::operation::send_email::SendEmailInput {
330            from_email_address: self.from_email_address,
331            from_email_address_identity_arn: self.from_email_address_identity_arn,
332            destination: self.destination,
333            reply_to_addresses: self.reply_to_addresses,
334            feedback_forwarding_email_address: self.feedback_forwarding_email_address,
335            feedback_forwarding_email_address_identity_arn: self.feedback_forwarding_email_address_identity_arn,
336            content: self.content,
337            email_tags: self.email_tags,
338            configuration_set_name: self.configuration_set_name,
339            endpoint_id: self.endpoint_id,
340            tenant_name: self.tenant_name,
341            list_management_options: self.list_management_options,
342        })
343    }
344}