AWS SDK for C++

AWS SDK for C++ Version 1.11.766

Loading...
Searching...
No Matches
ReceiptRule.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/email/SES_EXPORTS.h>
11#include <aws/email/model/ReceiptAction.h>
12#include <aws/email/model/TlsPolicy.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace SES {
23namespace Model {
24
38 public:
39 AWS_SES_API ReceiptRule() = default;
40 AWS_SES_API ReceiptRule(const Aws::Utils::Xml::XmlNode& xmlNode);
41 AWS_SES_API ReceiptRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
42
43 AWS_SES_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
44 AWS_SES_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
45
47
54 inline const Aws::String& GetName() const { return m_name; }
55 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
56 template <typename NameT = Aws::String>
57 void SetName(NameT&& value) {
58 m_nameHasBeenSet = true;
59 m_name = std::forward<NameT>(value);
60 }
61 template <typename NameT = Aws::String>
62 ReceiptRule& WithName(NameT&& value) {
63 SetName(std::forward<NameT>(value));
64 return *this;
65 }
67
69
73 inline bool GetEnabled() const { return m_enabled; }
74 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
75 inline void SetEnabled(bool value) {
76 m_enabledHasBeenSet = true;
77 m_enabled = value;
78 }
79 inline ReceiptRule& WithEnabled(bool value) {
80 SetEnabled(value);
81 return *this;
82 }
84
86
92 inline TlsPolicy GetTlsPolicy() const { return m_tlsPolicy; }
93 inline bool TlsPolicyHasBeenSet() const { return m_tlsPolicyHasBeenSet; }
94 inline void SetTlsPolicy(TlsPolicy value) {
95 m_tlsPolicyHasBeenSet = true;
96 m_tlsPolicy = value;
97 }
99 SetTlsPolicy(value);
100 return *this;
101 }
103
105
110 inline const Aws::Vector<Aws::String>& GetRecipients() const { return m_recipients; }
111 inline bool RecipientsHasBeenSet() const { return m_recipientsHasBeenSet; }
112 template <typename RecipientsT = Aws::Vector<Aws::String>>
113 void SetRecipients(RecipientsT&& value) {
114 m_recipientsHasBeenSet = true;
115 m_recipients = std::forward<RecipientsT>(value);
116 }
117 template <typename RecipientsT = Aws::Vector<Aws::String>>
118 ReceiptRule& WithRecipients(RecipientsT&& value) {
119 SetRecipients(std::forward<RecipientsT>(value));
120 return *this;
121 }
122 template <typename RecipientsT = Aws::String>
123 ReceiptRule& AddRecipients(RecipientsT&& value) {
124 m_recipientsHasBeenSet = true;
125 m_recipients.emplace_back(std::forward<RecipientsT>(value));
126 return *this;
127 }
129
131
135 inline const Aws::Vector<ReceiptAction>& GetActions() const { return m_actions; }
136 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
137 template <typename ActionsT = Aws::Vector<ReceiptAction>>
138 void SetActions(ActionsT&& value) {
139 m_actionsHasBeenSet = true;
140 m_actions = std::forward<ActionsT>(value);
141 }
142 template <typename ActionsT = Aws::Vector<ReceiptAction>>
143 ReceiptRule& WithActions(ActionsT&& value) {
144 SetActions(std::forward<ActionsT>(value));
145 return *this;
146 }
147 template <typename ActionsT = ReceiptAction>
148 ReceiptRule& AddActions(ActionsT&& value) {
149 m_actionsHasBeenSet = true;
150 m_actions.emplace_back(std::forward<ActionsT>(value));
151 return *this;
152 }
154
156
160 inline bool GetScanEnabled() const { return m_scanEnabled; }
161 inline bool ScanEnabledHasBeenSet() const { return m_scanEnabledHasBeenSet; }
162 inline void SetScanEnabled(bool value) {
163 m_scanEnabledHasBeenSet = true;
164 m_scanEnabled = value;
165 }
166 inline ReceiptRule& WithScanEnabled(bool value) {
167 SetScanEnabled(value);
168 return *this;
169 }
171 private:
172 Aws::String m_name;
173
174 bool m_enabled{false};
175
176 TlsPolicy m_tlsPolicy{TlsPolicy::NOT_SET};
177
178 Aws::Vector<Aws::String> m_recipients;
179
181
182 bool m_scanEnabled{false};
183 bool m_nameHasBeenSet = false;
184 bool m_enabledHasBeenSet = false;
185 bool m_tlsPolicyHasBeenSet = false;
186 bool m_recipientsHasBeenSet = false;
187 bool m_actionsHasBeenSet = false;
188 bool m_scanEnabledHasBeenSet = false;
189};
190
191} // namespace Model
192} // namespace SES
193} // namespace Aws
void SetName(NameT &&value)
Definition ReceiptRule.h:57
AWS_SES_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_SES_API ReceiptRule & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
TlsPolicy GetTlsPolicy() const
Definition ReceiptRule.h:92
const Aws::Vector< ReceiptAction > & GetActions() const
ReceiptRule & AddRecipients(RecipientsT &&value)
ReceiptRule & WithName(NameT &&value)
Definition ReceiptRule.h:62
ReceiptRule & WithScanEnabled(bool value)
const Aws::String & GetName() const
Definition ReceiptRule.h:54
void SetActions(ActionsT &&value)
AWS_SES_API ReceiptRule(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetTlsPolicy(TlsPolicy value)
Definition ReceiptRule.h:94
const Aws::Vector< Aws::String > & GetRecipients() const
void SetEnabled(bool value)
Definition ReceiptRule.h:75
AWS_SES_API void OutputToStream(Aws::OStream &oStream, const char *location) const
ReceiptRule & WithRecipients(RecipientsT &&value)
void SetRecipients(RecipientsT &&value)
ReceiptRule & WithTlsPolicy(TlsPolicy value)
Definition ReceiptRule.h:98
void SetScanEnabled(bool value)
ReceiptRule & WithEnabled(bool value)
Definition ReceiptRule.h:79
ReceiptRule & AddActions(ActionsT &&value)
AWS_SES_API ReceiptRule()=default
ReceiptRule & WithActions(ActionsT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream