AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
SavingsPlan.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
11#include <aws/savingsplans/model/CurrencyCode.h>
12#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
13#include <aws/savingsplans/model/SavingsPlanProductType.h>
14#include <aws/savingsplans/model/SavingsPlanState.h>
15#include <aws/savingsplans/model/SavingsPlanType.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace SavingsPlans {
27namespace Model {
28
35 public:
36 AWS_SAVINGSPLANS_API SavingsPlan() = default;
37 AWS_SAVINGSPLANS_API SavingsPlan(Aws::Utils::Json::JsonView jsonValue);
38 AWS_SAVINGSPLANS_API SavingsPlan& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_SAVINGSPLANS_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::String& GetOfferingId() const { return m_offeringId; }
46 inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
47 template <typename OfferingIdT = Aws::String>
48 void SetOfferingId(OfferingIdT&& value) {
49 m_offeringIdHasBeenSet = true;
50 m_offeringId = std::forward<OfferingIdT>(value);
51 }
52 template <typename OfferingIdT = Aws::String>
53 SavingsPlan& WithOfferingId(OfferingIdT&& value) {
54 SetOfferingId(std::forward<OfferingIdT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetSavingsPlanId() const { return m_savingsPlanId; }
64 inline bool SavingsPlanIdHasBeenSet() const { return m_savingsPlanIdHasBeenSet; }
65 template <typename SavingsPlanIdT = Aws::String>
66 void SetSavingsPlanId(SavingsPlanIdT&& value) {
67 m_savingsPlanIdHasBeenSet = true;
68 m_savingsPlanId = std::forward<SavingsPlanIdT>(value);
69 }
70 template <typename SavingsPlanIdT = Aws::String>
71 SavingsPlan& WithSavingsPlanId(SavingsPlanIdT&& value) {
72 SetSavingsPlanId(std::forward<SavingsPlanIdT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::String& GetSavingsPlanArn() const { return m_savingsPlanArn; }
82 inline bool SavingsPlanArnHasBeenSet() const { return m_savingsPlanArnHasBeenSet; }
83 template <typename SavingsPlanArnT = Aws::String>
84 void SetSavingsPlanArn(SavingsPlanArnT&& value) {
85 m_savingsPlanArnHasBeenSet = true;
86 m_savingsPlanArn = std::forward<SavingsPlanArnT>(value);
87 }
88 template <typename SavingsPlanArnT = Aws::String>
89 SavingsPlan& WithSavingsPlanArn(SavingsPlanArnT&& value) {
90 SetSavingsPlanArn(std::forward<SavingsPlanArnT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::String& GetDescription() const { return m_description; }
100 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
101 template <typename DescriptionT = Aws::String>
102 void SetDescription(DescriptionT&& value) {
103 m_descriptionHasBeenSet = true;
104 m_description = std::forward<DescriptionT>(value);
105 }
106 template <typename DescriptionT = Aws::String>
107 SavingsPlan& WithDescription(DescriptionT&& value) {
108 SetDescription(std::forward<DescriptionT>(value));
109 return *this;
110 }
112
114
117 inline const Aws::String& GetStart() const { return m_start; }
118 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
119 template <typename StartT = Aws::String>
120 void SetStart(StartT&& value) {
121 m_startHasBeenSet = true;
122 m_start = std::forward<StartT>(value);
123 }
124 template <typename StartT = Aws::String>
125 SavingsPlan& WithStart(StartT&& value) {
126 SetStart(std::forward<StartT>(value));
127 return *this;
128 }
130
132
135 inline const Aws::String& GetEnd() const { return m_end; }
136 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
137 template <typename EndT = Aws::String>
138 void SetEnd(EndT&& value) {
139 m_endHasBeenSet = true;
140 m_end = std::forward<EndT>(value);
141 }
142 template <typename EndT = Aws::String>
143 SavingsPlan& WithEnd(EndT&& value) {
144 SetEnd(std::forward<EndT>(value));
145 return *this;
146 }
148
150
153 inline SavingsPlanState GetState() const { return m_state; }
154 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
155 inline void SetState(SavingsPlanState value) {
156 m_stateHasBeenSet = true;
157 m_state = value;
158 }
160 SetState(value);
161 return *this;
162 }
164
166
169 inline const Aws::String& GetRegion() const { return m_region; }
170 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
171 template <typename RegionT = Aws::String>
172 void SetRegion(RegionT&& value) {
173 m_regionHasBeenSet = true;
174 m_region = std::forward<RegionT>(value);
175 }
176 template <typename RegionT = Aws::String>
177 SavingsPlan& WithRegion(RegionT&& value) {
178 SetRegion(std::forward<RegionT>(value));
179 return *this;
180 }
182
184
187 inline const Aws::String& GetEc2InstanceFamily() const { return m_ec2InstanceFamily; }
188 inline bool Ec2InstanceFamilyHasBeenSet() const { return m_ec2InstanceFamilyHasBeenSet; }
189 template <typename Ec2InstanceFamilyT = Aws::String>
190 void SetEc2InstanceFamily(Ec2InstanceFamilyT&& value) {
191 m_ec2InstanceFamilyHasBeenSet = true;
192 m_ec2InstanceFamily = std::forward<Ec2InstanceFamilyT>(value);
193 }
194 template <typename Ec2InstanceFamilyT = Aws::String>
195 SavingsPlan& WithEc2InstanceFamily(Ec2InstanceFamilyT&& value) {
196 SetEc2InstanceFamily(std::forward<Ec2InstanceFamilyT>(value));
197 return *this;
198 }
200
202
205 inline SavingsPlanType GetSavingsPlanType() const { return m_savingsPlanType; }
206 inline bool SavingsPlanTypeHasBeenSet() const { return m_savingsPlanTypeHasBeenSet; }
208 m_savingsPlanTypeHasBeenSet = true;
209 m_savingsPlanType = value;
210 }
212 SetSavingsPlanType(value);
213 return *this;
214 }
216
218
221 inline SavingsPlanPaymentOption GetPaymentOption() const { return m_paymentOption; }
222 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
224 m_paymentOptionHasBeenSet = true;
225 m_paymentOption = value;
226 }
228 SetPaymentOption(value);
229 return *this;
230 }
232
234
237 inline const Aws::Vector<SavingsPlanProductType>& GetProductTypes() const { return m_productTypes; }
238 inline bool ProductTypesHasBeenSet() const { return m_productTypesHasBeenSet; }
239 template <typename ProductTypesT = Aws::Vector<SavingsPlanProductType>>
240 void SetProductTypes(ProductTypesT&& value) {
241 m_productTypesHasBeenSet = true;
242 m_productTypes = std::forward<ProductTypesT>(value);
243 }
244 template <typename ProductTypesT = Aws::Vector<SavingsPlanProductType>>
245 SavingsPlan& WithProductTypes(ProductTypesT&& value) {
246 SetProductTypes(std::forward<ProductTypesT>(value));
247 return *this;
248 }
250 m_productTypesHasBeenSet = true;
251 m_productTypes.push_back(value);
252 return *this;
253 }
255
257
260 inline CurrencyCode GetCurrency() const { return m_currency; }
261 inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
262 inline void SetCurrency(CurrencyCode value) {
263 m_currencyHasBeenSet = true;
264 m_currency = value;
265 }
267 SetCurrency(value);
268 return *this;
269 }
271
273
276 inline const Aws::String& GetCommitment() const { return m_commitment; }
277 inline bool CommitmentHasBeenSet() const { return m_commitmentHasBeenSet; }
278 template <typename CommitmentT = Aws::String>
279 void SetCommitment(CommitmentT&& value) {
280 m_commitmentHasBeenSet = true;
281 m_commitment = std::forward<CommitmentT>(value);
282 }
283 template <typename CommitmentT = Aws::String>
284 SavingsPlan& WithCommitment(CommitmentT&& value) {
285 SetCommitment(std::forward<CommitmentT>(value));
286 return *this;
287 }
289
291
294 inline const Aws::String& GetUpfrontPaymentAmount() const { return m_upfrontPaymentAmount; }
295 inline bool UpfrontPaymentAmountHasBeenSet() const { return m_upfrontPaymentAmountHasBeenSet; }
296 template <typename UpfrontPaymentAmountT = Aws::String>
297 void SetUpfrontPaymentAmount(UpfrontPaymentAmountT&& value) {
298 m_upfrontPaymentAmountHasBeenSet = true;
299 m_upfrontPaymentAmount = std::forward<UpfrontPaymentAmountT>(value);
300 }
301 template <typename UpfrontPaymentAmountT = Aws::String>
302 SavingsPlan& WithUpfrontPaymentAmount(UpfrontPaymentAmountT&& value) {
303 SetUpfrontPaymentAmount(std::forward<UpfrontPaymentAmountT>(value));
304 return *this;
305 }
307
309
312 inline const Aws::String& GetRecurringPaymentAmount() const { return m_recurringPaymentAmount; }
313 inline bool RecurringPaymentAmountHasBeenSet() const { return m_recurringPaymentAmountHasBeenSet; }
314 template <typename RecurringPaymentAmountT = Aws::String>
315 void SetRecurringPaymentAmount(RecurringPaymentAmountT&& value) {
316 m_recurringPaymentAmountHasBeenSet = true;
317 m_recurringPaymentAmount = std::forward<RecurringPaymentAmountT>(value);
318 }
319 template <typename RecurringPaymentAmountT = Aws::String>
320 SavingsPlan& WithRecurringPaymentAmount(RecurringPaymentAmountT&& value) {
321 SetRecurringPaymentAmount(std::forward<RecurringPaymentAmountT>(value));
322 return *this;
323 }
325
327
330 inline long long GetTermDurationInSeconds() const { return m_termDurationInSeconds; }
331 inline bool TermDurationInSecondsHasBeenSet() const { return m_termDurationInSecondsHasBeenSet; }
332 inline void SetTermDurationInSeconds(long long value) {
333 m_termDurationInSecondsHasBeenSet = true;
334 m_termDurationInSeconds = value;
335 }
336 inline SavingsPlan& WithTermDurationInSeconds(long long value) {
338 return *this;
339 }
341
343
346 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
347 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
348 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
349 void SetTags(TagsT&& value) {
350 m_tagsHasBeenSet = true;
351 m_tags = std::forward<TagsT>(value);
352 }
353 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
354 SavingsPlan& WithTags(TagsT&& value) {
355 SetTags(std::forward<TagsT>(value));
356 return *this;
357 }
358 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
359 SavingsPlan& AddTags(TagsKeyT&& key, TagsValueT&& value) {
360 m_tagsHasBeenSet = true;
361 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
362 return *this;
363 }
365
367
372 inline const Aws::String& GetReturnableUntil() const { return m_returnableUntil; }
373 inline bool ReturnableUntilHasBeenSet() const { return m_returnableUntilHasBeenSet; }
374 template <typename ReturnableUntilT = Aws::String>
375 void SetReturnableUntil(ReturnableUntilT&& value) {
376 m_returnableUntilHasBeenSet = true;
377 m_returnableUntil = std::forward<ReturnableUntilT>(value);
378 }
379 template <typename ReturnableUntilT = Aws::String>
380 SavingsPlan& WithReturnableUntil(ReturnableUntilT&& value) {
381 SetReturnableUntil(std::forward<ReturnableUntilT>(value));
382 return *this;
383 }
385 private:
386 Aws::String m_offeringId;
387
388 Aws::String m_savingsPlanId;
389
390 Aws::String m_savingsPlanArn;
391
392 Aws::String m_description;
393
394 Aws::String m_start;
395
396 Aws::String m_end;
397
399
400 Aws::String m_region;
401
402 Aws::String m_ec2InstanceFamily;
403
404 SavingsPlanType m_savingsPlanType{SavingsPlanType::NOT_SET};
405
407
409
411
412 Aws::String m_commitment;
413
414 Aws::String m_upfrontPaymentAmount;
415
416 Aws::String m_recurringPaymentAmount;
417
418 long long m_termDurationInSeconds{0};
419
421
422 Aws::String m_returnableUntil;
423 bool m_offeringIdHasBeenSet = false;
424 bool m_savingsPlanIdHasBeenSet = false;
425 bool m_savingsPlanArnHasBeenSet = false;
426 bool m_descriptionHasBeenSet = false;
427 bool m_startHasBeenSet = false;
428 bool m_endHasBeenSet = false;
429 bool m_stateHasBeenSet = false;
430 bool m_regionHasBeenSet = false;
431 bool m_ec2InstanceFamilyHasBeenSet = false;
432 bool m_savingsPlanTypeHasBeenSet = false;
433 bool m_paymentOptionHasBeenSet = false;
434 bool m_productTypesHasBeenSet = false;
435 bool m_currencyHasBeenSet = false;
436 bool m_commitmentHasBeenSet = false;
437 bool m_upfrontPaymentAmountHasBeenSet = false;
438 bool m_recurringPaymentAmountHasBeenSet = false;
439 bool m_termDurationInSecondsHasBeenSet = false;
440 bool m_tagsHasBeenSet = false;
441 bool m_returnableUntilHasBeenSet = false;
442};
443
444} // namespace Model
445} // namespace SavingsPlans
446} // namespace Aws
SavingsPlan & WithTermDurationInSeconds(long long value)
SavingsPlan & WithTags(TagsT &&value)
SavingsPlan & WithEc2InstanceFamily(Ec2InstanceFamilyT &&value)
AWS_SAVINGSPLANS_API SavingsPlan & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetProductTypes(ProductTypesT &&value)
const Aws::Vector< SavingsPlanProductType > & GetProductTypes() const
const Aws::String & GetSavingsPlanId() const
Definition SavingsPlan.h:63
AWS_SAVINGSPLANS_API SavingsPlan(Aws::Utils::Json::JsonView jsonValue)
SavingsPlanType GetSavingsPlanType() const
const Aws::Map< Aws::String, Aws::String > & GetTags() const
SavingsPlan & WithStart(StartT &&value)
void SetSavingsPlanId(SavingsPlanIdT &&value)
Definition SavingsPlan.h:66
void SetSavingsPlanArn(SavingsPlanArnT &&value)
Definition SavingsPlan.h:84
void SetCurrency(CurrencyCode value)
SavingsPlan & WithReturnableUntil(ReturnableUntilT &&value)
void SetSavingsPlanType(SavingsPlanType value)
SavingsPlan & WithUpfrontPaymentAmount(UpfrontPaymentAmountT &&value)
SavingsPlan & WithProductTypes(ProductTypesT &&value)
const Aws::String & GetOfferingId() const
Definition SavingsPlan.h:45
SavingsPlanPaymentOption GetPaymentOption() const
void SetDescription(DescriptionT &&value)
const Aws::String & GetStart() const
SavingsPlan & WithDescription(DescriptionT &&value)
SavingsPlan & WithCommitment(CommitmentT &&value)
SavingsPlan & WithSavingsPlanType(SavingsPlanType value)
SavingsPlanState GetState() const
void SetCommitment(CommitmentT &&value)
const Aws::String & GetRecurringPaymentAmount() const
void SetRecurringPaymentAmount(RecurringPaymentAmountT &&value)
void SetReturnableUntil(ReturnableUntilT &&value)
void SetUpfrontPaymentAmount(UpfrontPaymentAmountT &&value)
void SetOfferingId(OfferingIdT &&value)
Definition SavingsPlan.h:48
const Aws::String & GetRegion() const
SavingsPlan & WithRecurringPaymentAmount(RecurringPaymentAmountT &&value)
SavingsPlan & WithOfferingId(OfferingIdT &&value)
Definition SavingsPlan.h:53
const Aws::String & GetSavingsPlanArn() const
Definition SavingsPlan.h:81
AWS_SAVINGSPLANS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetEc2InstanceFamily(Ec2InstanceFamilyT &&value)
void SetTermDurationInSeconds(long long value)
const Aws::String & GetReturnableUntil() const
const Aws::String & GetDescription() const
Definition SavingsPlan.h:99
const Aws::String & GetUpfrontPaymentAmount() const
AWS_SAVINGSPLANS_API SavingsPlan()=default
SavingsPlan & WithCurrency(CurrencyCode value)
const Aws::String & GetCommitment() const
SavingsPlan & WithRegion(RegionT &&value)
const Aws::String & GetEc2InstanceFamily() const
SavingsPlan & AddTags(TagsKeyT &&key, TagsValueT &&value)
SavingsPlan & AddProductTypes(SavingsPlanProductType value)
SavingsPlan & WithPaymentOption(SavingsPlanPaymentOption value)
SavingsPlan & WithState(SavingsPlanState value)
SavingsPlan & WithEnd(EndT &&value)
SavingsPlan & WithSavingsPlanArn(SavingsPlanArnT &&value)
Definition SavingsPlan.h:89
SavingsPlan & WithSavingsPlanId(SavingsPlanIdT &&value)
Definition SavingsPlan.h:71
void SetPaymentOption(SavingsPlanPaymentOption value)
void SetState(SavingsPlanState value)
const Aws::String & GetEnd() const
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