AWS SDK for C++

AWS SDK for C++ Version 1.11.935

Loading...
Searching...
No Matches
Message.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/sesv2/SESV2_EXPORTS.h>
9#include <aws/sesv2/model/Attachment.h>
10#include <aws/sesv2/model/Body.h>
11#include <aws/sesv2/model/Content.h>
12#include <aws/sesv2/model/MessageHeader.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace SESV2 {
24namespace Model {
25
32class Message {
33 public:
34 AWS_SESV2_API Message() = default;
35 AWS_SESV2_API Message(Aws::Utils::Json::JsonView jsonValue);
36 AWS_SESV2_API Message& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_SESV2_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
46 inline const Content& GetSubject() const { return m_subject; }
47 inline bool SubjectHasBeenSet() const { return m_subjectHasBeenSet; }
48 template <typename SubjectT = Content>
49 void SetSubject(SubjectT&& value) {
50 m_subjectHasBeenSet = true;
51 m_subject = std::forward<SubjectT>(value);
52 }
53 template <typename SubjectT = Content>
54 Message& WithSubject(SubjectT&& value) {
55 SetSubject(std::forward<SubjectT>(value));
56 return *this;
57 }
59
61
65 inline const Body& GetBody() const { return m_body; }
66 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; }
67 template <typename BodyT = Body>
68 void SetBody(BodyT&& value) {
69 m_bodyHasBeenSet = true;
70 m_body = std::forward<BodyT>(value);
71 }
72 template <typename BodyT = Body>
73 Message& WithBody(BodyT&& value) {
74 SetBody(std::forward<BodyT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::Vector<MessageHeader>& GetHeaders() const { return m_headers; }
84 inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; }
85 template <typename HeadersT = Aws::Vector<MessageHeader>>
86 void SetHeaders(HeadersT&& value) {
87 m_headersHasBeenSet = true;
88 m_headers = std::forward<HeadersT>(value);
89 }
90 template <typename HeadersT = Aws::Vector<MessageHeader>>
91 Message& WithHeaders(HeadersT&& value) {
92 SetHeaders(std::forward<HeadersT>(value));
93 return *this;
94 }
95 template <typename HeadersT = MessageHeader>
96 Message& AddHeaders(HeadersT&& value) {
97 m_headersHasBeenSet = true;
98 m_headers.emplace_back(std::forward<HeadersT>(value));
99 return *this;
100 }
102
104
108 inline const Aws::Vector<Attachment>& GetAttachments() const { return m_attachments; }
109 inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
110 template <typename AttachmentsT = Aws::Vector<Attachment>>
111 void SetAttachments(AttachmentsT&& value) {
112 m_attachmentsHasBeenSet = true;
113 m_attachments = std::forward<AttachmentsT>(value);
114 }
115 template <typename AttachmentsT = Aws::Vector<Attachment>>
116 Message& WithAttachments(AttachmentsT&& value) {
117 SetAttachments(std::forward<AttachmentsT>(value));
118 return *this;
119 }
120 template <typename AttachmentsT = Attachment>
121 Message& AddAttachments(AttachmentsT&& value) {
122 m_attachmentsHasBeenSet = true;
123 m_attachments.emplace_back(std::forward<AttachmentsT>(value));
124 return *this;
125 }
127 private:
128 Content m_subject;
129
130 Body m_body;
131
133
134 Aws::Vector<Attachment> m_attachments;
135 bool m_subjectHasBeenSet = false;
136 bool m_bodyHasBeenSet = false;
137 bool m_headersHasBeenSet = false;
138 bool m_attachmentsHasBeenSet = false;
139};
140
141} // namespace Model
142} // namespace SESV2
143} // namespace Aws
Message & AddAttachments(AttachmentsT &&value)
Definition Message.h:121
AWS_SESV2_API Message()=default
bool BodyHasBeenSet() const
Definition Message.h:66
const Content & GetSubject() const
Definition Message.h:46
void SetHeaders(HeadersT &&value)
Definition Message.h:86
bool HeadersHasBeenSet() const
Definition Message.h:84
Message & WithSubject(SubjectT &&value)
Definition Message.h:54
AWS_SESV2_API Message(Aws::Utils::Json::JsonView jsonValue)
bool SubjectHasBeenSet() const
Definition Message.h:47
void SetSubject(SubjectT &&value)
Definition Message.h:49
const Aws::Vector< MessageHeader > & GetHeaders() const
Definition Message.h:83
void SetAttachments(AttachmentsT &&value)
Definition Message.h:111
Message & WithHeaders(HeadersT &&value)
Definition Message.h:91
bool AttachmentsHasBeenSet() const
Definition Message.h:109
Message & WithAttachments(AttachmentsT &&value)
Definition Message.h:116
Message & AddHeaders(HeadersT &&value)
Definition Message.h:96
AWS_SESV2_API Message & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_SESV2_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< Attachment > & GetAttachments() const
Definition Message.h:108
Message & WithBody(BodyT &&value)
Definition Message.h:73
const Body & GetBody() const
Definition Message.h:65
void SetBody(BodyT &&value)
Definition Message.h:68
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue