AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ReservedCacheNode.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/elasticache/ElastiCache_EXPORTS.h>
12#include <aws/elasticache/model/RecurringCharge.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace ElastiCache {
23namespace Model {
24
32 public:
33 AWS_ELASTICACHE_API ReservedCacheNode() = default;
34 AWS_ELASTICACHE_API ReservedCacheNode(const Aws::Utils::Xml::XmlNode& xmlNode);
35 AWS_ELASTICACHE_API ReservedCacheNode& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
36
37 AWS_ELASTICACHE_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
38 AWS_ELASTICACHE_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
39
41
44 inline const Aws::String& GetReservedCacheNodeId() const { return m_reservedCacheNodeId; }
45 inline bool ReservedCacheNodeIdHasBeenSet() const { return m_reservedCacheNodeIdHasBeenSet; }
46 template <typename ReservedCacheNodeIdT = Aws::String>
47 void SetReservedCacheNodeId(ReservedCacheNodeIdT&& value) {
48 m_reservedCacheNodeIdHasBeenSet = true;
49 m_reservedCacheNodeId = std::forward<ReservedCacheNodeIdT>(value);
50 }
51 template <typename ReservedCacheNodeIdT = Aws::String>
52 ReservedCacheNode& WithReservedCacheNodeId(ReservedCacheNodeIdT&& value) {
53 SetReservedCacheNodeId(std::forward<ReservedCacheNodeIdT>(value));
54 return *this;
55 }
57
59
62 inline const Aws::String& GetReservedCacheNodesOfferingId() const { return m_reservedCacheNodesOfferingId; }
63 inline bool ReservedCacheNodesOfferingIdHasBeenSet() const { return m_reservedCacheNodesOfferingIdHasBeenSet; }
64 template <typename ReservedCacheNodesOfferingIdT = Aws::String>
65 void SetReservedCacheNodesOfferingId(ReservedCacheNodesOfferingIdT&& value) {
66 m_reservedCacheNodesOfferingIdHasBeenSet = true;
67 m_reservedCacheNodesOfferingId = std::forward<ReservedCacheNodesOfferingIdT>(value);
68 }
69 template <typename ReservedCacheNodesOfferingIdT = Aws::String>
70 ReservedCacheNode& WithReservedCacheNodesOfferingId(ReservedCacheNodesOfferingIdT&& value) {
71 SetReservedCacheNodesOfferingId(std::forward<ReservedCacheNodesOfferingIdT>(value));
72 return *this;
73 }
75
77
151 inline const Aws::String& GetCacheNodeType() const { return m_cacheNodeType; }
152 inline bool CacheNodeTypeHasBeenSet() const { return m_cacheNodeTypeHasBeenSet; }
153 template <typename CacheNodeTypeT = Aws::String>
154 void SetCacheNodeType(CacheNodeTypeT&& value) {
155 m_cacheNodeTypeHasBeenSet = true;
156 m_cacheNodeType = std::forward<CacheNodeTypeT>(value);
157 }
158 template <typename CacheNodeTypeT = Aws::String>
159 ReservedCacheNode& WithCacheNodeType(CacheNodeTypeT&& value) {
160 SetCacheNodeType(std::forward<CacheNodeTypeT>(value));
161 return *this;
162 }
164
166
169 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
170 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
171 template <typename StartTimeT = Aws::Utils::DateTime>
172 void SetStartTime(StartTimeT&& value) {
173 m_startTimeHasBeenSet = true;
174 m_startTime = std::forward<StartTimeT>(value);
175 }
176 template <typename StartTimeT = Aws::Utils::DateTime>
177 ReservedCacheNode& WithStartTime(StartTimeT&& value) {
178 SetStartTime(std::forward<StartTimeT>(value));
179 return *this;
180 }
182
184
187 inline int GetDuration() const { return m_duration; }
188 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
189 inline void SetDuration(int value) {
190 m_durationHasBeenSet = true;
191 m_duration = value;
192 }
193 inline ReservedCacheNode& WithDuration(int value) {
194 SetDuration(value);
195 return *this;
196 }
198
200
203 inline double GetFixedPrice() const { return m_fixedPrice; }
204 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
205 inline void SetFixedPrice(double value) {
206 m_fixedPriceHasBeenSet = true;
207 m_fixedPrice = value;
208 }
209 inline ReservedCacheNode& WithFixedPrice(double value) {
210 SetFixedPrice(value);
211 return *this;
212 }
214
216
219 inline double GetUsagePrice() const { return m_usagePrice; }
220 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
221 inline void SetUsagePrice(double value) {
222 m_usagePriceHasBeenSet = true;
223 m_usagePrice = value;
224 }
225 inline ReservedCacheNode& WithUsagePrice(double value) {
226 SetUsagePrice(value);
227 return *this;
228 }
230
232
235 inline int GetCacheNodeCount() const { return m_cacheNodeCount; }
236 inline bool CacheNodeCountHasBeenSet() const { return m_cacheNodeCountHasBeenSet; }
237 inline void SetCacheNodeCount(int value) {
238 m_cacheNodeCountHasBeenSet = true;
239 m_cacheNodeCount = value;
240 }
242 SetCacheNodeCount(value);
243 return *this;
244 }
246
248
251 inline const Aws::String& GetProductDescription() const { return m_productDescription; }
252 inline bool ProductDescriptionHasBeenSet() const { return m_productDescriptionHasBeenSet; }
253 template <typename ProductDescriptionT = Aws::String>
254 void SetProductDescription(ProductDescriptionT&& value) {
255 m_productDescriptionHasBeenSet = true;
256 m_productDescription = std::forward<ProductDescriptionT>(value);
257 }
258 template <typename ProductDescriptionT = Aws::String>
259 ReservedCacheNode& WithProductDescription(ProductDescriptionT&& value) {
260 SetProductDescription(std::forward<ProductDescriptionT>(value));
261 return *this;
262 }
264
266
269 inline const Aws::String& GetOfferingType() const { return m_offeringType; }
270 inline bool OfferingTypeHasBeenSet() const { return m_offeringTypeHasBeenSet; }
271 template <typename OfferingTypeT = Aws::String>
272 void SetOfferingType(OfferingTypeT&& value) {
273 m_offeringTypeHasBeenSet = true;
274 m_offeringType = std::forward<OfferingTypeT>(value);
275 }
276 template <typename OfferingTypeT = Aws::String>
277 ReservedCacheNode& WithOfferingType(OfferingTypeT&& value) {
278 SetOfferingType(std::forward<OfferingTypeT>(value));
279 return *this;
280 }
282
284
287 inline const Aws::String& GetState() const { return m_state; }
288 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
289 template <typename StateT = Aws::String>
290 void SetState(StateT&& value) {
291 m_stateHasBeenSet = true;
292 m_state = std::forward<StateT>(value);
293 }
294 template <typename StateT = Aws::String>
295 ReservedCacheNode& WithState(StateT&& value) {
296 SetState(std::forward<StateT>(value));
297 return *this;
298 }
300
302
305 inline const Aws::Vector<RecurringCharge>& GetRecurringCharges() const { return m_recurringCharges; }
306 inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; }
307 template <typename RecurringChargesT = Aws::Vector<RecurringCharge>>
308 void SetRecurringCharges(RecurringChargesT&& value) {
309 m_recurringChargesHasBeenSet = true;
310 m_recurringCharges = std::forward<RecurringChargesT>(value);
311 }
312 template <typename RecurringChargesT = Aws::Vector<RecurringCharge>>
313 ReservedCacheNode& WithRecurringCharges(RecurringChargesT&& value) {
314 SetRecurringCharges(std::forward<RecurringChargesT>(value));
315 return *this;
316 }
317 template <typename RecurringChargesT = RecurringCharge>
318 ReservedCacheNode& AddRecurringCharges(RecurringChargesT&& value) {
319 m_recurringChargesHasBeenSet = true;
320 m_recurringCharges.emplace_back(std::forward<RecurringChargesT>(value));
321 return *this;
322 }
324
326
331 inline const Aws::String& GetReservationARN() const { return m_reservationARN; }
332 inline bool ReservationARNHasBeenSet() const { return m_reservationARNHasBeenSet; }
333 template <typename ReservationARNT = Aws::String>
334 void SetReservationARN(ReservationARNT&& value) {
335 m_reservationARNHasBeenSet = true;
336 m_reservationARN = std::forward<ReservationARNT>(value);
337 }
338 template <typename ReservationARNT = Aws::String>
339 ReservedCacheNode& WithReservationARN(ReservationARNT&& value) {
340 SetReservationARN(std::forward<ReservationARNT>(value));
341 return *this;
342 }
344 private:
345 Aws::String m_reservedCacheNodeId;
346
347 Aws::String m_reservedCacheNodesOfferingId;
348
349 Aws::String m_cacheNodeType;
350
351 Aws::Utils::DateTime m_startTime{};
352
353 int m_duration{0};
354
355 double m_fixedPrice{0.0};
356
357 double m_usagePrice{0.0};
358
359 int m_cacheNodeCount{0};
360
361 Aws::String m_productDescription;
362
363 Aws::String m_offeringType;
364
365 Aws::String m_state;
366
367 Aws::Vector<RecurringCharge> m_recurringCharges;
368
369 Aws::String m_reservationARN;
370 bool m_reservedCacheNodeIdHasBeenSet = false;
371 bool m_reservedCacheNodesOfferingIdHasBeenSet = false;
372 bool m_cacheNodeTypeHasBeenSet = false;
373 bool m_startTimeHasBeenSet = false;
374 bool m_durationHasBeenSet = false;
375 bool m_fixedPriceHasBeenSet = false;
376 bool m_usagePriceHasBeenSet = false;
377 bool m_cacheNodeCountHasBeenSet = false;
378 bool m_productDescriptionHasBeenSet = false;
379 bool m_offeringTypeHasBeenSet = false;
380 bool m_stateHasBeenSet = false;
381 bool m_recurringChargesHasBeenSet = false;
382 bool m_reservationARNHasBeenSet = false;
383};
384
385} // namespace Model
386} // namespace ElastiCache
387} // namespace Aws
AWS_ELASTICACHE_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetCacheNodeType(CacheNodeTypeT &&value)
ReservedCacheNode & WithCacheNodeCount(int value)
ReservedCacheNode & WithReservedCacheNodeId(ReservedCacheNodeIdT &&value)
ReservedCacheNode & WithReservationARN(ReservationARNT &&value)
ReservedCacheNode & WithProductDescription(ProductDescriptionT &&value)
AWS_ELASTICACHE_API void OutputToStream(Aws::OStream &oStream, const char *location) const
ReservedCacheNode & WithCacheNodeType(CacheNodeTypeT &&value)
void SetReservedCacheNodeId(ReservedCacheNodeIdT &&value)
void SetReservedCacheNodesOfferingId(ReservedCacheNodesOfferingIdT &&value)
const Aws::String & GetReservationARN() const
void SetRecurringCharges(RecurringChargesT &&value)
ReservedCacheNode & WithReservedCacheNodesOfferingId(ReservedCacheNodesOfferingIdT &&value)
const Aws::String & GetReservedCacheNodeId() const
ReservedCacheNode & AddRecurringCharges(RecurringChargesT &&value)
const Aws::String & GetProductDescription() const
void SetProductDescription(ProductDescriptionT &&value)
AWS_ELASTICACHE_API ReservedCacheNode & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
ReservedCacheNode & WithDuration(int value)
const Aws::Utils::DateTime & GetStartTime() const
ReservedCacheNode & WithOfferingType(OfferingTypeT &&value)
void SetReservationARN(ReservationARNT &&value)
ReservedCacheNode & WithRecurringCharges(RecurringChargesT &&value)
const Aws::Vector< RecurringCharge > & GetRecurringCharges() const
ReservedCacheNode & WithStartTime(StartTimeT &&value)
ReservedCacheNode & WithFixedPrice(double value)
AWS_ELASTICACHE_API ReservedCacheNode()=default
ReservedCacheNode & WithState(StateT &&value)
AWS_ELASTICACHE_API ReservedCacheNode(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetReservedCacheNodesOfferingId() const
ReservedCacheNode & WithUsagePrice(double value)
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