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 
9 namespace Aws
10 {
11 namespace Utils
12 {
13 namespace Json
14 {
15   class JsonValue;
16   class JsonView;
17 } // namespace Json
18 } // namespace Utils
19 namespace Pinpoint
20 {
21 namespace Model
22 {
23 
24   /**
25    * <p>For a campaign, specifies limits on the messages that the campaign can send.
26    * For an application, specifies the default limits for messages that campaigns in
27    * the application can send.</p><p><h3>See Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CampaignLimits">AWS
29    * API Reference</a></p>
30    */
31   class AWS_PINPOINT_API CampaignLimits
32   {
33   public:
34     CampaignLimits();
35     CampaignLimits(Aws::Utils::Json::JsonView jsonValue);
36     CampaignLimits& operator=(Aws::Utils::Json::JsonView jsonValue);
37     Aws::Utils::Json::JsonValue Jsonize() const;
38 
39 
40     /**
41      * <p>The maximum number of messages that a campaign can send to a single endpoint
42      * during a 24-hour period. For an application, this value specifies the default
43      * limit for the number of messages that campaigns and journeys can send to a
44      * single endpoint during a 24-hour period. The maximum value is 100.</p>
45      */
GetDaily()46     inline int GetDaily() const{ return m_daily; }
47 
48     /**
49      * <p>The maximum number of messages that a campaign can send to a single endpoint
50      * during a 24-hour period. For an application, this value specifies the default
51      * limit for the number of messages that campaigns and journeys can send to a
52      * single endpoint during a 24-hour period. The maximum value is 100.</p>
53      */
DailyHasBeenSet()54     inline bool DailyHasBeenSet() const { return m_dailyHasBeenSet; }
55 
56     /**
57      * <p>The maximum number of messages that a campaign can send to a single endpoint
58      * during a 24-hour period. For an application, this value specifies the default
59      * limit for the number of messages that campaigns and journeys can send to a
60      * single endpoint during a 24-hour period. The maximum value is 100.</p>
61      */
SetDaily(int value)62     inline void SetDaily(int value) { m_dailyHasBeenSet = true; m_daily = value; }
63 
64     /**
65      * <p>The maximum number of messages that a campaign can send to a single endpoint
66      * during a 24-hour period. For an application, this value specifies the default
67      * limit for the number of messages that campaigns and journeys can send to a
68      * single endpoint during a 24-hour period. The maximum value is 100.</p>
69      */
WithDaily(int value)70     inline CampaignLimits& WithDaily(int value) { SetDaily(value); return *this;}
71 
72 
73     /**
74      * <p>The maximum amount of time, in seconds, that a campaign can attempt to
75      * deliver a message after the scheduled start time for the campaign. The minimum
76      * value is 60 seconds.</p>
77      */
GetMaximumDuration()78     inline int GetMaximumDuration() const{ return m_maximumDuration; }
79 
80     /**
81      * <p>The maximum amount of time, in seconds, that a campaign can attempt to
82      * deliver a message after the scheduled start time for the campaign. The minimum
83      * value is 60 seconds.</p>
84      */
MaximumDurationHasBeenSet()85     inline bool MaximumDurationHasBeenSet() const { return m_maximumDurationHasBeenSet; }
86 
87     /**
88      * <p>The maximum amount of time, in seconds, that a campaign can attempt to
89      * deliver a message after the scheduled start time for the campaign. The minimum
90      * value is 60 seconds.</p>
91      */
SetMaximumDuration(int value)92     inline void SetMaximumDuration(int value) { m_maximumDurationHasBeenSet = true; m_maximumDuration = value; }
93 
94     /**
95      * <p>The maximum amount of time, in seconds, that a campaign can attempt to
96      * deliver a message after the scheduled start time for the campaign. The minimum
97      * value is 60 seconds.</p>
98      */
WithMaximumDuration(int value)99     inline CampaignLimits& WithMaximumDuration(int value) { SetMaximumDuration(value); return *this;}
100 
101 
102     /**
103      * <p>The maximum number of messages that a campaign can send each second. For an
104      * application, this value specifies the default limit for the number of messages
105      * that campaigns can send each second. The minimum value is 50. The maximum value
106      * is 20,000.</p>
107      */
GetMessagesPerSecond()108     inline int GetMessagesPerSecond() const{ return m_messagesPerSecond; }
109 
110     /**
111      * <p>The maximum number of messages that a campaign can send each second. For an
112      * application, this value specifies the default limit for the number of messages
113      * that campaigns can send each second. The minimum value is 50. The maximum value
114      * is 20,000.</p>
115      */
MessagesPerSecondHasBeenSet()116     inline bool MessagesPerSecondHasBeenSet() const { return m_messagesPerSecondHasBeenSet; }
117 
118     /**
119      * <p>The maximum number of messages that a campaign can send each second. For an
120      * application, this value specifies the default limit for the number of messages
121      * that campaigns can send each second. The minimum value is 50. The maximum value
122      * is 20,000.</p>
123      */
SetMessagesPerSecond(int value)124     inline void SetMessagesPerSecond(int value) { m_messagesPerSecondHasBeenSet = true; m_messagesPerSecond = value; }
125 
126     /**
127      * <p>The maximum number of messages that a campaign can send each second. For an
128      * application, this value specifies the default limit for the number of messages
129      * that campaigns can send each second. The minimum value is 50. The maximum value
130      * is 20,000.</p>
131      */
WithMessagesPerSecond(int value)132     inline CampaignLimits& WithMessagesPerSecond(int value) { SetMessagesPerSecond(value); return *this;}
133 
134 
135     /**
136      * <p>The maximum number of messages that a campaign can send to a single endpoint
137      * during the course of the campaign. If a campaign recurs, this setting applies to
138      * all runs of the campaign. The maximum value is 100.</p>
139      */
GetTotal()140     inline int GetTotal() const{ return m_total; }
141 
142     /**
143      * <p>The maximum number of messages that a campaign can send to a single endpoint
144      * during the course of the campaign. If a campaign recurs, this setting applies to
145      * all runs of the campaign. The maximum value is 100.</p>
146      */
TotalHasBeenSet()147     inline bool TotalHasBeenSet() const { return m_totalHasBeenSet; }
148 
149     /**
150      * <p>The maximum number of messages that a campaign can send to a single endpoint
151      * during the course of the campaign. If a campaign recurs, this setting applies to
152      * all runs of the campaign. The maximum value is 100.</p>
153      */
SetTotal(int value)154     inline void SetTotal(int value) { m_totalHasBeenSet = true; m_total = value; }
155 
156     /**
157      * <p>The maximum number of messages that a campaign can send to a single endpoint
158      * during the course of the campaign. If a campaign recurs, this setting applies to
159      * all runs of the campaign. The maximum value is 100.</p>
160      */
WithTotal(int value)161     inline CampaignLimits& WithTotal(int value) { SetTotal(value); return *this;}
162 
163 
164     /**
165      * <p>The maximum total number of messages that the campaign can send per user
166      * session.</p>
167      */
GetSession()168     inline int GetSession() const{ return m_session; }
169 
170     /**
171      * <p>The maximum total number of messages that the campaign can send per user
172      * session.</p>
173      */
SessionHasBeenSet()174     inline bool SessionHasBeenSet() const { return m_sessionHasBeenSet; }
175 
176     /**
177      * <p>The maximum total number of messages that the campaign can send per user
178      * session.</p>
179      */
SetSession(int value)180     inline void SetSession(int value) { m_sessionHasBeenSet = true; m_session = value; }
181 
182     /**
183      * <p>The maximum total number of messages that the campaign can send per user
184      * session.</p>
185      */
WithSession(int value)186     inline CampaignLimits& WithSession(int value) { SetSession(value); return *this;}
187 
188   private:
189 
190     int m_daily;
191     bool m_dailyHasBeenSet;
192 
193     int m_maximumDuration;
194     bool m_maximumDurationHasBeenSet;
195 
196     int m_messagesPerSecond;
197     bool m_messagesPerSecondHasBeenSet;
198 
199     int m_total;
200     bool m_totalHasBeenSet;
201 
202     int m_session;
203     bool m_sessionHasBeenSet;
204   };
205 
206 } // namespace Model
207 } // namespace Pinpoint
208 } // namespace Aws
209