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/pinpoint/model/CampaignHook.h>
9 #include <aws/pinpoint/model/CampaignLimits.h>
10 #include <aws/pinpoint/model/QuietTime.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace Pinpoint
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>Specifies the default settings for an application.</p><p><h3>See Also:</h3>
30    * <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/WriteApplicationSettingsRequest">AWS
32    * API Reference</a></p>
33    */
34   class AWS_PINPOINT_API WriteApplicationSettingsRequest
35   {
36   public:
37     WriteApplicationSettingsRequest();
38     WriteApplicationSettingsRequest(Aws::Utils::Json::JsonView jsonValue);
39     WriteApplicationSettingsRequest& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>The settings for the AWS Lambda function to invoke by default as a code hook
45      * for campaigns in the application. You can use this hook to customize segments
46      * that are used by campaigns in the application.</p> <p>To override these settings
47      * and define custom settings for a specific campaign, use the CampaignHook object
48      * of the <link
49      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
50      * resource.</p>
51      */
GetCampaignHook()52     inline const CampaignHook& GetCampaignHook() const{ return m_campaignHook; }
53 
54     /**
55      * <p>The settings for the AWS Lambda function to invoke by default as a code hook
56      * for campaigns in the application. You can use this hook to customize segments
57      * that are used by campaigns in the application.</p> <p>To override these settings
58      * and define custom settings for a specific campaign, use the CampaignHook object
59      * of the <link
60      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
61      * resource.</p>
62      */
CampaignHookHasBeenSet()63     inline bool CampaignHookHasBeenSet() const { return m_campaignHookHasBeenSet; }
64 
65     /**
66      * <p>The settings for the AWS Lambda function to invoke by default as a code hook
67      * for campaigns in the application. You can use this hook to customize segments
68      * that are used by campaigns in the application.</p> <p>To override these settings
69      * and define custom settings for a specific campaign, use the CampaignHook object
70      * of the <link
71      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
72      * resource.</p>
73      */
SetCampaignHook(const CampaignHook & value)74     inline void SetCampaignHook(const CampaignHook& value) { m_campaignHookHasBeenSet = true; m_campaignHook = value; }
75 
76     /**
77      * <p>The settings for the AWS Lambda function to invoke by default as a code hook
78      * for campaigns in the application. You can use this hook to customize segments
79      * that are used by campaigns in the application.</p> <p>To override these settings
80      * and define custom settings for a specific campaign, use the CampaignHook object
81      * of the <link
82      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
83      * resource.</p>
84      */
SetCampaignHook(CampaignHook && value)85     inline void SetCampaignHook(CampaignHook&& value) { m_campaignHookHasBeenSet = true; m_campaignHook = std::move(value); }
86 
87     /**
88      * <p>The settings for the AWS Lambda function to invoke by default as a code hook
89      * for campaigns in the application. You can use this hook to customize segments
90      * that are used by campaigns in the application.</p> <p>To override these settings
91      * and define custom settings for a specific campaign, use the CampaignHook object
92      * of the <link
93      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
94      * resource.</p>
95      */
WithCampaignHook(const CampaignHook & value)96     inline WriteApplicationSettingsRequest& WithCampaignHook(const CampaignHook& value) { SetCampaignHook(value); return *this;}
97 
98     /**
99      * <p>The settings for the AWS Lambda function to invoke by default as a code hook
100      * for campaigns in the application. You can use this hook to customize segments
101      * that are used by campaigns in the application.</p> <p>To override these settings
102      * and define custom settings for a specific campaign, use the CampaignHook object
103      * of the <link
104      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
105      * resource.</p>
106      */
WithCampaignHook(CampaignHook && value)107     inline WriteApplicationSettingsRequest& WithCampaignHook(CampaignHook&& value) { SetCampaignHook(std::move(value)); return *this;}
108 
109 
110     /**
111      * <p>Specifies whether to enable application-related alarms in Amazon
112      * CloudWatch.</p>
113      */
GetCloudWatchMetricsEnabled()114     inline bool GetCloudWatchMetricsEnabled() const{ return m_cloudWatchMetricsEnabled; }
115 
116     /**
117      * <p>Specifies whether to enable application-related alarms in Amazon
118      * CloudWatch.</p>
119      */
CloudWatchMetricsEnabledHasBeenSet()120     inline bool CloudWatchMetricsEnabledHasBeenSet() const { return m_cloudWatchMetricsEnabledHasBeenSet; }
121 
122     /**
123      * <p>Specifies whether to enable application-related alarms in Amazon
124      * CloudWatch.</p>
125      */
SetCloudWatchMetricsEnabled(bool value)126     inline void SetCloudWatchMetricsEnabled(bool value) { m_cloudWatchMetricsEnabledHasBeenSet = true; m_cloudWatchMetricsEnabled = value; }
127 
128     /**
129      * <p>Specifies whether to enable application-related alarms in Amazon
130      * CloudWatch.</p>
131      */
WithCloudWatchMetricsEnabled(bool value)132     inline WriteApplicationSettingsRequest& WithCloudWatchMetricsEnabled(bool value) { SetCloudWatchMetricsEnabled(value); return *this;}
133 
134 
135 
GetEventTaggingEnabled()136     inline bool GetEventTaggingEnabled() const{ return m_eventTaggingEnabled; }
137 
138 
EventTaggingEnabledHasBeenSet()139     inline bool EventTaggingEnabledHasBeenSet() const { return m_eventTaggingEnabledHasBeenSet; }
140 
141 
SetEventTaggingEnabled(bool value)142     inline void SetEventTaggingEnabled(bool value) { m_eventTaggingEnabledHasBeenSet = true; m_eventTaggingEnabled = value; }
143 
144 
WithEventTaggingEnabled(bool value)145     inline WriteApplicationSettingsRequest& WithEventTaggingEnabled(bool value) { SetEventTaggingEnabled(value); return *this;}
146 
147 
148     /**
149      * <p>The default sending limits for campaigns in the application. To override
150      * these limits and define custom limits for a specific campaign or journey, use
151      * the <link  linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
152      * resource or the <link
153      * linkend="apps-application-id-journeys-journey-id">Journey</link> resource,
154      * respectively.</p>
155      */
GetLimits()156     inline const CampaignLimits& GetLimits() const{ return m_limits; }
157 
158     /**
159      * <p>The default sending limits for campaigns in the application. To override
160      * these limits and define custom limits for a specific campaign or journey, use
161      * the <link  linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
162      * resource or the <link
163      * linkend="apps-application-id-journeys-journey-id">Journey</link> resource,
164      * respectively.</p>
165      */
LimitsHasBeenSet()166     inline bool LimitsHasBeenSet() const { return m_limitsHasBeenSet; }
167 
168     /**
169      * <p>The default sending limits for campaigns in the application. To override
170      * these limits and define custom limits for a specific campaign or journey, use
171      * the <link  linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
172      * resource or the <link
173      * linkend="apps-application-id-journeys-journey-id">Journey</link> resource,
174      * respectively.</p>
175      */
SetLimits(const CampaignLimits & value)176     inline void SetLimits(const CampaignLimits& value) { m_limitsHasBeenSet = true; m_limits = value; }
177 
178     /**
179      * <p>The default sending limits for campaigns in the application. To override
180      * these limits and define custom limits for a specific campaign or journey, use
181      * the <link  linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
182      * resource or the <link
183      * linkend="apps-application-id-journeys-journey-id">Journey</link> resource,
184      * respectively.</p>
185      */
SetLimits(CampaignLimits && value)186     inline void SetLimits(CampaignLimits&& value) { m_limitsHasBeenSet = true; m_limits = std::move(value); }
187 
188     /**
189      * <p>The default sending limits for campaigns in the application. To override
190      * these limits and define custom limits for a specific campaign or journey, use
191      * the <link  linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
192      * resource or the <link
193      * linkend="apps-application-id-journeys-journey-id">Journey</link> resource,
194      * respectively.</p>
195      */
WithLimits(const CampaignLimits & value)196     inline WriteApplicationSettingsRequest& WithLimits(const CampaignLimits& value) { SetLimits(value); return *this;}
197 
198     /**
199      * <p>The default sending limits for campaigns in the application. To override
200      * these limits and define custom limits for a specific campaign or journey, use
201      * the <link  linkend="apps-application-id-campaigns-campaign-id">Campaign</link>
202      * resource or the <link
203      * linkend="apps-application-id-journeys-journey-id">Journey</link> resource,
204      * respectively.</p>
205      */
WithLimits(CampaignLimits && value)206     inline WriteApplicationSettingsRequest& WithLimits(CampaignLimits&& value) { SetLimits(std::move(value)); return *this;}
207 
208 
209     /**
210      * <p>The default quiet time for campaigns in the application. Quiet time is a
211      * specific time range when messages aren't sent 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 application (or a campaign or journey that has
216      * custom quiet time settings).</p></li> <li><p>The current time in the endpoint's
217      * time zone is earlier than or equal to the time specified by the QuietTime.End
218      * property for the application (or a campaign or journey that has custom quiet
219      * time settings).</p></li></ul> <p>If any of the preceding conditions isn't met,
220      * the endpoint will receive messages from a campaign or journey, even if quiet
221      * time is enabled.</p> <p>To override the default quiet time settings for a
222      * specific campaign or journey, use the <link
223      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link> resource or
224      * the <link  linkend="apps-application-id-journeys-journey-id">Journey</link>
225      * resource to define a custom quiet time for the campaign or journey.</p>
226      */
GetQuietTime()227     inline const QuietTime& GetQuietTime() const{ return m_quietTime; }
228 
229     /**
230      * <p>The default quiet time for campaigns in the application. Quiet time is a
231      * specific time range when messages aren't sent to endpoints, if all the following
232      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
233      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
234      * endpoint's time zone is later than or equal to the time specified by the
235      * QuietTime.Start property for the application (or a campaign or journey that has
236      * custom quiet time settings).</p></li> <li><p>The current time in the endpoint's
237      * time zone is earlier than or equal to the time specified by the QuietTime.End
238      * property for the application (or a campaign or journey that has custom quiet
239      * time settings).</p></li></ul> <p>If any of the preceding conditions isn't met,
240      * the endpoint will receive messages from a campaign or journey, even if quiet
241      * time is enabled.</p> <p>To override the default quiet time settings for a
242      * specific campaign or journey, use the <link
243      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link> resource or
244      * the <link  linkend="apps-application-id-journeys-journey-id">Journey</link>
245      * resource to define a custom quiet time for the campaign or journey.</p>
246      */
QuietTimeHasBeenSet()247     inline bool QuietTimeHasBeenSet() const { return m_quietTimeHasBeenSet; }
248 
249     /**
250      * <p>The default quiet time for campaigns in the application. Quiet time is a
251      * specific time range when messages aren't sent to endpoints, if all the following
252      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
253      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
254      * endpoint's time zone is later than or equal to the time specified by the
255      * QuietTime.Start property for the application (or a campaign or journey that has
256      * custom quiet time settings).</p></li> <li><p>The current time in the endpoint's
257      * time zone is earlier than or equal to the time specified by the QuietTime.End
258      * property for the application (or a campaign or journey that has custom quiet
259      * time settings).</p></li></ul> <p>If any of the preceding conditions isn't met,
260      * the endpoint will receive messages from a campaign or journey, even if quiet
261      * time is enabled.</p> <p>To override the default quiet time settings for a
262      * specific campaign or journey, use the <link
263      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link> resource or
264      * the <link  linkend="apps-application-id-journeys-journey-id">Journey</link>
265      * resource to define a custom quiet time for the campaign or journey.</p>
266      */
SetQuietTime(const QuietTime & value)267     inline void SetQuietTime(const QuietTime& value) { m_quietTimeHasBeenSet = true; m_quietTime = value; }
268 
269     /**
270      * <p>The default quiet time for campaigns in the application. Quiet time is a
271      * specific time range when messages aren't sent to endpoints, if all the following
272      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
273      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
274      * endpoint's time zone is later than or equal to the time specified by the
275      * QuietTime.Start property for the application (or a campaign or journey that has
276      * custom quiet time settings).</p></li> <li><p>The current time in the endpoint's
277      * time zone is earlier than or equal to the time specified by the QuietTime.End
278      * property for the application (or a campaign or journey that has custom quiet
279      * time settings).</p></li></ul> <p>If any of the preceding conditions isn't met,
280      * the endpoint will receive messages from a campaign or journey, even if quiet
281      * time is enabled.</p> <p>To override the default quiet time settings for a
282      * specific campaign or journey, use the <link
283      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link> resource or
284      * the <link  linkend="apps-application-id-journeys-journey-id">Journey</link>
285      * resource to define a custom quiet time for the campaign or journey.</p>
286      */
SetQuietTime(QuietTime && value)287     inline void SetQuietTime(QuietTime&& value) { m_quietTimeHasBeenSet = true; m_quietTime = std::move(value); }
288 
289     /**
290      * <p>The default quiet time for campaigns in the application. Quiet time is a
291      * specific time range when messages aren't sent to endpoints, if all the following
292      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
293      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
294      * endpoint's time zone is later than or equal to the time specified by the
295      * QuietTime.Start property for the application (or a campaign or journey that has
296      * custom quiet time settings).</p></li> <li><p>The current time in the endpoint's
297      * time zone is earlier than or equal to the time specified by the QuietTime.End
298      * property for the application (or a campaign or journey that has custom quiet
299      * time settings).</p></li></ul> <p>If any of the preceding conditions isn't met,
300      * the endpoint will receive messages from a campaign or journey, even if quiet
301      * time is enabled.</p> <p>To override the default quiet time settings for a
302      * specific campaign or journey, use the <link
303      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link> resource or
304      * the <link  linkend="apps-application-id-journeys-journey-id">Journey</link>
305      * resource to define a custom quiet time for the campaign or journey.</p>
306      */
WithQuietTime(const QuietTime & value)307     inline WriteApplicationSettingsRequest& WithQuietTime(const QuietTime& value) { SetQuietTime(value); return *this;}
308 
309     /**
310      * <p>The default quiet time for campaigns in the application. Quiet time is a
311      * specific time range when messages aren't sent to endpoints, if all the following
312      * conditions are met:</p> <ul><li><p>The EndpointDemographic.Timezone property of
313      * the endpoint is set to a valid value.</p></li> <li><p>The current time in the
314      * endpoint's time zone is later than or equal to the time specified by the
315      * QuietTime.Start property for the application (or a campaign or journey that has
316      * custom quiet time settings).</p></li> <li><p>The current time in the endpoint's
317      * time zone is earlier than or equal to the time specified by the QuietTime.End
318      * property for the application (or a campaign or journey that has custom quiet
319      * time settings).</p></li></ul> <p>If any of the preceding conditions isn't met,
320      * the endpoint will receive messages from a campaign or journey, even if quiet
321      * time is enabled.</p> <p>To override the default quiet time settings for a
322      * specific campaign or journey, use the <link
323      * linkend="apps-application-id-campaigns-campaign-id">Campaign</link> resource or
324      * the <link  linkend="apps-application-id-journeys-journey-id">Journey</link>
325      * resource to define a custom quiet time for the campaign or journey.</p>
326      */
WithQuietTime(QuietTime && value)327     inline WriteApplicationSettingsRequest& WithQuietTime(QuietTime&& value) { SetQuietTime(std::move(value)); return *this;}
328 
329   private:
330 
331     CampaignHook m_campaignHook;
332     bool m_campaignHookHasBeenSet;
333 
334     bool m_cloudWatchMetricsEnabled;
335     bool m_cloudWatchMetricsEnabledHasBeenSet;
336 
337     bool m_eventTaggingEnabled;
338     bool m_eventTaggingEnabledHasBeenSet;
339 
340     CampaignLimits m_limits;
341     bool m_limitsHasBeenSet;
342 
343     QuietTime m_quietTime;
344     bool m_quietTimeHasBeenSet;
345   };
346 
347 } // namespace Model
348 } // namespace Pinpoint
349 } // namespace Aws
350