AWS SDK for C++

AWS SDK for C++ Version 1.11.608

Loading...
Searching...
No Matches
SavingsPlan.h
1
6#pragma once
7#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/savingsplans/model/SavingsPlanState.h>
10#include <aws/savingsplans/model/SavingsPlanType.h>
11#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/savingsplans/model/CurrencyCode.h>
14#include <aws/core/utils/memory/stl/AWSMap.h>
15#include <aws/savingsplans/model/SavingsPlanProductType.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Json
23{
24 class JsonValue;
25 class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace SavingsPlans
29{
30namespace Model
31{
32
39 {
40 public:
41 AWS_SAVINGSPLANS_API SavingsPlan() = default;
42 AWS_SAVINGSPLANS_API SavingsPlan(Aws::Utils::Json::JsonView jsonValue);
43 AWS_SAVINGSPLANS_API SavingsPlan& operator=(Aws::Utils::Json::JsonView jsonValue);
44 AWS_SAVINGSPLANS_API Aws::Utils::Json::JsonValue Jsonize() const;
45
46
48
51 inline const Aws::String& GetOfferingId() const { return m_offeringId; }
52 inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
53 template<typename OfferingIdT = Aws::String>
54 void SetOfferingId(OfferingIdT&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::forward<OfferingIdT>(value); }
55 template<typename OfferingIdT = Aws::String>
56 SavingsPlan& WithOfferingId(OfferingIdT&& value) { SetOfferingId(std::forward<OfferingIdT>(value)); return *this;}
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) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId = std::forward<SavingsPlanIdT>(value); }
67 template<typename SavingsPlanIdT = Aws::String>
68 SavingsPlan& WithSavingsPlanId(SavingsPlanIdT&& value) { SetSavingsPlanId(std::forward<SavingsPlanIdT>(value)); return *this;}
70
72
75 inline const Aws::String& GetSavingsPlanArn() const { return m_savingsPlanArn; }
76 inline bool SavingsPlanArnHasBeenSet() const { return m_savingsPlanArnHasBeenSet; }
77 template<typename SavingsPlanArnT = Aws::String>
78 void SetSavingsPlanArn(SavingsPlanArnT&& value) { m_savingsPlanArnHasBeenSet = true; m_savingsPlanArn = std::forward<SavingsPlanArnT>(value); }
79 template<typename SavingsPlanArnT = Aws::String>
80 SavingsPlan& WithSavingsPlanArn(SavingsPlanArnT&& value) { SetSavingsPlanArn(std::forward<SavingsPlanArnT>(value)); return *this;}
82
84
87 inline const Aws::String& GetDescription() const { return m_description; }
88 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
89 template<typename DescriptionT = Aws::String>
90 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
91 template<typename DescriptionT = Aws::String>
92 SavingsPlan& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
94
96
99 inline const Aws::String& GetStart() const { return m_start; }
100 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
101 template<typename StartT = Aws::String>
102 void SetStart(StartT&& value) { m_startHasBeenSet = true; m_start = std::forward<StartT>(value); }
103 template<typename StartT = Aws::String>
104 SavingsPlan& WithStart(StartT&& value) { SetStart(std::forward<StartT>(value)); return *this;}
106
108
111 inline const Aws::String& GetEnd() const { return m_end; }
112 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
113 template<typename EndT = Aws::String>
114 void SetEnd(EndT&& value) { m_endHasBeenSet = true; m_end = std::forward<EndT>(value); }
115 template<typename EndT = Aws::String>
116 SavingsPlan& WithEnd(EndT&& value) { SetEnd(std::forward<EndT>(value)); return *this;}
118
120
123 inline SavingsPlanState GetState() const { return m_state; }
124 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
125 inline void SetState(SavingsPlanState value) { m_stateHasBeenSet = true; m_state = value; }
126 inline SavingsPlan& WithState(SavingsPlanState value) { SetState(value); return *this;}
128
130
133 inline const Aws::String& GetRegion() const { return m_region; }
134 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
135 template<typename RegionT = Aws::String>
136 void SetRegion(RegionT&& value) { m_regionHasBeenSet = true; m_region = std::forward<RegionT>(value); }
137 template<typename RegionT = Aws::String>
138 SavingsPlan& WithRegion(RegionT&& value) { SetRegion(std::forward<RegionT>(value)); return *this;}
140
142
145 inline const Aws::String& GetEc2InstanceFamily() const { return m_ec2InstanceFamily; }
146 inline bool Ec2InstanceFamilyHasBeenSet() const { return m_ec2InstanceFamilyHasBeenSet; }
147 template<typename Ec2InstanceFamilyT = Aws::String>
148 void SetEc2InstanceFamily(Ec2InstanceFamilyT&& value) { m_ec2InstanceFamilyHasBeenSet = true; m_ec2InstanceFamily = std::forward<Ec2InstanceFamilyT>(value); }
149 template<typename Ec2InstanceFamilyT = Aws::String>
150 SavingsPlan& WithEc2InstanceFamily(Ec2InstanceFamilyT&& value) { SetEc2InstanceFamily(std::forward<Ec2InstanceFamilyT>(value)); return *this;}
152
154
157 inline SavingsPlanType GetSavingsPlanType() const { return m_savingsPlanType; }
158 inline bool SavingsPlanTypeHasBeenSet() const { return m_savingsPlanTypeHasBeenSet; }
159 inline void SetSavingsPlanType(SavingsPlanType value) { m_savingsPlanTypeHasBeenSet = true; m_savingsPlanType = value; }
162
164
167 inline SavingsPlanPaymentOption GetPaymentOption() const { return m_paymentOption; }
168 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
169 inline void SetPaymentOption(SavingsPlanPaymentOption value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
172
174
177 inline const Aws::Vector<SavingsPlanProductType>& GetProductTypes() const { return m_productTypes; }
178 inline bool ProductTypesHasBeenSet() const { return m_productTypesHasBeenSet; }
179 template<typename ProductTypesT = Aws::Vector<SavingsPlanProductType>>
180 void SetProductTypes(ProductTypesT&& value) { m_productTypesHasBeenSet = true; m_productTypes = std::forward<ProductTypesT>(value); }
181 template<typename ProductTypesT = Aws::Vector<SavingsPlanProductType>>
182 SavingsPlan& WithProductTypes(ProductTypesT&& value) { SetProductTypes(std::forward<ProductTypesT>(value)); return *this;}
183 inline SavingsPlan& AddProductTypes(SavingsPlanProductType value) { m_productTypesHasBeenSet = true; m_productTypes.push_back(value); return *this; }
185
187
190 inline CurrencyCode GetCurrency() const { return m_currency; }
191 inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
192 inline void SetCurrency(CurrencyCode value) { m_currencyHasBeenSet = true; m_currency = value; }
193 inline SavingsPlan& WithCurrency(CurrencyCode value) { SetCurrency(value); return *this;}
195
197
200 inline const Aws::String& GetCommitment() const { return m_commitment; }
201 inline bool CommitmentHasBeenSet() const { return m_commitmentHasBeenSet; }
202 template<typename CommitmentT = Aws::String>
203 void SetCommitment(CommitmentT&& value) { m_commitmentHasBeenSet = true; m_commitment = std::forward<CommitmentT>(value); }
204 template<typename CommitmentT = Aws::String>
205 SavingsPlan& WithCommitment(CommitmentT&& value) { SetCommitment(std::forward<CommitmentT>(value)); return *this;}
207
209
212 inline const Aws::String& GetUpfrontPaymentAmount() const { return m_upfrontPaymentAmount; }
213 inline bool UpfrontPaymentAmountHasBeenSet() const { return m_upfrontPaymentAmountHasBeenSet; }
214 template<typename UpfrontPaymentAmountT = Aws::String>
215 void SetUpfrontPaymentAmount(UpfrontPaymentAmountT&& value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount = std::forward<UpfrontPaymentAmountT>(value); }
216 template<typename UpfrontPaymentAmountT = Aws::String>
217 SavingsPlan& WithUpfrontPaymentAmount(UpfrontPaymentAmountT&& value) { SetUpfrontPaymentAmount(std::forward<UpfrontPaymentAmountT>(value)); return *this;}
219
221
224 inline const Aws::String& GetRecurringPaymentAmount() const { return m_recurringPaymentAmount; }
225 inline bool RecurringPaymentAmountHasBeenSet() const { return m_recurringPaymentAmountHasBeenSet; }
226 template<typename RecurringPaymentAmountT = Aws::String>
227 void SetRecurringPaymentAmount(RecurringPaymentAmountT&& value) { m_recurringPaymentAmountHasBeenSet = true; m_recurringPaymentAmount = std::forward<RecurringPaymentAmountT>(value); }
228 template<typename RecurringPaymentAmountT = Aws::String>
229 SavingsPlan& WithRecurringPaymentAmount(RecurringPaymentAmountT&& value) { SetRecurringPaymentAmount(std::forward<RecurringPaymentAmountT>(value)); return *this;}
231
233
236 inline long long GetTermDurationInSeconds() const { return m_termDurationInSeconds; }
237 inline bool TermDurationInSecondsHasBeenSet() const { return m_termDurationInSecondsHasBeenSet; }
238 inline void SetTermDurationInSeconds(long long value) { m_termDurationInSecondsHasBeenSet = true; m_termDurationInSeconds = value; }
239 inline SavingsPlan& WithTermDurationInSeconds(long long value) { SetTermDurationInSeconds(value); return *this;}
241
243
246 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
247 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
248 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
249 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
250 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
251 SavingsPlan& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
252 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
253 SavingsPlan& AddTags(TagsKeyT&& key, TagsValueT&& value) {
254 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
255 }
257
259
264 inline const Aws::String& GetReturnableUntil() const { return m_returnableUntil; }
265 inline bool ReturnableUntilHasBeenSet() const { return m_returnableUntilHasBeenSet; }
266 template<typename ReturnableUntilT = Aws::String>
267 void SetReturnableUntil(ReturnableUntilT&& value) { m_returnableUntilHasBeenSet = true; m_returnableUntil = std::forward<ReturnableUntilT>(value); }
268 template<typename ReturnableUntilT = Aws::String>
269 SavingsPlan& WithReturnableUntil(ReturnableUntilT&& value) { SetReturnableUntil(std::forward<ReturnableUntilT>(value)); return *this;}
271 private:
272
273 Aws::String m_offeringId;
274 bool m_offeringIdHasBeenSet = false;
275
276 Aws::String m_savingsPlanId;
277 bool m_savingsPlanIdHasBeenSet = false;
278
279 Aws::String m_savingsPlanArn;
280 bool m_savingsPlanArnHasBeenSet = false;
281
282 Aws::String m_description;
283 bool m_descriptionHasBeenSet = false;
284
285 Aws::String m_start;
286 bool m_startHasBeenSet = false;
287
288 Aws::String m_end;
289 bool m_endHasBeenSet = false;
290
292 bool m_stateHasBeenSet = false;
293
294 Aws::String m_region;
295 bool m_regionHasBeenSet = false;
296
297 Aws::String m_ec2InstanceFamily;
298 bool m_ec2InstanceFamilyHasBeenSet = false;
299
300 SavingsPlanType m_savingsPlanType{SavingsPlanType::NOT_SET};
301 bool m_savingsPlanTypeHasBeenSet = false;
302
304 bool m_paymentOptionHasBeenSet = false;
305
307 bool m_productTypesHasBeenSet = false;
308
310 bool m_currencyHasBeenSet = false;
311
312 Aws::String m_commitment;
313 bool m_commitmentHasBeenSet = false;
314
315 Aws::String m_upfrontPaymentAmount;
316 bool m_upfrontPaymentAmountHasBeenSet = false;
317
318 Aws::String m_recurringPaymentAmount;
319 bool m_recurringPaymentAmountHasBeenSet = false;
320
321 long long m_termDurationInSeconds{0};
322 bool m_termDurationInSecondsHasBeenSet = false;
323
325 bool m_tagsHasBeenSet = false;
326
327 Aws::String m_returnableUntil;
328 bool m_returnableUntilHasBeenSet = false;
329 };
330
331} // namespace Model
332} // namespace SavingsPlans
333} // 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:78
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:51
SavingsPlanPaymentOption GetPaymentOption() const
void SetDescription(DescriptionT &&value)
Definition SavingsPlan.h:90
const Aws::String & GetStart() const
Definition SavingsPlan.h:99
SavingsPlan & WithDescription(DescriptionT &&value)
Definition SavingsPlan.h:92
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:54
const Aws::String & GetRegion() const
SavingsPlan & WithRecurringPaymentAmount(RecurringPaymentAmountT &&value)
SavingsPlan & WithOfferingId(OfferingIdT &&value)
Definition SavingsPlan.h:56
const Aws::String & GetSavingsPlanArn() const
Definition SavingsPlan.h:75
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:87
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:80
SavingsPlan & WithSavingsPlanId(SavingsPlanIdT &&value)
Definition SavingsPlan.h:68
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