1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/email/SES_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <aws/email/model/KinesisFirehoseDestination.h>
12 #include <aws/email/model/CloudWatchDestination.h>
13 #include <aws/email/model/SNSDestination.h>
14 #include <aws/email/model/EventType.h>
15 #include <utility>
16 
17 namespace Aws
18 {
19 namespace Utils
20 {
21 namespace Xml
22 {
23   class XmlNode;
24 } // namespace Xml
25 } // namespace Utils
26 namespace SES
27 {
28 namespace Model
29 {
30 
31   /**
32    * <p>Contains information about the event destination that the specified email
33    * sending events will be published to.</p>  <p>When you create or update an
34    * event destination, you must provide one, and only one, destination. The
35    * destination can be Amazon CloudWatch, Amazon Kinesis Firehose or Amazon Simple
36    * Notification Service (Amazon SNS).</p>  <p>Event destinations are
37    * associated with configuration sets, which enable you to publish email sending
38    * events to Amazon CloudWatch, Amazon Kinesis Firehose, or Amazon Simple
39    * Notification Service (Amazon SNS). For information about using configuration
40    * sets, see the <a
41    * href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon
42    * SES Developer Guide</a>.</p><p><h3>See Also:</h3>   <a
43    * href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/EventDestination">AWS
44    * API Reference</a></p>
45    */
46   class AWS_SES_API EventDestination
47   {
48   public:
49     EventDestination();
50     EventDestination(const Aws::Utils::Xml::XmlNode& xmlNode);
51     EventDestination& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
52 
53     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
54     void OutputToStream(Aws::OStream& oStream, const char* location) const;
55 
56 
57     /**
58      * <p>The name of the event destination. The name must:</p> <ul> <li> <p>This value
59      * can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or
60      * dashes (-).</p> </li> <li> <p>Contain less than 64 characters.</p> </li> </ul>
61      */
GetName()62     inline const Aws::String& GetName() const{ return m_name; }
63 
64     /**
65      * <p>The name of the event destination. The name must:</p> <ul> <li> <p>This value
66      * can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or
67      * dashes (-).</p> </li> <li> <p>Contain less than 64 characters.</p> </li> </ul>
68      */
NameHasBeenSet()69     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
70 
71     /**
72      * <p>The name of the event destination. The name must:</p> <ul> <li> <p>This value
73      * can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or
74      * dashes (-).</p> </li> <li> <p>Contain less than 64 characters.</p> </li> </ul>
75      */
SetName(const Aws::String & value)76     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
77 
78     /**
79      * <p>The name of the event destination. The name must:</p> <ul> <li> <p>This value
80      * can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or
81      * dashes (-).</p> </li> <li> <p>Contain less than 64 characters.</p> </li> </ul>
82      */
SetName(Aws::String && value)83     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
84 
85     /**
86      * <p>The name of the event destination. The name must:</p> <ul> <li> <p>This value
87      * can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or
88      * dashes (-).</p> </li> <li> <p>Contain less than 64 characters.</p> </li> </ul>
89      */
SetName(const char * value)90     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
91 
92     /**
93      * <p>The name of the event destination. The name must:</p> <ul> <li> <p>This value
94      * can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or
95      * dashes (-).</p> </li> <li> <p>Contain less than 64 characters.</p> </li> </ul>
96      */
WithName(const Aws::String & value)97     inline EventDestination& WithName(const Aws::String& value) { SetName(value); return *this;}
98 
99     /**
100      * <p>The name of the event destination. The name must:</p> <ul> <li> <p>This value
101      * can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or
102      * dashes (-).</p> </li> <li> <p>Contain less than 64 characters.</p> </li> </ul>
103      */
WithName(Aws::String && value)104     inline EventDestination& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
105 
106     /**
107      * <p>The name of the event destination. The name must:</p> <ul> <li> <p>This value
108      * can only contain ASCII letters (a-z, A-Z), numbers (0-9), underscores (_), or
109      * dashes (-).</p> </li> <li> <p>Contain less than 64 characters.</p> </li> </ul>
110      */
WithName(const char * value)111     inline EventDestination& WithName(const char* value) { SetName(value); return *this;}
112 
113 
114     /**
115      * <p>Sets whether Amazon SES publishes events to this destination when you send an
116      * email with the associated configuration set. Set to <code>true</code> to enable
117      * publishing to this destination; set to <code>false</code> to prevent publishing
118      * to this destination. The default value is <code>false</code>.</p>
119      */
GetEnabled()120     inline bool GetEnabled() const{ return m_enabled; }
121 
122     /**
123      * <p>Sets whether Amazon SES publishes events to this destination when you send an
124      * email with the associated configuration set. Set to <code>true</code> to enable
125      * publishing to this destination; set to <code>false</code> to prevent publishing
126      * to this destination. The default value is <code>false</code>.</p>
127      */
EnabledHasBeenSet()128     inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
129 
130     /**
131      * <p>Sets whether Amazon SES publishes events to this destination when you send an
132      * email with the associated configuration set. Set to <code>true</code> to enable
133      * publishing to this destination; set to <code>false</code> to prevent publishing
134      * to this destination. The default value is <code>false</code>.</p>
135      */
SetEnabled(bool value)136     inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
137 
138     /**
139      * <p>Sets whether Amazon SES publishes events to this destination when you send an
140      * email with the associated configuration set. Set to <code>true</code> to enable
141      * publishing to this destination; set to <code>false</code> to prevent publishing
142      * to this destination. The default value is <code>false</code>.</p>
143      */
WithEnabled(bool value)144     inline EventDestination& WithEnabled(bool value) { SetEnabled(value); return *this;}
145 
146 
147     /**
148      * <p>The type of email sending events to publish to the event destination.</p>
149      */
GetMatchingEventTypes()150     inline const Aws::Vector<EventType>& GetMatchingEventTypes() const{ return m_matchingEventTypes; }
151 
152     /**
153      * <p>The type of email sending events to publish to the event destination.</p>
154      */
MatchingEventTypesHasBeenSet()155     inline bool MatchingEventTypesHasBeenSet() const { return m_matchingEventTypesHasBeenSet; }
156 
157     /**
158      * <p>The type of email sending events to publish to the event destination.</p>
159      */
SetMatchingEventTypes(const Aws::Vector<EventType> & value)160     inline void SetMatchingEventTypes(const Aws::Vector<EventType>& value) { m_matchingEventTypesHasBeenSet = true; m_matchingEventTypes = value; }
161 
162     /**
163      * <p>The type of email sending events to publish to the event destination.</p>
164      */
SetMatchingEventTypes(Aws::Vector<EventType> && value)165     inline void SetMatchingEventTypes(Aws::Vector<EventType>&& value) { m_matchingEventTypesHasBeenSet = true; m_matchingEventTypes = std::move(value); }
166 
167     /**
168      * <p>The type of email sending events to publish to the event destination.</p>
169      */
WithMatchingEventTypes(const Aws::Vector<EventType> & value)170     inline EventDestination& WithMatchingEventTypes(const Aws::Vector<EventType>& value) { SetMatchingEventTypes(value); return *this;}
171 
172     /**
173      * <p>The type of email sending events to publish to the event destination.</p>
174      */
WithMatchingEventTypes(Aws::Vector<EventType> && value)175     inline EventDestination& WithMatchingEventTypes(Aws::Vector<EventType>&& value) { SetMatchingEventTypes(std::move(value)); return *this;}
176 
177     /**
178      * <p>The type of email sending events to publish to the event destination.</p>
179      */
AddMatchingEventTypes(const EventType & value)180     inline EventDestination& AddMatchingEventTypes(const EventType& value) { m_matchingEventTypesHasBeenSet = true; m_matchingEventTypes.push_back(value); return *this; }
181 
182     /**
183      * <p>The type of email sending events to publish to the event destination.</p>
184      */
AddMatchingEventTypes(EventType && value)185     inline EventDestination& AddMatchingEventTypes(EventType&& value) { m_matchingEventTypesHasBeenSet = true; m_matchingEventTypes.push_back(std::move(value)); return *this; }
186 
187 
188     /**
189      * <p>An object that contains the delivery stream ARN and the IAM role ARN
190      * associated with an Amazon Kinesis Firehose event destination.</p>
191      */
GetKinesisFirehoseDestination()192     inline const KinesisFirehoseDestination& GetKinesisFirehoseDestination() const{ return m_kinesisFirehoseDestination; }
193 
194     /**
195      * <p>An object that contains the delivery stream ARN and the IAM role ARN
196      * associated with an Amazon Kinesis Firehose event destination.</p>
197      */
KinesisFirehoseDestinationHasBeenSet()198     inline bool KinesisFirehoseDestinationHasBeenSet() const { return m_kinesisFirehoseDestinationHasBeenSet; }
199 
200     /**
201      * <p>An object that contains the delivery stream ARN and the IAM role ARN
202      * associated with an Amazon Kinesis Firehose event destination.</p>
203      */
SetKinesisFirehoseDestination(const KinesisFirehoseDestination & value)204     inline void SetKinesisFirehoseDestination(const KinesisFirehoseDestination& value) { m_kinesisFirehoseDestinationHasBeenSet = true; m_kinesisFirehoseDestination = value; }
205 
206     /**
207      * <p>An object that contains the delivery stream ARN and the IAM role ARN
208      * associated with an Amazon Kinesis Firehose event destination.</p>
209      */
SetKinesisFirehoseDestination(KinesisFirehoseDestination && value)210     inline void SetKinesisFirehoseDestination(KinesisFirehoseDestination&& value) { m_kinesisFirehoseDestinationHasBeenSet = true; m_kinesisFirehoseDestination = std::move(value); }
211 
212     /**
213      * <p>An object that contains the delivery stream ARN and the IAM role ARN
214      * associated with an Amazon Kinesis Firehose event destination.</p>
215      */
WithKinesisFirehoseDestination(const KinesisFirehoseDestination & value)216     inline EventDestination& WithKinesisFirehoseDestination(const KinesisFirehoseDestination& value) { SetKinesisFirehoseDestination(value); return *this;}
217 
218     /**
219      * <p>An object that contains the delivery stream ARN and the IAM role ARN
220      * associated with an Amazon Kinesis Firehose event destination.</p>
221      */
WithKinesisFirehoseDestination(KinesisFirehoseDestination && value)222     inline EventDestination& WithKinesisFirehoseDestination(KinesisFirehoseDestination&& value) { SetKinesisFirehoseDestination(std::move(value)); return *this;}
223 
224 
225     /**
226      * <p>An object that contains the names, default values, and sources of the
227      * dimensions associated with an Amazon CloudWatch event destination.</p>
228      */
GetCloudWatchDestination()229     inline const CloudWatchDestination& GetCloudWatchDestination() const{ return m_cloudWatchDestination; }
230 
231     /**
232      * <p>An object that contains the names, default values, and sources of the
233      * dimensions associated with an Amazon CloudWatch event destination.</p>
234      */
CloudWatchDestinationHasBeenSet()235     inline bool CloudWatchDestinationHasBeenSet() const { return m_cloudWatchDestinationHasBeenSet; }
236 
237     /**
238      * <p>An object that contains the names, default values, and sources of the
239      * dimensions associated with an Amazon CloudWatch event destination.</p>
240      */
SetCloudWatchDestination(const CloudWatchDestination & value)241     inline void SetCloudWatchDestination(const CloudWatchDestination& value) { m_cloudWatchDestinationHasBeenSet = true; m_cloudWatchDestination = value; }
242 
243     /**
244      * <p>An object that contains the names, default values, and sources of the
245      * dimensions associated with an Amazon CloudWatch event destination.</p>
246      */
SetCloudWatchDestination(CloudWatchDestination && value)247     inline void SetCloudWatchDestination(CloudWatchDestination&& value) { m_cloudWatchDestinationHasBeenSet = true; m_cloudWatchDestination = std::move(value); }
248 
249     /**
250      * <p>An object that contains the names, default values, and sources of the
251      * dimensions associated with an Amazon CloudWatch event destination.</p>
252      */
WithCloudWatchDestination(const CloudWatchDestination & value)253     inline EventDestination& WithCloudWatchDestination(const CloudWatchDestination& value) { SetCloudWatchDestination(value); return *this;}
254 
255     /**
256      * <p>An object that contains the names, default values, and sources of the
257      * dimensions associated with an Amazon CloudWatch event destination.</p>
258      */
WithCloudWatchDestination(CloudWatchDestination && value)259     inline EventDestination& WithCloudWatchDestination(CloudWatchDestination&& value) { SetCloudWatchDestination(std::move(value)); return *this;}
260 
261 
262     /**
263      * <p>An object that contains the topic ARN associated with an Amazon Simple
264      * Notification Service (Amazon SNS) event destination.</p>
265      */
GetSNSDestination()266     inline const SNSDestination& GetSNSDestination() const{ return m_sNSDestination; }
267 
268     /**
269      * <p>An object that contains the topic ARN associated with an Amazon Simple
270      * Notification Service (Amazon SNS) event destination.</p>
271      */
SNSDestinationHasBeenSet()272     inline bool SNSDestinationHasBeenSet() const { return m_sNSDestinationHasBeenSet; }
273 
274     /**
275      * <p>An object that contains the topic ARN associated with an Amazon Simple
276      * Notification Service (Amazon SNS) event destination.</p>
277      */
SetSNSDestination(const SNSDestination & value)278     inline void SetSNSDestination(const SNSDestination& value) { m_sNSDestinationHasBeenSet = true; m_sNSDestination = value; }
279 
280     /**
281      * <p>An object that contains the topic ARN associated with an Amazon Simple
282      * Notification Service (Amazon SNS) event destination.</p>
283      */
SetSNSDestination(SNSDestination && value)284     inline void SetSNSDestination(SNSDestination&& value) { m_sNSDestinationHasBeenSet = true; m_sNSDestination = std::move(value); }
285 
286     /**
287      * <p>An object that contains the topic ARN associated with an Amazon Simple
288      * Notification Service (Amazon SNS) event destination.</p>
289      */
WithSNSDestination(const SNSDestination & value)290     inline EventDestination& WithSNSDestination(const SNSDestination& value) { SetSNSDestination(value); return *this;}
291 
292     /**
293      * <p>An object that contains the topic ARN associated with an Amazon Simple
294      * Notification Service (Amazon SNS) event destination.</p>
295      */
WithSNSDestination(SNSDestination && value)296     inline EventDestination& WithSNSDestination(SNSDestination&& value) { SetSNSDestination(std::move(value)); return *this;}
297 
298   private:
299 
300     Aws::String m_name;
301     bool m_nameHasBeenSet;
302 
303     bool m_enabled;
304     bool m_enabledHasBeenSet;
305 
306     Aws::Vector<EventType> m_matchingEventTypes;
307     bool m_matchingEventTypesHasBeenSet;
308 
309     KinesisFirehoseDestination m_kinesisFirehoseDestination;
310     bool m_kinesisFirehoseDestinationHasBeenSet;
311 
312     CloudWatchDestination m_cloudWatchDestination;
313     bool m_cloudWatchDestinationHasBeenSet;
314 
315     SNSDestination m_sNSDestination;
316     bool m_sNSDestinationHasBeenSet;
317   };
318 
319 } // namespace Model
320 } // namespace SES
321 } // namespace Aws
322