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/core/utils/memory/stl/AWSString.h>
9 #include <aws/redshift/model/UsageLimitFeatureType.h>
10 #include <aws/redshift/model/UsageLimitLimitType.h>
11 #include <aws/redshift/model/UsageLimitPeriod.h>
12 #include <aws/redshift/model/UsageLimitBreachAction.h>
13 #include <aws/core/utils/memory/stl/AWSVector.h>
14 #include <aws/redshift/model/ResponseMetadata.h>
15 #include <aws/redshift/model/Tag.h>
16 #include <utility>
17 
18 namespace Aws
19 {
20 template<typename RESULT_TYPE>
21 class AmazonWebServiceResult;
22 
23 namespace Utils
24 {
25 namespace Xml
26 {
27   class XmlDocument;
28 } // namespace Xml
29 } // namespace Utils
30 namespace Redshift
31 {
32 namespace Model
33 {
34   /**
35    * <p>Describes a usage limit object for a cluster. </p><p><h3>See Also:</h3>   <a
36    * href="http://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/UsageLimit">AWS
37    * API Reference</a></p>
38    */
39   class AWS_REDSHIFT_API ModifyUsageLimitResult
40   {
41   public:
42     ModifyUsageLimitResult();
43     ModifyUsageLimitResult(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
44     ModifyUsageLimitResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result);
45 
46 
47     /**
48      * <p>The identifier of the usage limit.</p>
49      */
GetUsageLimitId()50     inline const Aws::String& GetUsageLimitId() const{ return m_usageLimitId; }
51 
52     /**
53      * <p>The identifier of the usage limit.</p>
54      */
SetUsageLimitId(const Aws::String & value)55     inline void SetUsageLimitId(const Aws::String& value) { m_usageLimitId = value; }
56 
57     /**
58      * <p>The identifier of the usage limit.</p>
59      */
SetUsageLimitId(Aws::String && value)60     inline void SetUsageLimitId(Aws::String&& value) { m_usageLimitId = std::move(value); }
61 
62     /**
63      * <p>The identifier of the usage limit.</p>
64      */
SetUsageLimitId(const char * value)65     inline void SetUsageLimitId(const char* value) { m_usageLimitId.assign(value); }
66 
67     /**
68      * <p>The identifier of the usage limit.</p>
69      */
WithUsageLimitId(const Aws::String & value)70     inline ModifyUsageLimitResult& WithUsageLimitId(const Aws::String& value) { SetUsageLimitId(value); return *this;}
71 
72     /**
73      * <p>The identifier of the usage limit.</p>
74      */
WithUsageLimitId(Aws::String && value)75     inline ModifyUsageLimitResult& WithUsageLimitId(Aws::String&& value) { SetUsageLimitId(std::move(value)); return *this;}
76 
77     /**
78      * <p>The identifier of the usage limit.</p>
79      */
WithUsageLimitId(const char * value)80     inline ModifyUsageLimitResult& WithUsageLimitId(const char* value) { SetUsageLimitId(value); return *this;}
81 
82 
83     /**
84      * <p>The identifier of the cluster with a usage limit.</p>
85      */
GetClusterIdentifier()86     inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; }
87 
88     /**
89      * <p>The identifier of the cluster with a usage limit.</p>
90      */
SetClusterIdentifier(const Aws::String & value)91     inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifier = value; }
92 
93     /**
94      * <p>The identifier of the cluster with a usage limit.</p>
95      */
SetClusterIdentifier(Aws::String && value)96     inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifier = std::move(value); }
97 
98     /**
99      * <p>The identifier of the cluster with a usage limit.</p>
100      */
SetClusterIdentifier(const char * value)101     inline void SetClusterIdentifier(const char* value) { m_clusterIdentifier.assign(value); }
102 
103     /**
104      * <p>The identifier of the cluster with a usage limit.</p>
105      */
WithClusterIdentifier(const Aws::String & value)106     inline ModifyUsageLimitResult& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;}
107 
108     /**
109      * <p>The identifier of the cluster with a usage limit.</p>
110      */
WithClusterIdentifier(Aws::String && value)111     inline ModifyUsageLimitResult& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;}
112 
113     /**
114      * <p>The identifier of the cluster with a usage limit.</p>
115      */
WithClusterIdentifier(const char * value)116     inline ModifyUsageLimitResult& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;}
117 
118 
119     /**
120      * <p>The Amazon Redshift feature to which the limit applies.</p>
121      */
GetFeatureType()122     inline const UsageLimitFeatureType& GetFeatureType() const{ return m_featureType; }
123 
124     /**
125      * <p>The Amazon Redshift feature to which the limit applies.</p>
126      */
SetFeatureType(const UsageLimitFeatureType & value)127     inline void SetFeatureType(const UsageLimitFeatureType& value) { m_featureType = value; }
128 
129     /**
130      * <p>The Amazon Redshift feature to which the limit applies.</p>
131      */
SetFeatureType(UsageLimitFeatureType && value)132     inline void SetFeatureType(UsageLimitFeatureType&& value) { m_featureType = std::move(value); }
133 
134     /**
135      * <p>The Amazon Redshift feature to which the limit applies.</p>
136      */
WithFeatureType(const UsageLimitFeatureType & value)137     inline ModifyUsageLimitResult& WithFeatureType(const UsageLimitFeatureType& value) { SetFeatureType(value); return *this;}
138 
139     /**
140      * <p>The Amazon Redshift feature to which the limit applies.</p>
141      */
WithFeatureType(UsageLimitFeatureType && value)142     inline ModifyUsageLimitResult& WithFeatureType(UsageLimitFeatureType&& value) { SetFeatureType(std::move(value)); return *this;}
143 
144 
145     /**
146      * <p>The type of limit. Depending on the feature type, this can be based on a time
147      * duration or data size.</p>
148      */
GetLimitType()149     inline const UsageLimitLimitType& GetLimitType() const{ return m_limitType; }
150 
151     /**
152      * <p>The type of limit. Depending on the feature type, this can be based on a time
153      * duration or data size.</p>
154      */
SetLimitType(const UsageLimitLimitType & value)155     inline void SetLimitType(const UsageLimitLimitType& value) { m_limitType = value; }
156 
157     /**
158      * <p>The type of limit. Depending on the feature type, this can be based on a time
159      * duration or data size.</p>
160      */
SetLimitType(UsageLimitLimitType && value)161     inline void SetLimitType(UsageLimitLimitType&& value) { m_limitType = std::move(value); }
162 
163     /**
164      * <p>The type of limit. Depending on the feature type, this can be based on a time
165      * duration or data size.</p>
166      */
WithLimitType(const UsageLimitLimitType & value)167     inline ModifyUsageLimitResult& WithLimitType(const UsageLimitLimitType& value) { SetLimitType(value); return *this;}
168 
169     /**
170      * <p>The type of limit. Depending on the feature type, this can be based on a time
171      * duration or data size.</p>
172      */
WithLimitType(UsageLimitLimitType && value)173     inline ModifyUsageLimitResult& WithLimitType(UsageLimitLimitType&& value) { SetLimitType(std::move(value)); return *this;}
174 
175 
176     /**
177      * <p>The limit amount. If time-based, this amount is in minutes. If data-based,
178      * this amount is in terabytes (TB).</p>
179      */
GetAmount()180     inline long long GetAmount() const{ return m_amount; }
181 
182     /**
183      * <p>The limit amount. If time-based, this amount is in minutes. If data-based,
184      * this amount is in terabytes (TB).</p>
185      */
SetAmount(long long value)186     inline void SetAmount(long long value) { m_amount = value; }
187 
188     /**
189      * <p>The limit amount. If time-based, this amount is in minutes. If data-based,
190      * this amount is in terabytes (TB).</p>
191      */
WithAmount(long long value)192     inline ModifyUsageLimitResult& WithAmount(long long value) { SetAmount(value); return *this;}
193 
194 
195     /**
196      * <p>The time period that the amount applies to. A <code>weekly</code> period
197      * begins on Sunday. The default is <code>monthly</code>. </p>
198      */
GetPeriod()199     inline const UsageLimitPeriod& GetPeriod() const{ return m_period; }
200 
201     /**
202      * <p>The time period that the amount applies to. A <code>weekly</code> period
203      * begins on Sunday. The default is <code>monthly</code>. </p>
204      */
SetPeriod(const UsageLimitPeriod & value)205     inline void SetPeriod(const UsageLimitPeriod& value) { m_period = value; }
206 
207     /**
208      * <p>The time period that the amount applies to. A <code>weekly</code> period
209      * begins on Sunday. The default is <code>monthly</code>. </p>
210      */
SetPeriod(UsageLimitPeriod && value)211     inline void SetPeriod(UsageLimitPeriod&& value) { m_period = std::move(value); }
212 
213     /**
214      * <p>The time period that the amount applies to. A <code>weekly</code> period
215      * begins on Sunday. The default is <code>monthly</code>. </p>
216      */
WithPeriod(const UsageLimitPeriod & value)217     inline ModifyUsageLimitResult& WithPeriod(const UsageLimitPeriod& value) { SetPeriod(value); return *this;}
218 
219     /**
220      * <p>The time period that the amount applies to. A <code>weekly</code> period
221      * begins on Sunday. The default is <code>monthly</code>. </p>
222      */
WithPeriod(UsageLimitPeriod && value)223     inline ModifyUsageLimitResult& WithPeriod(UsageLimitPeriod&& value) { SetPeriod(std::move(value)); return *this;}
224 
225 
226     /**
227      * <p>The action that Amazon Redshift takes when the limit is reached. Possible
228      * values are: </p> <ul> <li> <p> <b>log</b> - To log an event in a system table.
229      * The default is log.</p> </li> <li> <p> <b>emit-metric</b> - To emit CloudWatch
230      * metrics.</p> </li> <li> <p> <b>disable</b> - To disable the feature until the
231      * next usage period begins.</p> </li> </ul>
232      */
GetBreachAction()233     inline const UsageLimitBreachAction& GetBreachAction() const{ return m_breachAction; }
234 
235     /**
236      * <p>The action that Amazon Redshift takes when the limit is reached. Possible
237      * values are: </p> <ul> <li> <p> <b>log</b> - To log an event in a system table.
238      * The default is log.</p> </li> <li> <p> <b>emit-metric</b> - To emit CloudWatch
239      * metrics.</p> </li> <li> <p> <b>disable</b> - To disable the feature until the
240      * next usage period begins.</p> </li> </ul>
241      */
SetBreachAction(const UsageLimitBreachAction & value)242     inline void SetBreachAction(const UsageLimitBreachAction& value) { m_breachAction = value; }
243 
244     /**
245      * <p>The action that Amazon Redshift takes when the limit is reached. Possible
246      * values are: </p> <ul> <li> <p> <b>log</b> - To log an event in a system table.
247      * The default is log.</p> </li> <li> <p> <b>emit-metric</b> - To emit CloudWatch
248      * metrics.</p> </li> <li> <p> <b>disable</b> - To disable the feature until the
249      * next usage period begins.</p> </li> </ul>
250      */
SetBreachAction(UsageLimitBreachAction && value)251     inline void SetBreachAction(UsageLimitBreachAction&& value) { m_breachAction = std::move(value); }
252 
253     /**
254      * <p>The action that Amazon Redshift takes when the limit is reached. Possible
255      * values are: </p> <ul> <li> <p> <b>log</b> - To log an event in a system table.
256      * The default is log.</p> </li> <li> <p> <b>emit-metric</b> - To emit CloudWatch
257      * metrics.</p> </li> <li> <p> <b>disable</b> - To disable the feature until the
258      * next usage period begins.</p> </li> </ul>
259      */
WithBreachAction(const UsageLimitBreachAction & value)260     inline ModifyUsageLimitResult& WithBreachAction(const UsageLimitBreachAction& value) { SetBreachAction(value); return *this;}
261 
262     /**
263      * <p>The action that Amazon Redshift takes when the limit is reached. Possible
264      * values are: </p> <ul> <li> <p> <b>log</b> - To log an event in a system table.
265      * The default is log.</p> </li> <li> <p> <b>emit-metric</b> - To emit CloudWatch
266      * metrics.</p> </li> <li> <p> <b>disable</b> - To disable the feature until the
267      * next usage period begins.</p> </li> </ul>
268      */
WithBreachAction(UsageLimitBreachAction && value)269     inline ModifyUsageLimitResult& WithBreachAction(UsageLimitBreachAction&& value) { SetBreachAction(std::move(value)); return *this;}
270 
271 
272     /**
273      * <p>A list of tag instances.</p>
274      */
GetTags()275     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
276 
277     /**
278      * <p>A list of tag instances.</p>
279      */
SetTags(const Aws::Vector<Tag> & value)280     inline void SetTags(const Aws::Vector<Tag>& value) { m_tags = value; }
281 
282     /**
283      * <p>A list of tag instances.</p>
284      */
SetTags(Aws::Vector<Tag> && value)285     inline void SetTags(Aws::Vector<Tag>&& value) { m_tags = std::move(value); }
286 
287     /**
288      * <p>A list of tag instances.</p>
289      */
WithTags(const Aws::Vector<Tag> & value)290     inline ModifyUsageLimitResult& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
291 
292     /**
293      * <p>A list of tag instances.</p>
294      */
WithTags(Aws::Vector<Tag> && value)295     inline ModifyUsageLimitResult& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
296 
297     /**
298      * <p>A list of tag instances.</p>
299      */
AddTags(const Tag & value)300     inline ModifyUsageLimitResult& AddTags(const Tag& value) { m_tags.push_back(value); return *this; }
301 
302     /**
303      * <p>A list of tag instances.</p>
304      */
AddTags(Tag && value)305     inline ModifyUsageLimitResult& AddTags(Tag&& value) { m_tags.push_back(std::move(value)); return *this; }
306 
307 
308 
GetResponseMetadata()309     inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; }
310 
311 
SetResponseMetadata(const ResponseMetadata & value)312     inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; }
313 
314 
SetResponseMetadata(ResponseMetadata && value)315     inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); }
316 
317 
WithResponseMetadata(const ResponseMetadata & value)318     inline ModifyUsageLimitResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;}
319 
320 
WithResponseMetadata(ResponseMetadata && value)321     inline ModifyUsageLimitResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;}
322 
323   private:
324 
325     Aws::String m_usageLimitId;
326 
327     Aws::String m_clusterIdentifier;
328 
329     UsageLimitFeatureType m_featureType;
330 
331     UsageLimitLimitType m_limitType;
332 
333     long long m_amount;
334 
335     UsageLimitPeriod m_period;
336 
337     UsageLimitBreachAction m_breachAction;
338 
339     Aws::Vector<Tag> m_tags;
340 
341     ResponseMetadata m_responseMetadata;
342   };
343 
344 } // namespace Model
345 } // namespace Redshift
346 } // namespace Aws
347