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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents the body of the email message.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Body {
/// <p>An object that represents the version of the message that is displayed in email clients that don't support HTML, or clients where the recipient has disabled HTML rendering.</p>
pub text: ::std::option::Option<crate::types::Content>,
/// <p>An object that represents the version of the message that is displayed in email clients that support HTML. HTML messages can include formatted text, hyperlinks, images, and more.</p>
pub html: ::std::option::Option<crate::types::Content>,
}
impl Body {
/// <p>An object that represents the version of the message that is displayed in email clients that don't support HTML, or clients where the recipient has disabled HTML rendering.</p>
pub fn text(&self) -> ::std::option::Option<&crate::types::Content> {
self.text.as_ref()
}
/// <p>An object that represents the version of the message that is displayed in email clients that support HTML. HTML messages can include formatted text, hyperlinks, images, and more.</p>
pub fn html(&self) -> ::std::option::Option<&crate::types::Content> {
self.html.as_ref()
}
}
impl Body {
/// Creates a new builder-style object to manufacture [`Body`](crate::types::Body).
pub fn builder() -> crate::types::builders::BodyBuilder {
crate::types::builders::BodyBuilder::default()
}
}
/// A builder for [`Body`](crate::types::Body).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BodyBuilder {
pub(crate) text: ::std::option::Option<crate::types::Content>,
pub(crate) html: ::std::option::Option<crate::types::Content>,
}
impl BodyBuilder {
/// <p>An object that represents the version of the message that is displayed in email clients that don't support HTML, or clients where the recipient has disabled HTML rendering.</p>
pub fn text(mut self, input: crate::types::Content) -> Self {
self.text = ::std::option::Option::Some(input);
self
}
/// <p>An object that represents the version of the message that is displayed in email clients that don't support HTML, or clients where the recipient has disabled HTML rendering.</p>
pub fn set_text(mut self, input: ::std::option::Option<crate::types::Content>) -> Self {
self.text = input;
self
}
/// <p>An object that represents the version of the message that is displayed in email clients that don't support HTML, or clients where the recipient has disabled HTML rendering.</p>
pub fn get_text(&self) -> &::std::option::Option<crate::types::Content> {
&self.text
}
/// <p>An object that represents the version of the message that is displayed in email clients that support HTML. HTML messages can include formatted text, hyperlinks, images, and more.</p>
pub fn html(mut self, input: crate::types::Content) -> Self {
self.html = ::std::option::Option::Some(input);
self
}
/// <p>An object that represents the version of the message that is displayed in email clients that support HTML. HTML messages can include formatted text, hyperlinks, images, and more.</p>
pub fn set_html(mut self, input: ::std::option::Option<crate::types::Content>) -> Self {
self.html = input;
self
}
/// <p>An object that represents the version of the message that is displayed in email clients that support HTML. HTML messages can include formatted text, hyperlinks, images, and more.</p>
pub fn get_html(&self) -> &::std::option::Option<crate::types::Content> {
&self.html
}
/// Consumes the builder and constructs a [`Body`](crate::types::Body).
pub fn build(self) -> crate::types::Body {
crate::types::Body {
text: self.text,
html: self.html,
}
}
}