AWS SDK for C++

AWS SDK for C++ Version 1.11.768

Loading...
Searching...
No Matches
Message.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/Body.h>
10#include <aws/email/model/Content.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Xml {
17class XmlNode;
18} // namespace Xml
19} // namespace Utils
20namespace SES {
21namespace Model {
22
29class Message {
30 public:
31 AWS_SES_API Message() = default;
32 AWS_SES_API Message(const Aws::Utils::Xml::XmlNode& xmlNode);
33 AWS_SES_API Message& 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& GetSubject() const { return m_subject; }
44 inline bool SubjectHasBeenSet() const { return m_subjectHasBeenSet; }
45 template <typename SubjectT = Content>
46 void SetSubject(SubjectT&& value) {
47 m_subjectHasBeenSet = true;
48 m_subject = std::forward<SubjectT>(value);
49 }
50 template <typename SubjectT = Content>
51 Message& WithSubject(SubjectT&& value) {
52 SetSubject(std::forward<SubjectT>(value));
53 return *this;
54 }
56
58
61 inline const Body& GetBody() const { return m_body; }
62 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; }
63 template <typename BodyT = Body>
64 void SetBody(BodyT&& value) {
65 m_bodyHasBeenSet = true;
66 m_body = std::forward<BodyT>(value);
67 }
68 template <typename BodyT = Body>
69 Message& WithBody(BodyT&& value) {
70 SetBody(std::forward<BodyT>(value));
71 return *this;
72 }
74 private:
75 Content m_subject;
76
77 Body m_body;
78 bool m_subjectHasBeenSet = false;
79 bool m_bodyHasBeenSet = false;
80};
81
82} // namespace Model
83} // namespace SES
84} // namespace Aws
void SetSubject(SubjectT &&value)
Definition Message.h:46
const Body & GetBody() const
Definition Message.h:61
AWS_SES_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
bool SubjectHasBeenSet() const
Definition Message.h:44
bool BodyHasBeenSet() const
Definition Message.h:62
AWS_SES_API Message()=default
AWS_SES_API Message & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetBody(BodyT &&value)
Definition Message.h:64
Message & WithBody(BodyT &&value)
Definition Message.h:69
AWS_SES_API void OutputToStream(Aws::OStream &oStream, const char *location) const
const Content & GetSubject() const
Definition Message.h:43
Message & WithSubject(SubjectT &&value)
Definition Message.h:51
AWS_SES_API Message(const Aws::Utils::Xml::XmlNode &xmlNode)
std::basic_ostream< char, std::char_traits< char > > OStream