aws_sdk_sesv2/operation/send_email/
_send_email_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A unique message ID that you receive when an email is accepted for sending.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SendEmailOutput {
7    /// <p>A unique identifier for the message that is generated when the message is accepted.</p><note>
8    /// <p>It's possible for Amazon SES to accept a message without sending it. For example, this can happen when the message that you're trying to send has an attachment that contains a virus, or when you send a templated email that contains invalid personalization content.</p>
9    /// </note>
10    pub message_id: ::std::option::Option<::std::string::String>,
11    _request_id: Option<String>,
12}
13impl SendEmailOutput {
14    /// <p>A unique identifier for the message that is generated when the message is accepted.</p><note>
15    /// <p>It's possible for Amazon SES to accept a message without sending it. For example, this can happen when the message that you're trying to send has an attachment that contains a virus, or when you send a templated email that contains invalid personalization content.</p>
16    /// </note>
17    pub fn message_id(&self) -> ::std::option::Option<&str> {
18        self.message_id.as_deref()
19    }
20}
21impl ::aws_types::request_id::RequestId for SendEmailOutput {
22    fn request_id(&self) -> Option<&str> {
23        self._request_id.as_deref()
24    }
25}
26impl SendEmailOutput {
27    /// Creates a new builder-style object to manufacture [`SendEmailOutput`](crate::operation::send_email::SendEmailOutput).
28    pub fn builder() -> crate::operation::send_email::builders::SendEmailOutputBuilder {
29        crate::operation::send_email::builders::SendEmailOutputBuilder::default()
30    }
31}
32
33/// A builder for [`SendEmailOutput`](crate::operation::send_email::SendEmailOutput).
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
35#[non_exhaustive]
36pub struct SendEmailOutputBuilder {
37    pub(crate) message_id: ::std::option::Option<::std::string::String>,
38    _request_id: Option<String>,
39}
40impl SendEmailOutputBuilder {
41    /// <p>A unique identifier for the message that is generated when the message is accepted.</p><note>
42    /// <p>It's possible for Amazon SES to accept a message without sending it. For example, this can happen when the message that you're trying to send has an attachment that contains a virus, or when you send a templated email that contains invalid personalization content.</p>
43    /// </note>
44    pub fn message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.message_id = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>A unique identifier for the message that is generated when the message is accepted.</p><note>
49    /// <p>It's possible for Amazon SES to accept a message without sending it. For example, this can happen when the message that you're trying to send has an attachment that contains a virus, or when you send a templated email that contains invalid personalization content.</p>
50    /// </note>
51    pub fn set_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.message_id = input;
53        self
54    }
55    /// <p>A unique identifier for the message that is generated when the message is accepted.</p><note>
56    /// <p>It's possible for Amazon SES to accept a message without sending it. For example, this can happen when the message that you're trying to send has an attachment that contains a virus, or when you send a templated email that contains invalid personalization content.</p>
57    /// </note>
58    pub fn get_message_id(&self) -> &::std::option::Option<::std::string::String> {
59        &self.message_id
60    }
61    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
62        self._request_id = Some(request_id.into());
63        self
64    }
65
66    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
67        self._request_id = request_id;
68        self
69    }
70    /// Consumes the builder and constructs a [`SendEmailOutput`](crate::operation::send_email::SendEmailOutput).
71    pub fn build(self) -> crate::operation::send_email::SendEmailOutput {
72        crate::operation::send_email::SendEmailOutput {
73            message_id: self.message_id,
74            _request_id: self._request_id,
75        }
76    }
77}