AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
ReservedInstanceOffering.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/opensearch/OpenSearchService_EXPORTS.h>
10#include <aws/opensearch/model/OpenSearchPartitionInstanceType.h>
11#include <aws/opensearch/model/RecurringCharge.h>
12#include <aws/opensearch/model/ReservedInstancePaymentOption.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace OpenSearchService {
24namespace Model {
25
33 public:
34 AWS_OPENSEARCHSERVICE_API ReservedInstanceOffering() = default;
35 AWS_OPENSEARCHSERVICE_API ReservedInstanceOffering(Aws::Utils::Json::JsonView jsonValue);
36 AWS_OPENSEARCHSERVICE_API ReservedInstanceOffering& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetReservedInstanceOfferingId() const { return m_reservedInstanceOfferingId; }
44 inline bool ReservedInstanceOfferingIdHasBeenSet() const { return m_reservedInstanceOfferingIdHasBeenSet; }
45 template <typename ReservedInstanceOfferingIdT = Aws::String>
46 void SetReservedInstanceOfferingId(ReservedInstanceOfferingIdT&& value) {
47 m_reservedInstanceOfferingIdHasBeenSet = true;
48 m_reservedInstanceOfferingId = std::forward<ReservedInstanceOfferingIdT>(value);
49 }
50 template <typename ReservedInstanceOfferingIdT = Aws::String>
51 ReservedInstanceOffering& WithReservedInstanceOfferingId(ReservedInstanceOfferingIdT&& value) {
52 SetReservedInstanceOfferingId(std::forward<ReservedInstanceOfferingIdT>(value));
53 return *this;
54 }
56
58
61 inline OpenSearchPartitionInstanceType GetInstanceType() const { return m_instanceType; }
62 inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; }
64 m_instanceTypeHasBeenSet = true;
65 m_instanceType = value;
66 }
68 SetInstanceType(value);
69 return *this;
70 }
72
74
78 inline int GetDuration() const { return m_duration; }
79 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
80 inline void SetDuration(int value) {
81 m_durationHasBeenSet = true;
82 m_duration = value;
83 }
85 SetDuration(value);
86 return *this;
87 }
89
91
95 inline double GetFixedPrice() const { return m_fixedPrice; }
96 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
97 inline void SetFixedPrice(double value) {
98 m_fixedPriceHasBeenSet = true;
99 m_fixedPrice = value;
100 }
102 SetFixedPrice(value);
103 return *this;
104 }
106
108
112 inline double GetUsagePrice() const { return m_usagePrice; }
113 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
114 inline void SetUsagePrice(double value) {
115 m_usagePriceHasBeenSet = true;
116 m_usagePrice = value;
117 }
119 SetUsagePrice(value);
120 return *this;
121 }
123
125
128 inline const Aws::String& GetCurrencyCode() const { return m_currencyCode; }
129 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
130 template <typename CurrencyCodeT = Aws::String>
131 void SetCurrencyCode(CurrencyCodeT&& value) {
132 m_currencyCodeHasBeenSet = true;
133 m_currencyCode = std::forward<CurrencyCodeT>(value);
134 }
135 template <typename CurrencyCodeT = Aws::String>
137 SetCurrencyCode(std::forward<CurrencyCodeT>(value));
138 return *this;
139 }
141
143
146 inline ReservedInstancePaymentOption GetPaymentOption() const { return m_paymentOption; }
147 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
149 m_paymentOptionHasBeenSet = true;
150 m_paymentOption = value;
151 }
153 SetPaymentOption(value);
154 return *this;
155 }
157
159
163 inline const Aws::Vector<RecurringCharge>& GetRecurringCharges() const { return m_recurringCharges; }
164 inline bool RecurringChargesHasBeenSet() const { return m_recurringChargesHasBeenSet; }
165 template <typename RecurringChargesT = Aws::Vector<RecurringCharge>>
166 void SetRecurringCharges(RecurringChargesT&& value) {
167 m_recurringChargesHasBeenSet = true;
168 m_recurringCharges = std::forward<RecurringChargesT>(value);
169 }
170 template <typename RecurringChargesT = Aws::Vector<RecurringCharge>>
171 ReservedInstanceOffering& WithRecurringCharges(RecurringChargesT&& value) {
172 SetRecurringCharges(std::forward<RecurringChargesT>(value));
173 return *this;
174 }
175 template <typename RecurringChargesT = RecurringCharge>
176 ReservedInstanceOffering& AddRecurringCharges(RecurringChargesT&& value) {
177 m_recurringChargesHasBeenSet = true;
178 m_recurringCharges.emplace_back(std::forward<RecurringChargesT>(value));
179 return *this;
180 }
182 private:
183 Aws::String m_reservedInstanceOfferingId;
184
186
187 int m_duration{0};
188
189 double m_fixedPrice{0.0};
190
191 double m_usagePrice{0.0};
192
193 Aws::String m_currencyCode;
194
196
197 Aws::Vector<RecurringCharge> m_recurringCharges;
198 bool m_reservedInstanceOfferingIdHasBeenSet = false;
199 bool m_instanceTypeHasBeenSet = false;
200 bool m_durationHasBeenSet = false;
201 bool m_fixedPriceHasBeenSet = false;
202 bool m_usagePriceHasBeenSet = false;
203 bool m_currencyCodeHasBeenSet = false;
204 bool m_paymentOptionHasBeenSet = false;
205 bool m_recurringChargesHasBeenSet = false;
206};
207
208} // namespace Model
209} // namespace OpenSearchService
210} // namespace Aws
AWS_OPENSEARCHSERVICE_API ReservedInstanceOffering()=default
AWS_OPENSEARCHSERVICE_API ReservedInstanceOffering(Aws::Utils::Json::JsonView jsonValue)
ReservedInstanceOffering & WithCurrencyCode(CurrencyCodeT &&value)
void SetPaymentOption(ReservedInstancePaymentOption value)
ReservedInstanceOffering & WithPaymentOption(ReservedInstancePaymentOption value)
AWS_OPENSEARCHSERVICE_API Aws::Utils::Json::JsonValue Jsonize() const
ReservedInstanceOffering & WithRecurringCharges(RecurringChargesT &&value)
void SetInstanceType(OpenSearchPartitionInstanceType value)
ReservedInstanceOffering & WithInstanceType(OpenSearchPartitionInstanceType value)
ReservedInstanceOffering & WithReservedInstanceOfferingId(ReservedInstanceOfferingIdT &&value)
const Aws::Vector< RecurringCharge > & GetRecurringCharges() const
ReservedInstanceOffering & AddRecurringCharges(RecurringChargesT &&value)
void SetReservedInstanceOfferingId(ReservedInstanceOfferingIdT &&value)
AWS_OPENSEARCHSERVICE_API ReservedInstanceOffering & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue