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 message. You can specify text, HTML, or both. If you use both, then the message should display correctly in the widest variety of email clients.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Body {
    /// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
    pub text: ::std::option::Option<crate::types::Content>,
    /// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</p>
    pub html: ::std::option::Option<crate::types::Content>,
}
impl Body {
    /// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
    pub fn text(&self) -> ::std::option::Option<&crate::types::Content> {
        self.text.as_ref()
    }
    /// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</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).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct BodyBuilder {
    pub(crate) text: ::std::option::Option<crate::types::Content>,
    pub(crate) html: ::std::option::Option<crate::types::Content>,
}
impl BodyBuilder {
    /// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
    pub fn text(mut self, input: crate::types::Content) -> Self {
        self.text = ::std::option::Option::Some(input);
        self
    }
    /// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
    pub fn set_text(mut self, input: ::std::option::Option<crate::types::Content>) -> Self {
        self.text = input;
        self
    }
    /// <p>The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).</p>
    pub fn get_text(&self) -> &::std::option::Option<crate::types::Content> {
        &self.text
    }
    /// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</p>
    pub fn html(mut self, input: crate::types::Content) -> Self {
        self.html = ::std::option::Option::Some(input);
        self
    }
    /// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</p>
    pub fn set_html(mut self, input: ::std::option::Option<crate::types::Content>) -> Self {
        self.html = input;
        self
    }
    /// <p>The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.</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,
        }
    }
}