AWS SDK for C++

AWS SDK for C++ Version 1.11.766

Loading...
Searching...
No Matches
Body.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/email/SES_EXPORTS.h>
9#include <aws/email/model/Content.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Xml {
16class XmlNode;
17} // namespace Xml
18} // namespace Utils
19namespace SES {
20namespace Model {
21
29class Body {
30 public:
31 AWS_SES_API Body() = default;
32 AWS_SES_API Body(const Aws::Utils::Xml::XmlNode& xmlNode);
33 AWS_SES_API Body& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
34
35 AWS_SES_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
36 AWS_SES_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
37
39
43 inline const Content& GetText() const { return m_text; }
44 inline bool TextHasBeenSet() const { return m_textHasBeenSet; }
45 template <typename TextT = Content>
46 void SetText(TextT&& value) {
47 m_textHasBeenSet = true;
48 m_text = std::forward<TextT>(value);
49 }
50 template <typename TextT = Content>
51 Body& WithText(TextT&& value) {
52 SetText(std::forward<TextT>(value));
53 return *this;
54 }
56
58
63 inline const Content& GetHtml() const { return m_html; }
64 inline bool HtmlHasBeenSet() const { return m_htmlHasBeenSet; }
65 template <typename HtmlT = Content>
66 void SetHtml(HtmlT&& value) {
67 m_htmlHasBeenSet = true;
68 m_html = std::forward<HtmlT>(value);
69 }
70 template <typename HtmlT = Content>
71 Body& WithHtml(HtmlT&& value) {
72 SetHtml(std::forward<HtmlT>(value));
73 return *this;
74 }
76 private:
77 Content m_text;
78
79 Content m_html;
80 bool m_textHasBeenSet = false;
81 bool m_htmlHasBeenSet = false;
82};
83
84} // namespace Model
85} // namespace SES
86} // namespace Aws
AWS_SES_API Body()=default
AWS_SES_API Body & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool HtmlHasBeenSet() const
Definition Body.h:64
bool TextHasBeenSet() const
Definition Body.h:44
void SetHtml(HtmlT &&value)
Definition Body.h:66
const Content & GetHtml() const
Definition Body.h:63
Body & WithHtml(HtmlT &&value)
Definition Body.h:71
void SetText(TextT &&value)
Definition Body.h:46
AWS_SES_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_SES_API Body(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_SES_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Content & GetText() const
Definition Body.h:43
Body & WithText(TextT &&value)
Definition Body.h:51
std::basic_ostream< char, std::char_traits< char > > OStream