AWS SDK for C++

AWS SDK for C++ Version 1.11.768

Loading...
Searching...
No Matches
UsagePlan.h
1
6#pragma once
7#include <aws/apigateway/APIGateway_EXPORTS.h>
8#include <aws/apigateway/model/ApiStage.h>
9#include <aws/apigateway/model/QuotaSettings.h>
10#include <aws/apigateway/model/ThrottleSettings.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace APIGateway {
25namespace Model {
26
39class UsagePlan {
40 public:
41 AWS_APIGATEWAY_API UsagePlan() = default;
42 AWS_APIGATEWAY_API UsagePlan(Aws::Utils::Json::JsonView jsonValue);
43 AWS_APIGATEWAY_API UsagePlan& operator=(Aws::Utils::Json::JsonView jsonValue);
44 AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const;
45
47
50 inline const Aws::String& GetId() const { return m_id; }
51 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
52 template <typename IdT = Aws::String>
53 void SetId(IdT&& value) {
54 m_idHasBeenSet = true;
55 m_id = std::forward<IdT>(value);
56 }
57 template <typename IdT = Aws::String>
58 UsagePlan& WithId(IdT&& value) {
59 SetId(std::forward<IdT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::String& GetName() const { return m_name; }
69 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
70 template <typename NameT = Aws::String>
71 void SetName(NameT&& value) {
72 m_nameHasBeenSet = true;
73 m_name = std::forward<NameT>(value);
74 }
75 template <typename NameT = Aws::String>
76 UsagePlan& WithName(NameT&& value) {
77 SetName(std::forward<NameT>(value));
78 return *this;
79 }
81
83
86 inline const Aws::String& GetDescription() const { return m_description; }
87 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
88 template <typename DescriptionT = Aws::String>
89 void SetDescription(DescriptionT&& value) {
90 m_descriptionHasBeenSet = true;
91 m_description = std::forward<DescriptionT>(value);
92 }
93 template <typename DescriptionT = Aws::String>
94 UsagePlan& WithDescription(DescriptionT&& value) {
95 SetDescription(std::forward<DescriptionT>(value));
96 return *this;
97 }
99
101
104 inline const Aws::Vector<ApiStage>& GetApiStages() const { return m_apiStages; }
105 inline bool ApiStagesHasBeenSet() const { return m_apiStagesHasBeenSet; }
106 template <typename ApiStagesT = Aws::Vector<ApiStage>>
107 void SetApiStages(ApiStagesT&& value) {
108 m_apiStagesHasBeenSet = true;
109 m_apiStages = std::forward<ApiStagesT>(value);
110 }
111 template <typename ApiStagesT = Aws::Vector<ApiStage>>
112 UsagePlan& WithApiStages(ApiStagesT&& value) {
113 SetApiStages(std::forward<ApiStagesT>(value));
114 return *this;
115 }
116 template <typename ApiStagesT = ApiStage>
117 UsagePlan& AddApiStages(ApiStagesT&& value) {
118 m_apiStagesHasBeenSet = true;
119 m_apiStages.emplace_back(std::forward<ApiStagesT>(value));
120 return *this;
121 }
123
125
129 inline const ThrottleSettings& GetThrottle() const { return m_throttle; }
130 inline bool ThrottleHasBeenSet() const { return m_throttleHasBeenSet; }
131 template <typename ThrottleT = ThrottleSettings>
132 void SetThrottle(ThrottleT&& value) {
133 m_throttleHasBeenSet = true;
134 m_throttle = std::forward<ThrottleT>(value);
135 }
136 template <typename ThrottleT = ThrottleSettings>
137 UsagePlan& WithThrottle(ThrottleT&& value) {
138 SetThrottle(std::forward<ThrottleT>(value));
139 return *this;
140 }
142
144
148 inline const QuotaSettings& GetQuota() const { return m_quota; }
149 inline bool QuotaHasBeenSet() const { return m_quotaHasBeenSet; }
150 template <typename QuotaT = QuotaSettings>
151 void SetQuota(QuotaT&& value) {
152 m_quotaHasBeenSet = true;
153 m_quota = std::forward<QuotaT>(value);
154 }
155 template <typename QuotaT = QuotaSettings>
156 UsagePlan& WithQuota(QuotaT&& value) {
157 SetQuota(std::forward<QuotaT>(value));
158 return *this;
159 }
161
163
167 inline const Aws::String& GetProductCode() const { return m_productCode; }
168 inline bool ProductCodeHasBeenSet() const { return m_productCodeHasBeenSet; }
169 template <typename ProductCodeT = Aws::String>
170 void SetProductCode(ProductCodeT&& value) {
171 m_productCodeHasBeenSet = true;
172 m_productCode = std::forward<ProductCodeT>(value);
173 }
174 template <typename ProductCodeT = Aws::String>
175 UsagePlan& WithProductCode(ProductCodeT&& value) {
176 SetProductCode(std::forward<ProductCodeT>(value));
177 return *this;
178 }
180
182
186 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
187 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
188 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
189 void SetTags(TagsT&& value) {
190 m_tagsHasBeenSet = true;
191 m_tags = std::forward<TagsT>(value);
192 }
193 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
194 UsagePlan& WithTags(TagsT&& value) {
195 SetTags(std::forward<TagsT>(value));
196 return *this;
197 }
198 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
199 UsagePlan& AddTags(TagsKeyT&& key, TagsValueT&& value) {
200 m_tagsHasBeenSet = true;
201 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
202 return *this;
203 }
205
207
208 inline const Aws::String& GetRequestId() const { return m_requestId; }
209 inline bool RequestIdHasBeenSet() const { return m_requestIdHasBeenSet; }
210 template <typename RequestIdT = Aws::String>
211 void SetRequestId(RequestIdT&& value) {
212 m_requestIdHasBeenSet = true;
213 m_requestId = std::forward<RequestIdT>(value);
214 }
215 template <typename RequestIdT = Aws::String>
216 UsagePlan& WithRequestId(RequestIdT&& value) {
217 SetRequestId(std::forward<RequestIdT>(value));
218 return *this;
219 }
221 private:
222 Aws::String m_id;
223
224 Aws::String m_name;
225
226 Aws::String m_description;
227
228 Aws::Vector<ApiStage> m_apiStages;
229
230 ThrottleSettings m_throttle;
231
232 QuotaSettings m_quota;
233
234 Aws::String m_productCode;
235
237
238 Aws::String m_requestId;
239 bool m_idHasBeenSet = false;
240 bool m_nameHasBeenSet = false;
241 bool m_descriptionHasBeenSet = false;
242 bool m_apiStagesHasBeenSet = false;
243 bool m_throttleHasBeenSet = false;
244 bool m_quotaHasBeenSet = false;
245 bool m_productCodeHasBeenSet = false;
246 bool m_tagsHasBeenSet = false;
247 bool m_requestIdHasBeenSet = false;
248};
249
250} // namespace Model
251} // namespace APIGateway
252} // namespace Aws
const Aws::String & GetName() const
Definition UsagePlan.h:68
UsagePlan & AddApiStages(ApiStagesT &&value)
Definition UsagePlan.h:117
UsagePlan & WithQuota(QuotaT &&value)
Definition UsagePlan.h:156
UsagePlan & WithProductCode(ProductCodeT &&value)
Definition UsagePlan.h:175
AWS_APIGATEWAY_API UsagePlan(Aws::Utils::Json::JsonView jsonValue)
UsagePlan & WithDescription(DescriptionT &&value)
Definition UsagePlan.h:94
void SetThrottle(ThrottleT &&value)
Definition UsagePlan.h:132
void SetTags(TagsT &&value)
Definition UsagePlan.h:189
UsagePlan & WithTags(TagsT &&value)
Definition UsagePlan.h:194
const QuotaSettings & GetQuota() const
Definition UsagePlan.h:148
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition UsagePlan.h:186
const Aws::String & GetRequestId() const
Definition UsagePlan.h:208
void SetQuota(QuotaT &&value)
Definition UsagePlan.h:151
UsagePlan & WithRequestId(RequestIdT &&value)
Definition UsagePlan.h:216
UsagePlan & WithName(NameT &&value)
Definition UsagePlan.h:76
void SetProductCode(ProductCodeT &&value)
Definition UsagePlan.h:170
const Aws::String & GetId() const
Definition UsagePlan.h:50
AWS_APIGATEWAY_API UsagePlan()=default
AWS_APIGATEWAY_API UsagePlan & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< ApiStage > & GetApiStages() const
Definition UsagePlan.h:104
const ThrottleSettings & GetThrottle() const
Definition UsagePlan.h:129
void SetDescription(DescriptionT &&value)
Definition UsagePlan.h:89
void SetApiStages(ApiStagesT &&value)
Definition UsagePlan.h:107
const Aws::String & GetProductCode() const
Definition UsagePlan.h:167
UsagePlan & WithId(IdT &&value)
Definition UsagePlan.h:58
void SetName(NameT &&value)
Definition UsagePlan.h:71
AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const
UsagePlan & WithThrottle(ThrottleT &&value)
Definition UsagePlan.h:137
UsagePlan & AddTags(TagsKeyT &&key, TagsValueT &&value)
Definition UsagePlan.h:199
void SetRequestId(RequestIdT &&value)
Definition UsagePlan.h:211
UsagePlan & WithApiStages(ApiStagesT &&value)
Definition UsagePlan.h:112
const Aws::String & GetDescription() const
Definition UsagePlan.h:86
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue