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/pinpoint/Pinpoint_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/pinpoint/model/CampaignEventFilter.h>
10 #include <aws/pinpoint/model/Frequency.h>
11 #include <aws/pinpoint/model/QuietTime.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace Pinpoint
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>Specifies the schedule settings for a campaign.</p><p><h3>See Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/Schedule">AWS
32    * API Reference</a></p>
33    */
34   class AWS_PINPOINT_API Schedule
35   {
36   public:
37     Schedule();
38     Schedule(Aws::Utils::Json::JsonView jsonValue);
39     Schedule& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>The scheduled time, in ISO 8601 format, when the campaign ended or will
45      * end.</p>
46      */
GetEndTime()47     inline const Aws::String& GetEndTime() const{ return m_endTime; }
48 
49     /**
50      * <p>The scheduled time, in ISO 8601 format, when the campaign ended or will
51      * end.</p>
52      */
EndTimeHasBeenSet()53     inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
54 
55     /**
56      * <p>The scheduled time, in ISO 8601 format, when the campaign ended or will
57      * end.</p>
58      */
SetEndTime(const Aws::String & value)59     inline void SetEndTime(const Aws::String& value) { m_endTimeHasBeenSet = true; m_endTime = value; }
60 
61     /**
62      * <p>The scheduled time, in ISO 8601 format, when the campaign ended or will
63      * end.</p>
64      */
SetEndTime(Aws::String && value)65     inline void SetEndTime(Aws::String&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); }
66 
67     /**
68      * <p>The scheduled time, in ISO 8601 format, when the campaign ended or will
69      * end.</p>
70      */
SetEndTime(const char * value)71     inline void SetEndTime(const char* value) { m_endTimeHasBeenSet = true; m_endTime.assign(value); }
72 
73     /**
74      * <p>The scheduled time, in ISO 8601 format, when the campaign ended or will
75      * end.</p>
76      */
WithEndTime(const Aws::String & value)77     inline Schedule& WithEndTime(const Aws::String& value) { SetEndTime(value); return *this;}
78 
79     /**
80      * <p>The scheduled time, in ISO 8601 format, when the campaign ended or will
81      * end.</p>
82      */
WithEndTime(Aws::String && value)83     inline Schedule& WithEndTime(Aws::String&& value) { SetEndTime(std::move(value)); return *this;}
84 
85     /**
86      * <p>The scheduled time, in ISO 8601 format, when the campaign ended or will
87      * end.</p>
88      */
WithEndTime(const char * value)89     inline Schedule& WithEndTime(const char* value) { SetEndTime(value); return *this;}
90 
91 
92     /**
93      * <p>The type of event that causes the campaign to be sent, if the value of the
94      * Frequency property is EVENT.</p>
95      */
GetEventFilter()96     inline const CampaignEventFilter& GetEventFilter() const{ return m_eventFilter; }
97 
98     /**
99      * <p>The type of event that causes the campaign to be sent, if the value of the
100      * Frequency property is EVENT.</p>
101      */
EventFilterHasBeenSet()102     inline bool EventFilterHasBeenSet() const { return m_eventFilterHasBeenSet; }
103 
104     /**
105      * <p>The type of event that causes the campaign to be sent, if the value of the
106      * Frequency property is EVENT.</p>
107      */
SetEventFilter(const CampaignEventFilter & value)108     inline void SetEventFilter(const CampaignEventFilter& value) { m_eventFilterHasBeenSet = true; m_eventFilter = value; }
109 
110     /**
111      * <p>The type of event that causes the campaign to be sent, if the value of the
112      * Frequency property is EVENT.</p>
113      */
SetEventFilter(CampaignEventFilter && value)114     inline void SetEventFilter(CampaignEventFilter&& value) { m_eventFilterHasBeenSet = true; m_eventFilter = std::move(value); }
115 
116     /**
117      * <p>The type of event that causes the campaign to be sent, if the value of the
118      * Frequency property is EVENT.</p>
119      */
WithEventFilter(const CampaignEventFilter & value)120     inline Schedule& WithEventFilter(const CampaignEventFilter& value) { SetEventFilter(value); return *this;}
121 
122     /**
123      * <p>The type of event that causes the campaign to be sent, if the value of the
124      * Frequency property is EVENT.</p>
125      */
WithEventFilter(CampaignEventFilter && value)126     inline Schedule& WithEventFilter(CampaignEventFilter&& value) { SetEventFilter(std::move(value)); return *this;}
127 
128 
129     /**
130      * <p>Specifies how often the campaign is sent or whether the campaign is sent in
131      * response to a specific event.</p>
132      */
GetFrequency()133     inline const Frequency& GetFrequency() const{ return m_frequency; }
134 
135     /**
136      * <p>Specifies how often the campaign is sent or whether the campaign is sent in
137      * response to a specific event.</p>
138      */
FrequencyHasBeenSet()139     inline bool FrequencyHasBeenSet() const { return m_frequencyHasBeenSet; }
140 
141     /**
142      * <p>Specifies how often the campaign is sent or whether the campaign is sent in
143      * response to a specific event.</p>
144      */
SetFrequency(const Frequency & value)145     inline void SetFrequency(const Frequency& value) { m_frequencyHasBeenSet = true; m_frequency = value; }
146 
147     /**
148      * <p>Specifies how often the campaign is sent or whether the campaign is sent in
149      * response to a specific event.</p>
150      */
SetFrequency(Frequency && value)151     inline void SetFrequency(Frequency&& value) { m_frequencyHasBeenSet = true; m_frequency = std::move(value); }
152 
153     /**
154      * <p>Specifies how often the campaign is sent or whether the campaign is sent in
155      * response to a specific event.</p>
156      */
WithFrequency(const Frequency & value)157     inline Schedule& WithFrequency(const Frequency& value) { SetFrequency(value); return *this;}
158 
159     /**
160      * <p>Specifies how often the campaign is sent or whether the campaign is sent in
161      * response to a specific event.</p>
162      */
WithFrequency(Frequency && value)163     inline Schedule& WithFrequency(Frequency&& value) { SetFrequency(std::move(value)); return *this;}
164 
165 
166     /**
167      * <p>Specifies whether the start and end times for the campaign schedule use each
168      * recipient's local time. To base the schedule on each recipient's local time, set
169      * this value to true.</p>
170      */
GetIsLocalTime()171     inline bool GetIsLocalTime() const{ return m_isLocalTime; }
172 
173     /**
174      * <p>Specifies whether the start and end times for the campaign schedule use each
175      * recipient's local time. To base the schedule on each recipient's local time, set
176      * this value to true.</p>
177      */
IsLocalTimeHasBeenSet()178     inline bool IsLocalTimeHasBeenSet() const { return m_isLocalTimeHasBeenSet; }
179 
180     /**
181      * <p>Specifies whether the start and end times for the campaign schedule use each
182      * recipient's local time. To base the schedule on each recipient's local time, set
183      * this value to true.</p>
184      */
SetIsLocalTime(bool value)185     inline void SetIsLocalTime(bool value) { m_isLocalTimeHasBeenSet = true; m_isLocalTime = value; }
186 
187     /**
188      * <p>Specifies whether the start and end times for the campaign schedule use each
189      * recipient's local time. To base the schedule on each recipient's local time, set
190      * this value to true.</p>
191      */
WithIsLocalTime(bool value)192     inline Schedule& WithIsLocalTime(bool value) { SetIsLocalTime(value); return *this;}
193 
194 
195     /**
196      * <p>The default quiet time for the campaign. Quiet time is a specific time range
197      * when a campaign doesn't send messages to endpoints, if all the following
198      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
199      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
200      * endpoint's time zone is later than or equal to the time specified by the
201      * QuietTime.Start property for the campaign.</p></li> <li><p>The current time in
202      * the endpoint's time zone is earlier than or equal to the time specified by the
203      * QuietTime.End property for the campaign.</p></li></ul> <p>If any of the
204      * preceding conditions isn't met, the endpoint will receive messages from the
205      * campaign, even if quiet time is enabled.</p>
206      */
GetQuietTime()207     inline const QuietTime& GetQuietTime() const{ return m_quietTime; }
208 
209     /**
210      * <p>The default quiet time for the campaign. Quiet time is a specific time range
211      * when a campaign doesn't send messages to endpoints, if all the following
212      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
213      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
214      * endpoint's time zone is later than or equal to the time specified by the
215      * QuietTime.Start property for the campaign.</p></li> <li><p>The current time in
216      * the endpoint's time zone is earlier than or equal to the time specified by the
217      * QuietTime.End property for the campaign.</p></li></ul> <p>If any of the
218      * preceding conditions isn't met, the endpoint will receive messages from the
219      * campaign, even if quiet time is enabled.</p>
220      */
QuietTimeHasBeenSet()221     inline bool QuietTimeHasBeenSet() const { return m_quietTimeHasBeenSet; }
222 
223     /**
224      * <p>The default quiet time for the campaign. Quiet time is a specific time range
225      * when a campaign doesn't send messages to endpoints, if all the following
226      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
227      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
228      * endpoint's time zone is later than or equal to the time specified by the
229      * QuietTime.Start property for the campaign.</p></li> <li><p>The current time in
230      * the endpoint's time zone is earlier than or equal to the time specified by the
231      * QuietTime.End property for the campaign.</p></li></ul> <p>If any of the
232      * preceding conditions isn't met, the endpoint will receive messages from the
233      * campaign, even if quiet time is enabled.</p>
234      */
SetQuietTime(const QuietTime & value)235     inline void SetQuietTime(const QuietTime& value) { m_quietTimeHasBeenSet = true; m_quietTime = value; }
236 
237     /**
238      * <p>The default quiet time for the campaign. Quiet time is a specific time range
239      * when a campaign doesn't send messages to endpoints, if all the following
240      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
241      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
242      * endpoint's time zone is later than or equal to the time specified by the
243      * QuietTime.Start property for the campaign.</p></li> <li><p>The current time in
244      * the endpoint's time zone is earlier than or equal to the time specified by the
245      * QuietTime.End property for the campaign.</p></li></ul> <p>If any of the
246      * preceding conditions isn't met, the endpoint will receive messages from the
247      * campaign, even if quiet time is enabled.</p>
248      */
SetQuietTime(QuietTime && value)249     inline void SetQuietTime(QuietTime&& value) { m_quietTimeHasBeenSet = true; m_quietTime = std::move(value); }
250 
251     /**
252      * <p>The default quiet time for the campaign. Quiet time is a specific time range
253      * when a campaign doesn't send messages to endpoints, if all the following
254      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
255      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
256      * endpoint's time zone is later than or equal to the time specified by the
257      * QuietTime.Start property for the campaign.</p></li> <li><p>The current time in
258      * the endpoint's time zone is earlier than or equal to the time specified by the
259      * QuietTime.End property for the campaign.</p></li></ul> <p>If any of the
260      * preceding conditions isn't met, the endpoint will receive messages from the
261      * campaign, even if quiet time is enabled.</p>
262      */
WithQuietTime(const QuietTime & value)263     inline Schedule& WithQuietTime(const QuietTime& value) { SetQuietTime(value); return *this;}
264 
265     /**
266      * <p>The default quiet time for the campaign. Quiet time is a specific time range
267      * when a campaign doesn't send messages to endpoints, if all the following
268      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
269      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
270      * endpoint's time zone is later than or equal to the time specified by the
271      * QuietTime.Start property for the campaign.</p></li> <li><p>The current time in
272      * the endpoint's time zone is earlier than or equal to the time specified by the
273      * QuietTime.End property for the campaign.</p></li></ul> <p>If any of the
274      * preceding conditions isn't met, the endpoint will receive messages from the
275      * campaign, even if quiet time is enabled.</p>
276      */
WithQuietTime(QuietTime && value)277     inline Schedule& WithQuietTime(QuietTime&& value) { SetQuietTime(std::move(value)); return *this;}
278 
279 
280     /**
281      * <p>The scheduled time when the campaign began or will begin. Valid values are:
282      * IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601
283      * format.</p>
284      */
GetStartTime()285     inline const Aws::String& GetStartTime() const{ return m_startTime; }
286 
287     /**
288      * <p>The scheduled time when the campaign began or will begin. Valid values are:
289      * IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601
290      * format.</p>
291      */
StartTimeHasBeenSet()292     inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
293 
294     /**
295      * <p>The scheduled time when the campaign began or will begin. Valid values are:
296      * IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601
297      * format.</p>
298      */
SetStartTime(const Aws::String & value)299     inline void SetStartTime(const Aws::String& value) { m_startTimeHasBeenSet = true; m_startTime = value; }
300 
301     /**
302      * <p>The scheduled time when the campaign began or will begin. Valid values are:
303      * IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601
304      * format.</p>
305      */
SetStartTime(Aws::String && value)306     inline void SetStartTime(Aws::String&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); }
307 
308     /**
309      * <p>The scheduled time when the campaign began or will begin. Valid values are:
310      * IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601
311      * format.</p>
312      */
SetStartTime(const char * value)313     inline void SetStartTime(const char* value) { m_startTimeHasBeenSet = true; m_startTime.assign(value); }
314 
315     /**
316      * <p>The scheduled time when the campaign began or will begin. Valid values are:
317      * IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601
318      * format.</p>
319      */
WithStartTime(const Aws::String & value)320     inline Schedule& WithStartTime(const Aws::String& value) { SetStartTime(value); return *this;}
321 
322     /**
323      * <p>The scheduled time when the campaign began or will begin. Valid values are:
324      * IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601
325      * format.</p>
326      */
WithStartTime(Aws::String && value)327     inline Schedule& WithStartTime(Aws::String&& value) { SetStartTime(std::move(value)); return *this;}
328 
329     /**
330      * <p>The scheduled time when the campaign began or will begin. Valid values are:
331      * IMMEDIATE, to start the campaign immediately; or, a specific time in ISO 8601
332      * format.</p>
333      */
WithStartTime(const char * value)334     inline Schedule& WithStartTime(const char* value) { SetStartTime(value); return *this;}
335 
336 
337     /**
338      * <p>The starting UTC offset for the campaign schedule, if the value of the
339      * IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03,
340      * UTC+03:30, UTC+04, UTC+04:30, UTC+05,
341                   UTC+05:30, UTC+05:45,
342      * UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,
343                   UTC+10,
344      * UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,
345 
346      *             UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
347      */
GetTimezone()348     inline const Aws::String& GetTimezone() const{ return m_timezone; }
349 
350     /**
351      * <p>The starting UTC offset for the campaign schedule, if the value of the
352      * IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03,
353      * UTC+03:30, UTC+04, UTC+04:30, UTC+05,
354                   UTC+05:30, UTC+05:45,
355      * UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,
356                   UTC+10,
357      * UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,
358 
359      *             UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
360      */
TimezoneHasBeenSet()361     inline bool TimezoneHasBeenSet() const { return m_timezoneHasBeenSet; }
362 
363     /**
364      * <p>The starting UTC offset for the campaign schedule, if the value of the
365      * IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03,
366      * UTC+03:30, UTC+04, UTC+04:30, UTC+05,
367                   UTC+05:30, UTC+05:45,
368      * UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,
369                   UTC+10,
370      * UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,
371 
372      *             UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
373      */
SetTimezone(const Aws::String & value)374     inline void SetTimezone(const Aws::String& value) { m_timezoneHasBeenSet = true; m_timezone = value; }
375 
376     /**
377      * <p>The starting UTC offset for the campaign schedule, if the value of the
378      * IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03,
379      * UTC+03:30, UTC+04, UTC+04:30, UTC+05,
380                   UTC+05:30, UTC+05:45,
381      * UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,
382                   UTC+10,
383      * UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,
384 
385      *             UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
386      */
SetTimezone(Aws::String && value)387     inline void SetTimezone(Aws::String&& value) { m_timezoneHasBeenSet = true; m_timezone = std::move(value); }
388 
389     /**
390      * <p>The starting UTC offset for the campaign schedule, if the value of the
391      * IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03,
392      * UTC+03:30, UTC+04, UTC+04:30, UTC+05,
393                   UTC+05:30, UTC+05:45,
394      * UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,
395                   UTC+10,
396      * UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,
397 
398      *             UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
399      */
SetTimezone(const char * value)400     inline void SetTimezone(const char* value) { m_timezoneHasBeenSet = true; m_timezone.assign(value); }
401 
402     /**
403      * <p>The starting UTC offset for the campaign schedule, if the value of the
404      * IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03,
405      * UTC+03:30, UTC+04, UTC+04:30, UTC+05,
406                   UTC+05:30, UTC+05:45,
407      * UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,
408                   UTC+10,
409      * UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,
410 
411      *             UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
412      */
WithTimezone(const Aws::String & value)413     inline Schedule& WithTimezone(const Aws::String& value) { SetTimezone(value); return *this;}
414 
415     /**
416      * <p>The starting UTC offset for the campaign schedule, if the value of the
417      * IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03,
418      * UTC+03:30, UTC+04, UTC+04:30, UTC+05,
419                   UTC+05:30, UTC+05:45,
420      * UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,
421                   UTC+10,
422      * UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,
423 
424      *             UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
425      */
WithTimezone(Aws::String && value)426     inline Schedule& WithTimezone(Aws::String&& value) { SetTimezone(std::move(value)); return *this;}
427 
428     /**
429      * <p>The starting UTC offset for the campaign schedule, if the value of the
430      * IsLocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03,
431      * UTC+03:30, UTC+04, UTC+04:30, UTC+05,
432                   UTC+05:30, UTC+05:45,
433      * UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+09, UTC+09:30,
434                   UTC+10,
435      * UTC+10:30, UTC+11, UTC+12, UTC+13, UTC-02, UTC-03, UTC-04, UTC-05, UTC-06,
436 
437      *             UTC-07, UTC-08, UTC-09, UTC-10, and UTC-11.</p>
438      */
WithTimezone(const char * value)439     inline Schedule& WithTimezone(const char* value) { SetTimezone(value); return *this;}
440 
441   private:
442 
443     Aws::String m_endTime;
444     bool m_endTimeHasBeenSet;
445 
446     CampaignEventFilter m_eventFilter;
447     bool m_eventFilterHasBeenSet;
448 
449     Frequency m_frequency;
450     bool m_frequencyHasBeenSet;
451 
452     bool m_isLocalTime;
453     bool m_isLocalTimeHasBeenSet;
454 
455     QuietTime m_quietTime;
456     bool m_quietTimeHasBeenSet;
457 
458     Aws::String m_startTime;
459     bool m_startTimeHasBeenSet;
460 
461     Aws::String m_timezone;
462     bool m_timezoneHasBeenSet;
463   };
464 
465 } // namespace Model
466 } // namespace Pinpoint
467 } // namespace Aws
468