AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ReservedInstance.h
1
6#pragma once
7#include <aws/opensearch/OpenSearchService_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/opensearch/model/OpenSearchPartitionInstanceType.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/opensearch/model/ReservedInstancePaymentOption.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/opensearch/model/RecurringCharge.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace OpenSearchService
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_OPENSEARCHSERVICE_API ReservedInstance() = default;
40 AWS_OPENSEARCHSERVICE_API ReservedInstance(Aws::Utils::Json::JsonView jsonValue);
41 AWS_OPENSEARCHSERVICE_API ReservedInstance& operator=(Aws::Utils::Json::JsonView jsonValue);
42 AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
49 inline const Aws::String& GetReservationName() const { return m_reservationName; }
50 inline bool ReservationNameHasBeenSet() const { return m_reservationNameHasBeenSet; }
51 template<typename ReservationNameT = Aws::String>
52 void SetReservationName(ReservationNameT&& value) { m_reservationNameHasBeenSet = true; m_reservationName = std::forward<ReservationNameT>(value); }
53 template<typename ReservationNameT = Aws::String>
54 ReservedInstance& WithReservationName(ReservationNameT&& value) { SetReservationName(std::forward<ReservationNameT>(value)); return *this;}
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) { m_reservedInstanceIdHasBeenSet = true; m_reservedInstanceId = std::forward<ReservedInstanceIdT>(value); }
65 template<typename ReservedInstanceIdT = Aws::String>
66 ReservedInstance& WithReservedInstanceId(ReservedInstanceIdT&& value) { SetReservedInstanceId(std::forward<ReservedInstanceIdT>(value)); return *this;}
68
70
73 inline long long GetBillingSubscriptionId() const { return m_billingSubscriptionId; }
74 inline bool BillingSubscriptionIdHasBeenSet() const { return m_billingSubscriptionIdHasBeenSet; }
75 inline void SetBillingSubscriptionId(long long value) { m_billingSubscriptionIdHasBeenSet = true; m_billingSubscriptionId = value; }
76 inline ReservedInstance& WithBillingSubscriptionId(long long value) { SetBillingSubscriptionId(value); return *this;}
78
80
83 inline const Aws::String& GetReservedInstanceOfferingId() const { return m_reservedInstanceOfferingId; }
84 inline bool ReservedInstanceOfferingIdHasBeenSet() const { return m_reservedInstanceOfferingIdHasBeenSet; }
85 template<typename ReservedInstanceOfferingIdT = Aws::String>
86 void SetReservedInstanceOfferingId(ReservedInstanceOfferingIdT&& value) { m_reservedInstanceOfferingIdHasBeenSet = true; m_reservedInstanceOfferingId = std::forward<ReservedInstanceOfferingIdT>(value); }
87 template<typename ReservedInstanceOfferingIdT = Aws::String>
88 ReservedInstance& WithReservedInstanceOfferingId(ReservedInstanceOfferingIdT&& value) { SetReservedInstanceOfferingId(std::forward<ReservedInstanceOfferingIdT>(value)); return *this;}
90
92
95 inline OpenSearchPartitionInstanceType GetInstanceType() const { return m_instanceType; }
96 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
97 inline void SetInstanceType(OpenSearchPartitionInstanceType value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
100
102
105 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
106 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
107 template<typename StartTimeT = Aws::Utils::DateTime>
108 void SetStartTime(StartTimeT&& value) { m_startTimeHasBeenSet = true; m_startTime = std::forward<StartTimeT>(value); }
109 template<typename StartTimeT = Aws::Utils::DateTime>
110 ReservedInstance& WithStartTime(StartTimeT&& value) { SetStartTime(std::forward<StartTimeT>(value)); return *this;}
112
114
117 inline int GetDuration() const { return m_duration; }
118 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
119 inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
120 inline ReservedInstance& WithDuration(int value) { SetDuration(value); return *this;}
122
124
128 inline double GetFixedPrice() const { return m_fixedPrice; }
129 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
130 inline void SetFixedPrice(double value) { m_fixedPriceHasBeenSet = true; m_fixedPrice = value; }
131 inline ReservedInstance& WithFixedPrice(double value) { SetFixedPrice(value); return *this;}
133
135
139 inline double GetUsagePrice() const { return m_usagePrice; }
140 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
141 inline void SetUsagePrice(double value) { m_usagePriceHasBeenSet = true; m_usagePrice = value; }
142 inline ReservedInstance& WithUsagePrice(double value) { SetUsagePrice(value); return *this;}
144
146
149 inline const Aws::String& GetCurrencyCode() const { return m_currencyCode; }
150 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
151 template<typename CurrencyCodeT = Aws::String>
152 void SetCurrencyCode(CurrencyCodeT&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::forward<CurrencyCodeT>(value); }
153 template<typename CurrencyCodeT = Aws::String>
154 ReservedInstance& WithCurrencyCode(CurrencyCodeT&& value) { SetCurrencyCode(std::forward<CurrencyCodeT>(value)); return *this;}
156
158
161 inline int GetInstanceCount() const { return m_instanceCount; }
162 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
163 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
164 inline ReservedInstance& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
166
168
171 inline const Aws::String& GetState() const { return m_state; }
172 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
173 template<typename StateT = Aws::String>
174 void SetState(StateT&& value) { m_stateHasBeenSet = true; m_state = std::forward<StateT>(value); }
175 template<typename StateT = Aws::String>
176 ReservedInstance& WithState(StateT&& value) { SetState(std::forward<StateT>(value)); return *this;}
178
180
183 inline ReservedInstancePaymentOption GetPaymentOption() const { return m_paymentOption; }
184 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
185 inline void SetPaymentOption(ReservedInstancePaymentOption value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
188
190
194 inline const Aws::Vector<RecurringCharge>& GetRecurringCharges() const { return m_recurringCharges; }
195 inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; }
196 template<typename RecurringChargesT = Aws::Vector<RecurringCharge>>
197 void SetRecurringCharges(RecurringChargesT&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = std::forward<RecurringChargesT>(value); }
198 template<typename RecurringChargesT = Aws::Vector<RecurringCharge>>
199 ReservedInstance& WithRecurringCharges(RecurringChargesT&& value) { SetRecurringCharges(std::forward<RecurringChargesT>(value)); return *this;}
200 template<typename RecurringChargesT = RecurringCharge>
201 ReservedInstance& AddRecurringCharges(RecurringChargesT&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.emplace_back(std::forward<RecurringChargesT>(value)); return *this; }
203 private:
204
205 Aws::String m_reservationName;
206 bool m_reservationNameHasBeenSet = false;
207
208 Aws::String m_reservedInstanceId;
209 bool m_reservedInstanceIdHasBeenSet = false;
210
211 long long m_billingSubscriptionId{0};
212 bool m_billingSubscriptionIdHasBeenSet = false;
213
214 Aws::String m_reservedInstanceOfferingId;
215 bool m_reservedInstanceOfferingIdHasBeenSet = false;
216
218 bool m_instanceTypeHasBeenSet = false;
219
220 Aws::Utils::DateTime m_startTime{};
221 bool m_startTimeHasBeenSet = false;
222
223 int m_duration{0};
224 bool m_durationHasBeenSet = false;
225
226 double m_fixedPrice{0.0};
227 bool m_fixedPriceHasBeenSet = false;
228
229 double m_usagePrice{0.0};
230 bool m_usagePriceHasBeenSet = false;
231
232 Aws::String m_currencyCode;
233 bool m_currencyCodeHasBeenSet = false;
234
235 int m_instanceCount{0};
236 bool m_instanceCountHasBeenSet = false;
237
238 Aws::String m_state;
239 bool m_stateHasBeenSet = false;
240
242 bool m_paymentOptionHasBeenSet = false;
243
244 Aws::Vector<RecurringCharge> m_recurringCharges;
245 bool m_recurringChargesHasBeenSet = false;
246 };
247
248} // namespace Model
249} // namespace OpenSearchService
250} // 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