AWS SDK for C++  0.14.3
AWS SDK for C++
ReceiptRule.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/email/SES_EXPORTS.h>
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace SES
33 {
34 namespace Model
35 {
36 
48  {
49  public:
50  ReceiptRule();
51  ReceiptRule(const Aws::Utils::Xml::XmlNode& xmlNode);
52  ReceiptRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
53 
54  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
55  void OutputToStream(Aws::OStream& oStream, const char* location) const;
56 
63  inline const Aws::String& GetName() const{ return m_name; }
64 
71  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
72 
79  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
80 
87  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
88 
95  inline ReceiptRule& WithName(const Aws::String& value) { SetName(value); return *this;}
96 
103  inline ReceiptRule& WithName(Aws::String&& value) { SetName(value); return *this;}
104 
111  inline ReceiptRule& WithName(const char* value) { SetName(value); return *this;}
112 
117  inline bool GetEnabled() const{ return m_enabled; }
118 
123  inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
124 
129  inline ReceiptRule& WithEnabled(bool value) { SetEnabled(value); return *this;}
130 
137  inline const TlsPolicy& GetTlsPolicy() const{ return m_tlsPolicy; }
138 
145  inline void SetTlsPolicy(const TlsPolicy& value) { m_tlsPolicyHasBeenSet = true; m_tlsPolicy = value; }
146 
153  inline void SetTlsPolicy(TlsPolicy&& value) { m_tlsPolicyHasBeenSet = true; m_tlsPolicy = value; }
154 
161  inline ReceiptRule& WithTlsPolicy(const TlsPolicy& value) { SetTlsPolicy(value); return *this;}
162 
169  inline ReceiptRule& WithTlsPolicy(TlsPolicy&& value) { SetTlsPolicy(value); return *this;}
170 
176  inline const Aws::Vector<Aws::String>& GetRecipients() const{ return m_recipients; }
177 
183  inline void SetRecipients(const Aws::Vector<Aws::String>& value) { m_recipientsHasBeenSet = true; m_recipients = value; }
184 
190  inline void SetRecipients(Aws::Vector<Aws::String>&& value) { m_recipientsHasBeenSet = true; m_recipients = value; }
191 
197  inline ReceiptRule& WithRecipients(const Aws::Vector<Aws::String>& value) { SetRecipients(value); return *this;}
198 
204  inline ReceiptRule& WithRecipients(Aws::Vector<Aws::String>&& value) { SetRecipients(value); return *this;}
205 
211  inline ReceiptRule& AddRecipients(const Aws::String& value) { m_recipientsHasBeenSet = true; m_recipients.push_back(value); return *this; }
212 
218  inline ReceiptRule& AddRecipients(Aws::String&& value) { m_recipientsHasBeenSet = true; m_recipients.push_back(value); return *this; }
219 
225  inline ReceiptRule& AddRecipients(const char* value) { m_recipientsHasBeenSet = true; m_recipients.push_back(value); return *this; }
226 
231  inline const Aws::Vector<ReceiptAction>& GetActions() const{ return m_actions; }
232 
237  inline void SetActions(const Aws::Vector<ReceiptAction>& value) { m_actionsHasBeenSet = true; m_actions = value; }
238 
243  inline void SetActions(Aws::Vector<ReceiptAction>&& value) { m_actionsHasBeenSet = true; m_actions = value; }
244 
249  inline ReceiptRule& WithActions(const Aws::Vector<ReceiptAction>& value) { SetActions(value); return *this;}
250 
255  inline ReceiptRule& WithActions(Aws::Vector<ReceiptAction>&& value) { SetActions(value); return *this;}
256 
261  inline ReceiptRule& AddActions(const ReceiptAction& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
262 
267  inline ReceiptRule& AddActions(ReceiptAction&& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; }
268 
273  inline bool GetScanEnabled() const{ return m_scanEnabled; }
274 
279  inline void SetScanEnabled(bool value) { m_scanEnabledHasBeenSet = true; m_scanEnabled = value; }
280 
285  inline ReceiptRule& WithScanEnabled(bool value) { SetScanEnabled(value); return *this;}
286 
287  private:
288  Aws::String m_name;
289  bool m_nameHasBeenSet;
290  bool m_enabled;
291  bool m_enabledHasBeenSet;
292  TlsPolicy m_tlsPolicy;
293  bool m_tlsPolicyHasBeenSet;
294  Aws::Vector<Aws::String> m_recipients;
295  bool m_recipientsHasBeenSet;
296  Aws::Vector<ReceiptAction> m_actions;
297  bool m_actionsHasBeenSet;
298  bool m_scanEnabled;
299  bool m_scanEnabledHasBeenSet;
300  };
301 
302 } // namespace Model
303 } // namespace SES
304 } // namespace Aws
const TlsPolicy & GetTlsPolicy() const
Definition: ReceiptRule.h:137
void SetActions(const Aws::Vector< ReceiptAction > &value)
Definition: ReceiptRule.h:237
void SetRecipients(Aws::Vector< Aws::String > &&value)
Definition: ReceiptRule.h:190
ReceiptRule & WithRecipients(const Aws::Vector< Aws::String > &value)
Definition: ReceiptRule.h:197
ReceiptRule & WithTlsPolicy(const TlsPolicy &value)
Definition: ReceiptRule.h:161
ReceiptRule & AddRecipients(const Aws::String &value)
Definition: ReceiptRule.h:211
ReceiptRule & WithActions(Aws::Vector< ReceiptAction > &&value)
Definition: ReceiptRule.h:255
void SetName(const char *value)
Definition: ReceiptRule.h:87
void SetTlsPolicy(const TlsPolicy &value)
Definition: ReceiptRule.h:145
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
ReceiptRule & WithRecipients(Aws::Vector< Aws::String > &&value)
Definition: ReceiptRule.h:204
void SetActions(Aws::Vector< ReceiptAction > &&value)
Definition: ReceiptRule.h:243
void SetName(Aws::String &&value)
Definition: ReceiptRule.h:79
void SetScanEnabled(bool value)
Definition: ReceiptRule.h:279
const Aws::String & GetName() const
Definition: ReceiptRule.h:63
ReceiptRule & WithName(Aws::String &&value)
Definition: ReceiptRule.h:103
ReceiptRule & WithScanEnabled(bool value)
Definition: ReceiptRule.h:285
ReceiptRule & AddActions(ReceiptAction &&value)
Definition: ReceiptRule.h:267
ReceiptRule & AddActions(const ReceiptAction &value)
Definition: ReceiptRule.h:261
void SetTlsPolicy(TlsPolicy &&value)
Definition: ReceiptRule.h:153
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
ReceiptRule & WithName(const char *value)
Definition: ReceiptRule.h:111
void SetName(const Aws::String &value)
Definition: ReceiptRule.h:71
ReceiptRule & WithName(const Aws::String &value)
Definition: ReceiptRule.h:95
ReceiptRule & AddRecipients(const char *value)
Definition: ReceiptRule.h:225
ReceiptRule & WithTlsPolicy(TlsPolicy &&value)
Definition: ReceiptRule.h:169
void SetRecipients(const Aws::Vector< Aws::String > &value)
Definition: ReceiptRule.h:183
const Aws::Vector< Aws::String > & GetRecipients() const
Definition: ReceiptRule.h:176
const Aws::Vector< ReceiptAction > & GetActions() const
Definition: ReceiptRule.h:231
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ReceiptRule & WithActions(const Aws::Vector< ReceiptAction > &value)
Definition: ReceiptRule.h:249
ReceiptRule & WithEnabled(bool value)
Definition: ReceiptRule.h:129
ReceiptRule & AddRecipients(Aws::String &&value)
Definition: ReceiptRule.h:218
#define AWS_SES_API
Definition: SES_EXPORTS.h:37
void SetEnabled(bool value)
Definition: ReceiptRule.h:123
JSON (JavaScript Object Notation).