AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
UsageLimit.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/redshift/Redshift_EXPORTS.h>
11#include <aws/redshift/model/ResponseMetadata.h>
12#include <aws/redshift/model/Tag.h>
13#include <aws/redshift/model/UsageLimitBreachAction.h>
14#include <aws/redshift/model/UsageLimitFeatureType.h>
15#include <aws/redshift/model/UsageLimitLimitType.h>
16#include <aws/redshift/model/UsageLimitPeriod.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Xml {
23class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace Redshift {
27namespace Model {
28
35 public:
36 AWS_REDSHIFT_API UsageLimit() = default;
37 AWS_REDSHIFT_API UsageLimit(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_REDSHIFT_API UsageLimit& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_REDSHIFT_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_REDSHIFT_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
44
47 inline const Aws::String& GetUsageLimitId() const { return m_usageLimitId; }
48 inline bool UsageLimitIdHasBeenSet() const { return m_usageLimitIdHasBeenSet; }
49 template <typename UsageLimitIdT = Aws::String>
50 void SetUsageLimitId(UsageLimitIdT&& value) {
51 m_usageLimitIdHasBeenSet = true;
52 m_usageLimitId = std::forward<UsageLimitIdT>(value);
53 }
54 template <typename UsageLimitIdT = Aws::String>
55 UsageLimit& WithUsageLimitId(UsageLimitIdT&& value) {
56 SetUsageLimitId(std::forward<UsageLimitIdT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetClusterIdentifier() const { return m_clusterIdentifier; }
66 inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; }
67 template <typename ClusterIdentifierT = Aws::String>
68 void SetClusterIdentifier(ClusterIdentifierT&& value) {
69 m_clusterIdentifierHasBeenSet = true;
70 m_clusterIdentifier = std::forward<ClusterIdentifierT>(value);
71 }
72 template <typename ClusterIdentifierT = Aws::String>
73 UsageLimit& WithClusterIdentifier(ClusterIdentifierT&& value) {
74 SetClusterIdentifier(std::forward<ClusterIdentifierT>(value));
75 return *this;
76 }
78
80
83 inline UsageLimitFeatureType GetFeatureType() const { return m_featureType; }
84 inline bool FeatureTypeHasBeenSet() const { return m_featureTypeHasBeenSet; }
86 m_featureTypeHasBeenSet = true;
87 m_featureType = value;
88 }
90 SetFeatureType(value);
91 return *this;
92 }
94
96
100 inline UsageLimitLimitType GetLimitType() const { return m_limitType; }
101 inline bool LimitTypeHasBeenSet() const { return m_limitTypeHasBeenSet; }
103 m_limitTypeHasBeenSet = true;
104 m_limitType = value;
105 }
107 SetLimitType(value);
108 return *this;
109 }
111
113
117 inline long long GetAmount() const { return m_amount; }
118 inline bool AmountHasBeenSet() const { return m_amountHasBeenSet; }
119 inline void SetAmount(long long value) {
120 m_amountHasBeenSet = true;
121 m_amount = value;
122 }
123 inline UsageLimit& WithAmount(long long value) {
124 SetAmount(value);
125 return *this;
126 }
128
130
134 inline UsageLimitPeriod GetPeriod() const { return m_period; }
135 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
136 inline void SetPeriod(UsageLimitPeriod value) {
137 m_periodHasBeenSet = true;
138 m_period = value;
139 }
141 SetPeriod(value);
142 return *this;
143 }
145
147
154 inline UsageLimitBreachAction GetBreachAction() const { return m_breachAction; }
155 inline bool BreachActionHasBeenSet() const { return m_breachActionHasBeenSet; }
157 m_breachActionHasBeenSet = true;
158 m_breachAction = value;
159 }
161 SetBreachAction(value);
162 return *this;
163 }
165
167
170 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
171 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
172 template <typename TagsT = Aws::Vector<Tag>>
173 void SetTags(TagsT&& value) {
174 m_tagsHasBeenSet = true;
175 m_tags = std::forward<TagsT>(value);
176 }
177 template <typename TagsT = Aws::Vector<Tag>>
178 UsageLimit& WithTags(TagsT&& value) {
179 SetTags(std::forward<TagsT>(value));
180 return *this;
181 }
182 template <typename TagsT = Tag>
183 UsageLimit& AddTags(TagsT&& value) {
184 m_tagsHasBeenSet = true;
185 m_tags.emplace_back(std::forward<TagsT>(value));
186 return *this;
187 }
189
191
192 inline const ResponseMetadata& GetResponseMetadata() const { return m_responseMetadata; }
193 template <typename ResponseMetadataT = ResponseMetadata>
194 void SetResponseMetadata(ResponseMetadataT&& value) {
195 m_responseMetadataHasBeenSet = true;
196 m_responseMetadata = std::forward<ResponseMetadataT>(value);
197 }
198 template <typename ResponseMetadataT = ResponseMetadata>
199 UsageLimit& WithResponseMetadata(ResponseMetadataT&& value) {
200 SetResponseMetadata(std::forward<ResponseMetadataT>(value));
201 return *this;
202 }
204 private:
205 Aws::String m_usageLimitId;
206
207 Aws::String m_clusterIdentifier;
208
210
212
213 long long m_amount{0};
214
216
218
219 Aws::Vector<Tag> m_tags;
220
221 ResponseMetadata m_responseMetadata;
222 bool m_usageLimitIdHasBeenSet = false;
223 bool m_clusterIdentifierHasBeenSet = false;
224 bool m_featureTypeHasBeenSet = false;
225 bool m_limitTypeHasBeenSet = false;
226 bool m_amountHasBeenSet = false;
227 bool m_periodHasBeenSet = false;
228 bool m_breachActionHasBeenSet = false;
229 bool m_tagsHasBeenSet = false;
230 bool m_responseMetadataHasBeenSet = true;
231};
232
233} // namespace Model
234} // namespace Redshift
235} // namespace Aws
void SetAmount(long long value)
Definition UsageLimit.h:119
void SetUsageLimitId(UsageLimitIdT &&value)
Definition UsageLimit.h:50
UsageLimitFeatureType GetFeatureType() const
Definition UsageLimit.h:83
void SetLimitType(UsageLimitLimitType value)
Definition UsageLimit.h:102
UsageLimit & WithUsageLimitId(UsageLimitIdT &&value)
Definition UsageLimit.h:55
UsageLimit & WithResponseMetadata(ResponseMetadataT &&value)
Definition UsageLimit.h:199
const Aws::String & GetClusterIdentifier() const
Definition UsageLimit.h:65
UsageLimit & WithFeatureType(UsageLimitFeatureType value)
Definition UsageLimit.h:89
UsageLimit & WithPeriod(UsageLimitPeriod value)
Definition UsageLimit.h:140
void SetResponseMetadata(ResponseMetadataT &&value)
Definition UsageLimit.h:194
UsageLimitBreachAction GetBreachAction() const
Definition UsageLimit.h:154
UsageLimit & WithLimitType(UsageLimitLimitType value)
Definition UsageLimit.h:106
AWS_REDSHIFT_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_REDSHIFT_API UsageLimit & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetTags(TagsT &&value)
Definition UsageLimit.h:173
UsageLimitPeriod GetPeriod() const
Definition UsageLimit.h:134
AWS_REDSHIFT_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::String & GetUsageLimitId() const
Definition UsageLimit.h:47
const Aws::Vector< Tag > & GetTags() const
Definition UsageLimit.h:170
void SetClusterIdentifier(ClusterIdentifierT &&value)
Definition UsageLimit.h:68
UsageLimit & WithAmount(long long value)
Definition UsageLimit.h:123
UsageLimit & AddTags(TagsT &&value)
Definition UsageLimit.h:183
UsageLimitLimitType GetLimitType() const
Definition UsageLimit.h:100
bool ClusterIdentifierHasBeenSet() const
Definition UsageLimit.h:66
AWS_REDSHIFT_API UsageLimit(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetFeatureType(UsageLimitFeatureType value)
Definition UsageLimit.h:85
void SetBreachAction(UsageLimitBreachAction value)
Definition UsageLimit.h:156
void SetPeriod(UsageLimitPeriod value)
Definition UsageLimit.h:136
AWS_REDSHIFT_API UsageLimit()=default
UsageLimit & WithBreachAction(UsageLimitBreachAction value)
Definition UsageLimit.h:160
const ResponseMetadata & GetResponseMetadata() const
Definition UsageLimit.h:192
UsageLimit & WithTags(TagsT &&value)
Definition UsageLimit.h:178
UsageLimit & WithClusterIdentifier(ClusterIdentifierT &&value)
Definition UsageLimit.h:73
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream