AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetReservationName(const Aws::String& value) { m_reservationNameHasBeenSet = true; m_reservationName = value; }
52 inline void SetReservationName(Aws::String&& value) { m_reservationNameHasBeenSet = true; m_reservationName = std::move(value); }
53 inline void SetReservationName(const char* value) { m_reservationNameHasBeenSet = true; m_reservationName.assign(value); }
54 inline ReservedInstance& WithReservationName(const Aws::String& value) { SetReservationName(value); return *this;}
55 inline ReservedInstance& WithReservationName(Aws::String&& value) { SetReservationName(std::move(value)); return *this;}
56 inline ReservedInstance& WithReservationName(const char* value) { SetReservationName(value); return *this;}
58
60
63 inline const Aws::String& GetReservedInstanceId() const{ return m_reservedInstanceId; }
64 inline bool ReservedInstanceIdHasBeenSet() const { return m_reservedInstanceIdHasBeenSet; }
65 inline void SetReservedInstanceId(const Aws::String& value) { m_reservedInstanceIdHasBeenSet = true; m_reservedInstanceId = value; }
66 inline void SetReservedInstanceId(Aws::String&& value) { m_reservedInstanceIdHasBeenSet = true; m_reservedInstanceId = std::move(value); }
67 inline void SetReservedInstanceId(const char* value) { m_reservedInstanceIdHasBeenSet = true; m_reservedInstanceId.assign(value); }
68 inline ReservedInstance& WithReservedInstanceId(const Aws::String& value) { SetReservedInstanceId(value); return *this;}
69 inline ReservedInstance& WithReservedInstanceId(Aws::String&& value) { SetReservedInstanceId(std::move(value)); return *this;}
70 inline ReservedInstance& WithReservedInstanceId(const char* value) { SetReservedInstanceId(value); return *this;}
72
74
77 inline long long GetBillingSubscriptionId() const{ return m_billingSubscriptionId; }
78 inline bool BillingSubscriptionIdHasBeenSet() const { return m_billingSubscriptionIdHasBeenSet; }
79 inline void SetBillingSubscriptionId(long long value) { m_billingSubscriptionIdHasBeenSet = true; m_billingSubscriptionId = value; }
80 inline ReservedInstance& WithBillingSubscriptionId(long long value) { SetBillingSubscriptionId(value); return *this;}
82
84
87 inline const Aws::String& GetReservedInstanceOfferingId() const{ return m_reservedInstanceOfferingId; }
88 inline bool ReservedInstanceOfferingIdHasBeenSet() const { return m_reservedInstanceOfferingIdHasBeenSet; }
89 inline void SetReservedInstanceOfferingId(const Aws::String& value) { m_reservedInstanceOfferingIdHasBeenSet = true; m_reservedInstanceOfferingId = value; }
90 inline void SetReservedInstanceOfferingId(Aws::String&& value) { m_reservedInstanceOfferingIdHasBeenSet = true; m_reservedInstanceOfferingId = std::move(value); }
91 inline void SetReservedInstanceOfferingId(const char* value) { m_reservedInstanceOfferingIdHasBeenSet = true; m_reservedInstanceOfferingId.assign(value); }
94 inline ReservedInstance& WithReservedInstanceOfferingId(const char* value) { SetReservedInstanceOfferingId(value); return *this;}
96
98
101 inline const OpenSearchPartitionInstanceType& GetInstanceType() const{ return m_instanceType; }
102 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
103 inline void SetInstanceType(const OpenSearchPartitionInstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; }
104 inline void SetInstanceType(OpenSearchPartitionInstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); }
106 inline ReservedInstance& WithInstanceType(OpenSearchPartitionInstanceType&& value) { SetInstanceType(std::move(value)); return *this;}
108
110
113 inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; }
114 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
115 inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; }
116 inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); }
117 inline ReservedInstance& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;}
118 inline ReservedInstance& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;}
120
122
125 inline int GetDuration() const{ return m_duration; }
126 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
127 inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
128 inline ReservedInstance& WithDuration(int value) { SetDuration(value); return *this;}
130
132
136 inline double GetFixedPrice() const{ return m_fixedPrice; }
137 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
138 inline void SetFixedPrice(double value) { m_fixedPriceHasBeenSet = true; m_fixedPrice = value; }
139 inline ReservedInstance& WithFixedPrice(double value) { SetFixedPrice(value); return *this;}
141
143
147 inline double GetUsagePrice() const{ return m_usagePrice; }
148 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
149 inline void SetUsagePrice(double value) { m_usagePriceHasBeenSet = true; m_usagePrice = value; }
150 inline ReservedInstance& WithUsagePrice(double value) { SetUsagePrice(value); return *this;}
152
154
157 inline const Aws::String& GetCurrencyCode() const{ return m_currencyCode; }
158 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
159 inline void SetCurrencyCode(const Aws::String& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
160 inline void SetCurrencyCode(Aws::String&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); }
161 inline void SetCurrencyCode(const char* value) { m_currencyCodeHasBeenSet = true; m_currencyCode.assign(value); }
162 inline ReservedInstance& WithCurrencyCode(const Aws::String& value) { SetCurrencyCode(value); return *this;}
163 inline ReservedInstance& WithCurrencyCode(Aws::String&& value) { SetCurrencyCode(std::move(value)); return *this;}
164 inline ReservedInstance& WithCurrencyCode(const char* value) { SetCurrencyCode(value); return *this;}
166
168
171 inline int GetInstanceCount() const{ return m_instanceCount; }
172 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
173 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
174 inline ReservedInstance& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
176
178
181 inline const Aws::String& GetState() const{ return m_state; }
182 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
183 inline void SetState(const Aws::String& value) { m_stateHasBeenSet = true; m_state = value; }
184 inline void SetState(Aws::String&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
185 inline void SetState(const char* value) { m_stateHasBeenSet = true; m_state.assign(value); }
186 inline ReservedInstance& WithState(const Aws::String& value) { SetState(value); return *this;}
187 inline ReservedInstance& WithState(Aws::String&& value) { SetState(std::move(value)); return *this;}
188 inline ReservedInstance& WithState(const char* value) { SetState(value); return *this;}
190
192
195 inline const ReservedInstancePaymentOption& GetPaymentOption() const{ return m_paymentOption; }
196 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
197 inline void SetPaymentOption(const ReservedInstancePaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
198 inline void SetPaymentOption(ReservedInstancePaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); }
200 inline ReservedInstance& WithPaymentOption(ReservedInstancePaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;}
202
204
208 inline const Aws::Vector<RecurringCharge>& GetRecurringCharges() const{ return m_recurringCharges; }
209 inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; }
210 inline void SetRecurringCharges(const Aws::Vector<RecurringCharge>& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = value; }
211 inline void SetRecurringCharges(Aws::Vector<RecurringCharge>&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges = std::move(value); }
214 inline ReservedInstance& AddRecurringCharges(const RecurringCharge& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.push_back(value); return *this; }
215 inline ReservedInstance& AddRecurringCharges(RecurringCharge&& value) { m_recurringChargesHasBeenSet = true; m_recurringCharges.push_back(std::move(value)); return *this; }
217 private:
218
219 Aws::String m_reservationName;
220 bool m_reservationNameHasBeenSet = false;
221
222 Aws::String m_reservedInstanceId;
223 bool m_reservedInstanceIdHasBeenSet = false;
224
225 long long m_billingSubscriptionId;
226 bool m_billingSubscriptionIdHasBeenSet = false;
227
228 Aws::String m_reservedInstanceOfferingId;
229 bool m_reservedInstanceOfferingIdHasBeenSet = false;
230
231 OpenSearchPartitionInstanceType m_instanceType;
232 bool m_instanceTypeHasBeenSet = false;
233
234 Aws::Utils::DateTime m_startTime;
235 bool m_startTimeHasBeenSet = false;
236
237 int m_duration;
238 bool m_durationHasBeenSet = false;
239
240 double m_fixedPrice;
241 bool m_fixedPriceHasBeenSet = false;
242
243 double m_usagePrice;
244 bool m_usagePriceHasBeenSet = false;
245
246 Aws::String m_currencyCode;
247 bool m_currencyCodeHasBeenSet = false;
248
249 int m_instanceCount;
250 bool m_instanceCountHasBeenSet = false;
251
252 Aws::String m_state;
253 bool m_stateHasBeenSet = false;
254
255 ReservedInstancePaymentOption m_paymentOption;
256 bool m_paymentOptionHasBeenSet = false;
257
258 Aws::Vector<RecurringCharge> m_recurringCharges;
259 bool m_recurringChargesHasBeenSet = false;
260 };
261
262} // namespace Model
263} // namespace OpenSearchService
264} // namespace Aws
ReservedInstance & WithPaymentOption(ReservedInstancePaymentOption &&value)
ReservedInstance & WithReservationName(Aws::String &&value)
void SetReservedInstanceOfferingId(Aws::String &&value)
ReservedInstance & WithCurrencyCode(Aws::String &&value)
ReservedInstance & WithRecurringCharges(const Aws::Vector< RecurringCharge > &value)
AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
ReservedInstance & WithInstanceType(const OpenSearchPartitionInstanceType &value)
AWS_OPENSEARCHSERVICE_API ReservedInstance & operator=(Aws::Utils::Json::JsonView jsonValue)
ReservedInstance & WithBillingSubscriptionId(long long value)
ReservedInstance & WithState(const Aws::String &value)
ReservedInstance & WithReservedInstanceOfferingId(const char *value)
ReservedInstance & WithReservedInstanceOfferingId(Aws::String &&value)
ReservedInstance & WithStartTime(Aws::Utils::DateTime &&value)
const Aws::String & GetReservedInstanceOfferingId() const
void SetReservationName(const Aws::String &value)
ReservedInstance & WithState(Aws::String &&value)
AWS_OPENSEARCHSERVICE_API ReservedInstance(Aws::Utils::Json::JsonView jsonValue)
ReservedInstance & WithReservedInstanceOfferingId(const Aws::String &value)
ReservedInstance & WithReservationName(const char *value)
ReservedInstance & WithFixedPrice(double value)
ReservedInstance & WithReservedInstanceId(Aws::String &&value)
void SetRecurringCharges(const Aws::Vector< RecurringCharge > &value)
const OpenSearchPartitionInstanceType & GetInstanceType() const
ReservedInstance & WithRecurringCharges(Aws::Vector< RecurringCharge > &&value)
AWS_OPENSEARCHSERVICE_API ReservedInstance()
void SetStartTime(Aws::Utils::DateTime &&value)
ReservedInstance & WithReservationName(const Aws::String &value)
void SetPaymentOption(ReservedInstancePaymentOption &&value)
const Aws::Utils::DateTime & GetStartTime() const
void SetStartTime(const Aws::Utils::DateTime &value)
void SetReservedInstanceId(const Aws::String &value)
const Aws::Vector< RecurringCharge > & GetRecurringCharges() const
ReservedInstance & WithCurrencyCode(const char *value)
void SetInstanceType(const OpenSearchPartitionInstanceType &value)
ReservedInstance & AddRecurringCharges(RecurringCharge &&value)
ReservedInstance & WithState(const char *value)
ReservedInstance & WithReservedInstanceId(const char *value)
void SetInstanceType(OpenSearchPartitionInstanceType &&value)
ReservedInstance & WithUsagePrice(double value)
ReservedInstance & WithPaymentOption(const ReservedInstancePaymentOption &value)
void SetReservedInstanceOfferingId(const Aws::String &value)
const ReservedInstancePaymentOption & GetPaymentOption() const
ReservedInstance & AddRecurringCharges(const RecurringCharge &value)
void SetRecurringCharges(Aws::Vector< RecurringCharge > &&value)
ReservedInstance & WithCurrencyCode(const Aws::String &value)
ReservedInstance & WithReservedInstanceId(const Aws::String &value)
ReservedInstance & WithInstanceType(OpenSearchPartitionInstanceType &&value)
ReservedInstance & WithStartTime(const Aws::Utils::DateTime &value)
void SetPaymentOption(const ReservedInstancePaymentOption &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