AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
ReservedInstance.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/opensearch/OpenSearchService_EXPORTS.h>
11#include <aws/opensearch/model/OpenSearchPartitionInstanceType.h>
12#include <aws/opensearch/model/RecurringCharge.h>
13#include <aws/opensearch/model/ReservedInstancePaymentOption.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace OpenSearchService {
25namespace Model {
26
33 public:
34 AWS_OPENSEARCHSERVICE_API ReservedInstance() = default;
35 AWS_OPENSEARCHSERVICE_API ReservedInstance(Aws::Utils::Json::JsonView jsonValue);
36 AWS_OPENSEARCHSERVICE_API ReservedInstance& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetReservationName() const { return m_reservationName; }
44 inline bool ReservationNameHasBeenSet() const { return m_reservationNameHasBeenSet; }
45 template <typename ReservationNameT = Aws::String>
46 void SetReservationName(ReservationNameT&& value) {
47 m_reservationNameHasBeenSet = true;
48 m_reservationName = std::forward<ReservationNameT>(value);
49 }
50 template <typename ReservationNameT = Aws::String>
51 ReservedInstance& WithReservationName(ReservationNameT&& value) {
52 SetReservationName(std::forward<ReservationNameT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetReservedInstanceId() const { return m_reservedInstanceId; }
62 inline bool ReservedInstanceIdHasBeenSet() const { return m_reservedInstanceIdHasBeenSet; }
63 template <typename ReservedInstanceIdT = Aws::String>
64 void SetReservedInstanceId(ReservedInstanceIdT&& value) {
65 m_reservedInstanceIdHasBeenSet = true;
66 m_reservedInstanceId = std::forward<ReservedInstanceIdT>(value);
67 }
68 template <typename ReservedInstanceIdT = Aws::String>
69 ReservedInstance& WithReservedInstanceId(ReservedInstanceIdT&& value) {
70 SetReservedInstanceId(std::forward<ReservedInstanceIdT>(value));
71 return *this;
72 }
74
76
79 inline long long GetBillingSubscriptionId() const { return m_billingSubscriptionId; }
80 inline bool BillingSubscriptionIdHasBeenSet() const { return m_billingSubscriptionIdHasBeenSet; }
81 inline void SetBillingSubscriptionId(long long value) {
82 m_billingSubscriptionIdHasBeenSet = true;
83 m_billingSubscriptionId = value;
84 }
87 return *this;
88 }
90
92
95 inline const Aws::String& GetReservedInstanceOfferingId() const { return m_reservedInstanceOfferingId; }
96 inline bool ReservedInstanceOfferingIdHasBeenSet() const { return m_reservedInstanceOfferingIdHasBeenSet; }
97 template <typename ReservedInstanceOfferingIdT = Aws::String>
98 void SetReservedInstanceOfferingId(ReservedInstanceOfferingIdT&& value) {
99 m_reservedInstanceOfferingIdHasBeenSet = true;
100 m_reservedInstanceOfferingId = std::forward<ReservedInstanceOfferingIdT>(value);
101 }
102 template <typename ReservedInstanceOfferingIdT = Aws::String>
103 ReservedInstance& WithReservedInstanceOfferingId(ReservedInstanceOfferingIdT&& value) {
104 SetReservedInstanceOfferingId(std::forward<ReservedInstanceOfferingIdT>(value));
105 return *this;
106 }
108
110
113 inline OpenSearchPartitionInstanceType GetInstanceType() const { return m_instanceType; }
114 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
116 m_instanceTypeHasBeenSet = true;
117 m_instanceType = value;
118 }
120 SetInstanceType(value);
121 return *this;
122 }
124
126
129 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
130 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
131 template <typename StartTimeT = Aws::Utils::DateTime>
132 void SetStartTime(StartTimeT&& value) {
133 m_startTimeHasBeenSet = true;
134 m_startTime = std::forward<StartTimeT>(value);
135 }
136 template <typename StartTimeT = Aws::Utils::DateTime>
137 ReservedInstance& WithStartTime(StartTimeT&& value) {
138 SetStartTime(std::forward<StartTimeT>(value));
139 return *this;
140 }
142
144
147 inline int GetDuration() const { return m_duration; }
148 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
149 inline void SetDuration(int value) {
150 m_durationHasBeenSet = true;
151 m_duration = value;
152 }
153 inline ReservedInstance& WithDuration(int value) {
154 SetDuration(value);
155 return *this;
156 }
158
160
164 inline double GetFixedPrice() const { return m_fixedPrice; }
165 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
166 inline void SetFixedPrice(double value) {
167 m_fixedPriceHasBeenSet = true;
168 m_fixedPrice = value;
169 }
170 inline ReservedInstance& WithFixedPrice(double value) {
171 SetFixedPrice(value);
172 return *this;
173 }
175
177
181 inline double GetUsagePrice() const { return m_usagePrice; }
182 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
183 inline void SetUsagePrice(double value) {
184 m_usagePriceHasBeenSet = true;
185 m_usagePrice = value;
186 }
187 inline ReservedInstance& WithUsagePrice(double value) {
188 SetUsagePrice(value);
189 return *this;
190 }
192
194
197 inline const Aws::String& GetCurrencyCode() const { return m_currencyCode; }
198 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
199 template <typename CurrencyCodeT = Aws::String>
200 void SetCurrencyCode(CurrencyCodeT&& value) {
201 m_currencyCodeHasBeenSet = true;
202 m_currencyCode = std::forward<CurrencyCodeT>(value);
203 }
204 template <typename CurrencyCodeT = Aws::String>
205 ReservedInstance& WithCurrencyCode(CurrencyCodeT&& value) {
206 SetCurrencyCode(std::forward<CurrencyCodeT>(value));
207 return *this;
208 }
210
212
215 inline int GetInstanceCount() const { return m_instanceCount; }
216 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
217 inline void SetInstanceCount(int value) {
218 m_instanceCountHasBeenSet = true;
219 m_instanceCount = value;
220 }
222 SetInstanceCount(value);
223 return *this;
224 }
226
228
231 inline const Aws::String& GetState() const { return m_state; }
232 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
233 template <typename StateT = Aws::String>
234 void SetState(StateT&& value) {
235 m_stateHasBeenSet = true;
236 m_state = std::forward<StateT>(value);
237 }
238 template <typename StateT = Aws::String>
239 ReservedInstance& WithState(StateT&& value) {
240 SetState(std::forward<StateT>(value));
241 return *this;
242 }
244
246
249 inline ReservedInstancePaymentOption GetPaymentOption() const { return m_paymentOption; }
250 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
252 m_paymentOptionHasBeenSet = true;
253 m_paymentOption = value;
254 }
256 SetPaymentOption(value);
257 return *this;
258 }
260
262
266 inline const Aws::Vector<RecurringCharge>& GetRecurringCharges() const { return m_recurringCharges; }
267 inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; }
268 template <typename RecurringChargesT = Aws::Vector<RecurringCharge>>
269 void SetRecurringCharges(RecurringChargesT&& value) {
270 m_recurringChargesHasBeenSet = true;
271 m_recurringCharges = std::forward<RecurringChargesT>(value);
272 }
273 template <typename RecurringChargesT = Aws::Vector<RecurringCharge>>
274 ReservedInstance& WithRecurringCharges(RecurringChargesT&& value) {
275 SetRecurringCharges(std::forward<RecurringChargesT>(value));
276 return *this;
277 }
278 template <typename RecurringChargesT = RecurringCharge>
279 ReservedInstance& AddRecurringCharges(RecurringChargesT&& value) {
280 m_recurringChargesHasBeenSet = true;
281 m_recurringCharges.emplace_back(std::forward<RecurringChargesT>(value));
282 return *this;
283 }
285 private:
286 Aws::String m_reservationName;
287
288 Aws::String m_reservedInstanceId;
289
290 long long m_billingSubscriptionId{0};
291
292 Aws::String m_reservedInstanceOfferingId;
293
295
296 Aws::Utils::DateTime m_startTime{};
297
298 int m_duration{0};
299
300 double m_fixedPrice{0.0};
301
302 double m_usagePrice{0.0};
303
304 Aws::String m_currencyCode;
305
306 int m_instanceCount{0};
307
308 Aws::String m_state;
309
311
312 Aws::Vector<RecurringCharge> m_recurringCharges;
313 bool m_reservationNameHasBeenSet = false;
314 bool m_reservedInstanceIdHasBeenSet = false;
315 bool m_billingSubscriptionIdHasBeenSet = false;
316 bool m_reservedInstanceOfferingIdHasBeenSet = false;
317 bool m_instanceTypeHasBeenSet = false;
318 bool m_startTimeHasBeenSet = false;
319 bool m_durationHasBeenSet = false;
320 bool m_fixedPriceHasBeenSet = false;
321 bool m_usagePriceHasBeenSet = false;
322 bool m_currencyCodeHasBeenSet = false;
323 bool m_instanceCountHasBeenSet = false;
324 bool m_stateHasBeenSet = false;
325 bool m_paymentOptionHasBeenSet = false;
326 bool m_recurringChargesHasBeenSet = false;
327};
328
329} // namespace Model
330} // namespace OpenSearchService
331} // namespace Aws
ReservedInstance & WithReservedInstanceOfferingId(ReservedInstanceOfferingIdT &&value)
ReservedInstance & AddRecurringCharges(RecurringChargesT &&value)
ReservedInstance & WithReservedInstanceId(ReservedInstanceIdT &&value)
ReservedInstance & WithState(StateT &&value)
AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_OPENSEARCHSERVICE_API ReservedInstance & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetInstanceType(OpenSearchPartitionInstanceType value)
AWS_OPENSEARCHSERVICE_API ReservedInstance()=default
ReservedInstance & WithBillingSubscriptionId(long long value)
void SetPaymentOption(ReservedInstancePaymentOption value)
void SetReservedInstanceId(ReservedInstanceIdT &&value)
ReservedInstancePaymentOption GetPaymentOption() const
ReservedInstance & WithInstanceType(OpenSearchPartitionInstanceType value)
ReservedInstance & WithRecurringCharges(RecurringChargesT &&value)
const Aws::String & GetReservedInstanceOfferingId() const
AWS_OPENSEARCHSERVICE_API ReservedInstance(Aws::Utils::Json::JsonView jsonValue)
ReservedInstance & WithStartTime(StartTimeT &&value)
ReservedInstance & WithFixedPrice(double value)
OpenSearchPartitionInstanceType GetInstanceType() const
ReservedInstance & WithCurrencyCode(CurrencyCodeT &&value)
const Aws::Utils::DateTime & GetStartTime() const
const Aws::Vector< RecurringCharge > & GetRecurringCharges() const
ReservedInstance & WithReservationName(ReservationNameT &&value)
ReservedInstance & WithPaymentOption(ReservedInstancePaymentOption value)
void SetRecurringCharges(RecurringChargesT &&value)
void SetReservedInstanceOfferingId(ReservedInstanceOfferingIdT &&value)
void SetReservationName(ReservationNameT &&value)
ReservedInstance & WithUsagePrice(double value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue