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/redshift/Redshift_EXPORTS.h>
8 #include <aws/redshift/RedshiftRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/redshift/model/UsageLimitFeatureType.h>
11 #include <aws/redshift/model/UsageLimitLimitType.h>
12 #include <aws/redshift/model/UsageLimitPeriod.h>
13 #include <aws/redshift/model/UsageLimitBreachAction.h>
14 #include <aws/core/utils/memory/stl/AWSVector.h>
15 #include <aws/redshift/model/Tag.h>
16 #include <utility>
17 
18 namespace Aws
19 {
20 namespace Redshift
21 {
22 namespace Model
23 {
24 
25   /**
26    */
27   class AWS_REDSHIFT_API CreateUsageLimitRequest : public RedshiftRequest
28   {
29   public:
30     CreateUsageLimitRequest();
31 
32     // Service request name is the Operation name which will send this request out,
33     // each operation should has unique request name, so that we can get operation's name from this request.
34     // Note: this is not true for response, multiple operations may have the same response name,
35     // so we can not get operation's name from response.
GetServiceRequestName()36     inline virtual const char* GetServiceRequestName() const override { return "CreateUsageLimit"; }
37 
38     Aws::String SerializePayload() const override;
39 
40   protected:
41     void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
42 
43   public:
44 
45     /**
46      * <p>The identifier of the cluster that you want to limit usage.</p>
47      */
GetClusterIdentifier()48     inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; }
49 
50     /**
51      * <p>The identifier of the cluster that you want to limit usage.</p>
52      */
ClusterIdentifierHasBeenSet()53     inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; }
54 
55     /**
56      * <p>The identifier of the cluster that you want to limit usage.</p>
57      */
SetClusterIdentifier(const Aws::String & value)58     inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = value; }
59 
60     /**
61      * <p>The identifier of the cluster that you want to limit usage.</p>
62      */
SetClusterIdentifier(Aws::String && value)63     inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = std::move(value); }
64 
65     /**
66      * <p>The identifier of the cluster that you want to limit usage.</p>
67      */
SetClusterIdentifier(const char * value)68     inline void SetClusterIdentifier(const char* value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier.assign(value); }
69 
70     /**
71      * <p>The identifier of the cluster that you want to limit usage.</p>
72      */
WithClusterIdentifier(const Aws::String & value)73     inline CreateUsageLimitRequest& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;}
74 
75     /**
76      * <p>The identifier of the cluster that you want to limit usage.</p>
77      */
WithClusterIdentifier(Aws::String && value)78     inline CreateUsageLimitRequest& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;}
79 
80     /**
81      * <p>The identifier of the cluster that you want to limit usage.</p>
82      */
WithClusterIdentifier(const char * value)83     inline CreateUsageLimitRequest& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;}
84 
85 
86     /**
87      * <p>The Amazon Redshift feature that you want to limit.</p>
88      */
GetFeatureType()89     inline const UsageLimitFeatureType& GetFeatureType() const{ return m_featureType; }
90 
91     /**
92      * <p>The Amazon Redshift feature that you want to limit.</p>
93      */
FeatureTypeHasBeenSet()94     inline bool FeatureTypeHasBeenSet() const { return m_featureTypeHasBeenSet; }
95 
96     /**
97      * <p>The Amazon Redshift feature that you want to limit.</p>
98      */
SetFeatureType(const UsageLimitFeatureType & value)99     inline void SetFeatureType(const UsageLimitFeatureType& value) { m_featureTypeHasBeenSet = true; m_featureType = value; }
100 
101     /**
102      * <p>The Amazon Redshift feature that you want to limit.</p>
103      */
SetFeatureType(UsageLimitFeatureType && value)104     inline void SetFeatureType(UsageLimitFeatureType&& value) { m_featureTypeHasBeenSet = true; m_featureType = std::move(value); }
105 
106     /**
107      * <p>The Amazon Redshift feature that you want to limit.</p>
108      */
WithFeatureType(const UsageLimitFeatureType & value)109     inline CreateUsageLimitRequest& WithFeatureType(const UsageLimitFeatureType& value) { SetFeatureType(value); return *this;}
110 
111     /**
112      * <p>The Amazon Redshift feature that you want to limit.</p>
113      */
WithFeatureType(UsageLimitFeatureType && value)114     inline CreateUsageLimitRequest& WithFeatureType(UsageLimitFeatureType&& value) { SetFeatureType(std::move(value)); return *this;}
115 
116 
117     /**
118      * <p>The type of limit. Depending on the feature type, this can be based on a time
119      * duration or data size. If <code>FeatureType</code> is <code>spectrum</code>,
120      * then <code>LimitType</code> must be <code>data-scanned</code>. If
121      * <code>FeatureType</code> is <code>concurrency-scaling</code>, then
122      * <code>LimitType</code> must be <code>time</code>. </p>
123      */
GetLimitType()124     inline const UsageLimitLimitType& GetLimitType() const{ return m_limitType; }
125 
126     /**
127      * <p>The type of limit. Depending on the feature type, this can be based on a time
128      * duration or data size. If <code>FeatureType</code> is <code>spectrum</code>,
129      * then <code>LimitType</code> must be <code>data-scanned</code>. If
130      * <code>FeatureType</code> is <code>concurrency-scaling</code>, then
131      * <code>LimitType</code> must be <code>time</code>. </p>
132      */
LimitTypeHasBeenSet()133     inline bool LimitTypeHasBeenSet() const { return m_limitTypeHasBeenSet; }
134 
135     /**
136      * <p>The type of limit. Depending on the feature type, this can be based on a time
137      * duration or data size. If <code>FeatureType</code> is <code>spectrum</code>,
138      * then <code>LimitType</code> must be <code>data-scanned</code>. If
139      * <code>FeatureType</code> is <code>concurrency-scaling</code>, then
140      * <code>LimitType</code> must be <code>time</code>. </p>
141      */
SetLimitType(const UsageLimitLimitType & value)142     inline void SetLimitType(const UsageLimitLimitType& value) { m_limitTypeHasBeenSet = true; m_limitType = value; }
143 
144     /**
145      * <p>The type of limit. Depending on the feature type, this can be based on a time
146      * duration or data size. If <code>FeatureType</code> is <code>spectrum</code>,
147      * then <code>LimitType</code> must be <code>data-scanned</code>. If
148      * <code>FeatureType</code> is <code>concurrency-scaling</code>, then
149      * <code>LimitType</code> must be <code>time</code>. </p>
150      */
SetLimitType(UsageLimitLimitType && value)151     inline void SetLimitType(UsageLimitLimitType&& value) { m_limitTypeHasBeenSet = true; m_limitType = std::move(value); }
152 
153     /**
154      * <p>The type of limit. Depending on the feature type, this can be based on a time
155      * duration or data size. If <code>FeatureType</code> is <code>spectrum</code>,
156      * then <code>LimitType</code> must be <code>data-scanned</code>. If
157      * <code>FeatureType</code> is <code>concurrency-scaling</code>, then
158      * <code>LimitType</code> must be <code>time</code>. </p>
159      */
WithLimitType(const UsageLimitLimitType & value)160     inline CreateUsageLimitRequest& WithLimitType(const UsageLimitLimitType& value) { SetLimitType(value); return *this;}
161 
162     /**
163      * <p>The type of limit. Depending on the feature type, this can be based on a time
164      * duration or data size. If <code>FeatureType</code> is <code>spectrum</code>,
165      * then <code>LimitType</code> must be <code>data-scanned</code>. If
166      * <code>FeatureType</code> is <code>concurrency-scaling</code>, then
167      * <code>LimitType</code> must be <code>time</code>. </p>
168      */
WithLimitType(UsageLimitLimitType && value)169     inline CreateUsageLimitRequest& WithLimitType(UsageLimitLimitType&& value) { SetLimitType(std::move(value)); return *this;}
170 
171 
172     /**
173      * <p>The limit amount. If time-based, this amount is in minutes. If data-based,
174      * this amount is in terabytes (TB). The value must be a positive number. </p>
175      */
GetAmount()176     inline long long GetAmount() const{ return m_amount; }
177 
178     /**
179      * <p>The limit amount. If time-based, this amount is in minutes. If data-based,
180      * this amount is in terabytes (TB). The value must be a positive number. </p>
181      */
AmountHasBeenSet()182     inline bool AmountHasBeenSet() const { return m_amountHasBeenSet; }
183 
184     /**
185      * <p>The limit amount. If time-based, this amount is in minutes. If data-based,
186      * this amount is in terabytes (TB). The value must be a positive number. </p>
187      */
SetAmount(long long value)188     inline void SetAmount(long long value) { m_amountHasBeenSet = true; m_amount = value; }
189 
190     /**
191      * <p>The limit amount. If time-based, this amount is in minutes. If data-based,
192      * this amount is in terabytes (TB). The value must be a positive number. </p>
193      */
WithAmount(long long value)194     inline CreateUsageLimitRequest& WithAmount(long long value) { SetAmount(value); return *this;}
195 
196 
197     /**
198      * <p>The time period that the amount applies to. A <code>weekly</code> period
199      * begins on Sunday. The default is <code>monthly</code>. </p>
200      */
GetPeriod()201     inline const UsageLimitPeriod& GetPeriod() const{ return m_period; }
202 
203     /**
204      * <p>The time period that the amount applies to. A <code>weekly</code> period
205      * begins on Sunday. The default is <code>monthly</code>. </p>
206      */
PeriodHasBeenSet()207     inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
208 
209     /**
210      * <p>The time period that the amount applies to. A <code>weekly</code> period
211      * begins on Sunday. The default is <code>monthly</code>. </p>
212      */
SetPeriod(const UsageLimitPeriod & value)213     inline void SetPeriod(const UsageLimitPeriod& value) { m_periodHasBeenSet = true; m_period = value; }
214 
215     /**
216      * <p>The time period that the amount applies to. A <code>weekly</code> period
217      * begins on Sunday. The default is <code>monthly</code>. </p>
218      */
SetPeriod(UsageLimitPeriod && value)219     inline void SetPeriod(UsageLimitPeriod&& value) { m_periodHasBeenSet = true; m_period = std::move(value); }
220 
221     /**
222      * <p>The time period that the amount applies to. A <code>weekly</code> period
223      * begins on Sunday. The default is <code>monthly</code>. </p>
224      */
WithPeriod(const UsageLimitPeriod & value)225     inline CreateUsageLimitRequest& WithPeriod(const UsageLimitPeriod& value) { SetPeriod(value); return *this;}
226 
227     /**
228      * <p>The time period that the amount applies to. A <code>weekly</code> period
229      * begins on Sunday. The default is <code>monthly</code>. </p>
230      */
WithPeriod(UsageLimitPeriod && value)231     inline CreateUsageLimitRequest& WithPeriod(UsageLimitPeriod&& value) { SetPeriod(std::move(value)); return *this;}
232 
233 
234     /**
235      * <p>The action that Amazon Redshift takes when the limit is reached. The default
236      * is log. For more information about this parameter, see <a>UsageLimit</a>.</p>
237      */
GetBreachAction()238     inline const UsageLimitBreachAction& GetBreachAction() const{ return m_breachAction; }
239 
240     /**
241      * <p>The action that Amazon Redshift takes when the limit is reached. The default
242      * is log. For more information about this parameter, see <a>UsageLimit</a>.</p>
243      */
BreachActionHasBeenSet()244     inline bool BreachActionHasBeenSet() const { return m_breachActionHasBeenSet; }
245 
246     /**
247      * <p>The action that Amazon Redshift takes when the limit is reached. The default
248      * is log. For more information about this parameter, see <a>UsageLimit</a>.</p>
249      */
SetBreachAction(const UsageLimitBreachAction & value)250     inline void SetBreachAction(const UsageLimitBreachAction& value) { m_breachActionHasBeenSet = true; m_breachAction = value; }
251 
252     /**
253      * <p>The action that Amazon Redshift takes when the limit is reached. The default
254      * is log. For more information about this parameter, see <a>UsageLimit</a>.</p>
255      */
SetBreachAction(UsageLimitBreachAction && value)256     inline void SetBreachAction(UsageLimitBreachAction&& value) { m_breachActionHasBeenSet = true; m_breachAction = std::move(value); }
257 
258     /**
259      * <p>The action that Amazon Redshift takes when the limit is reached. The default
260      * is log. For more information about this parameter, see <a>UsageLimit</a>.</p>
261      */
WithBreachAction(const UsageLimitBreachAction & value)262     inline CreateUsageLimitRequest& WithBreachAction(const UsageLimitBreachAction& value) { SetBreachAction(value); return *this;}
263 
264     /**
265      * <p>The action that Amazon Redshift takes when the limit is reached. The default
266      * is log. For more information about this parameter, see <a>UsageLimit</a>.</p>
267      */
WithBreachAction(UsageLimitBreachAction && value)268     inline CreateUsageLimitRequest& WithBreachAction(UsageLimitBreachAction&& value) { SetBreachAction(std::move(value)); return *this;}
269 
270 
271     /**
272      * <p>A list of tag instances.</p>
273      */
GetTags()274     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
275 
276     /**
277      * <p>A list of tag instances.</p>
278      */
TagsHasBeenSet()279     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
280 
281     /**
282      * <p>A list of tag instances.</p>
283      */
SetTags(const Aws::Vector<Tag> & value)284     inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
285 
286     /**
287      * <p>A list of tag instances.</p>
288      */
SetTags(Aws::Vector<Tag> && value)289     inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
290 
291     /**
292      * <p>A list of tag instances.</p>
293      */
WithTags(const Aws::Vector<Tag> & value)294     inline CreateUsageLimitRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
295 
296     /**
297      * <p>A list of tag instances.</p>
298      */
WithTags(Aws::Vector<Tag> && value)299     inline CreateUsageLimitRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
300 
301     /**
302      * <p>A list of tag instances.</p>
303      */
AddTags(const Tag & value)304     inline CreateUsageLimitRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
305 
306     /**
307      * <p>A list of tag instances.</p>
308      */
AddTags(Tag && value)309     inline CreateUsageLimitRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
310 
311   private:
312 
313     Aws::String m_clusterIdentifier;
314     bool m_clusterIdentifierHasBeenSet;
315 
316     UsageLimitFeatureType m_featureType;
317     bool m_featureTypeHasBeenSet;
318 
319     UsageLimitLimitType m_limitType;
320     bool m_limitTypeHasBeenSet;
321 
322     long long m_amount;
323     bool m_amountHasBeenSet;
324 
325     UsageLimitPeriod m_period;
326     bool m_periodHasBeenSet;
327 
328     UsageLimitBreachAction m_breachAction;
329     bool m_breachActionHasBeenSet;
330 
331     Aws::Vector<Tag> m_tags;
332     bool m_tagsHasBeenSet;
333   };
334 
335 } // namespace Model
336 } // namespace Redshift
337 } // namespace Aws
338