AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
HostReservation.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/CurrencyCodeValues.h>
13#include <aws/ec2/model/PaymentOption.h>
14#include <aws/ec2/model/ReservationState.h>
15#include <aws/ec2/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Xml {
22class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace EC2 {
26namespace Model {
27
35 public:
36 AWS_EC2_API HostReservation() = default;
37 AWS_EC2_API HostReservation(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
44
47 inline int GetCount() const { return m_count; }
48 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
49 inline void SetCount(int value) {
50 m_countHasBeenSet = true;
51 m_count = value;
52 }
53 inline HostReservation& WithCount(int value) {
54 SetCount(value);
55 return *this;
56 }
58
60
65 inline CurrencyCodeValues GetCurrencyCode() const { return m_currencyCode; }
66 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
68 m_currencyCodeHasBeenSet = true;
69 m_currencyCode = value;
70 }
72 SetCurrencyCode(value);
73 return *this;
74 }
76
78
82 inline int GetDuration() const { return m_duration; }
83 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
84 inline void SetDuration(int value) {
85 m_durationHasBeenSet = true;
86 m_duration = value;
87 }
88 inline HostReservation& WithDuration(int value) {
89 SetDuration(value);
90 return *this;
91 }
93
95
98 inline const Aws::Utils::DateTime& GetEnd() const { return m_end; }
99 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
100 template <typename EndT = Aws::Utils::DateTime>
101 void SetEnd(EndT&& value) {
102 m_endHasBeenSet = true;
103 m_end = std::forward<EndT>(value);
104 }
105 template <typename EndT = Aws::Utils::DateTime>
106 HostReservation& WithEnd(EndT&& value) {
107 SetEnd(std::forward<EndT>(value));
108 return *this;
109 }
111
113
116 inline const Aws::Vector<Aws::String>& GetHostIdSet() const { return m_hostIdSet; }
117 inline bool HostIdSetHasBeenSet() const { return m_hostIdSetHasBeenSet; }
118 template <typename HostIdSetT = Aws::Vector<Aws::String>>
119 void SetHostIdSet(HostIdSetT&& value) {
120 m_hostIdSetHasBeenSet = true;
121 m_hostIdSet = std::forward<HostIdSetT>(value);
122 }
123 template <typename HostIdSetT = Aws::Vector<Aws::String>>
124 HostReservation& WithHostIdSet(HostIdSetT&& value) {
125 SetHostIdSet(std::forward<HostIdSetT>(value));
126 return *this;
127 }
128 template <typename HostIdSetT = Aws::String>
129 HostReservation& AddHostIdSet(HostIdSetT&& value) {
130 m_hostIdSetHasBeenSet = true;
131 m_hostIdSet.emplace_back(std::forward<HostIdSetT>(value));
132 return *this;
133 }
135
137
140 inline const Aws::String& GetHostReservationId() const { return m_hostReservationId; }
141 inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
142 template <typename HostReservationIdT = Aws::String>
143 void SetHostReservationId(HostReservationIdT&& value) {
144 m_hostReservationIdHasBeenSet = true;
145 m_hostReservationId = std::forward<HostReservationIdT>(value);
146 }
147 template <typename HostReservationIdT = Aws::String>
148 HostReservation& WithHostReservationId(HostReservationIdT&& value) {
149 SetHostReservationId(std::forward<HostReservationIdT>(value));
150 return *this;
151 }
153
155
158 inline const Aws::String& GetHourlyPrice() const { return m_hourlyPrice; }
159 inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
160 template <typename HourlyPriceT = Aws::String>
161 void SetHourlyPrice(HourlyPriceT&& value) {
162 m_hourlyPriceHasBeenSet = true;
163 m_hourlyPrice = std::forward<HourlyPriceT>(value);
164 }
165 template <typename HourlyPriceT = Aws::String>
166 HostReservation& WithHourlyPrice(HourlyPriceT&& value) {
167 SetHourlyPrice(std::forward<HourlyPriceT>(value));
168 return *this;
169 }
171
173
178 inline const Aws::String& GetInstanceFamily() const { return m_instanceFamily; }
179 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
180 template <typename InstanceFamilyT = Aws::String>
181 void SetInstanceFamily(InstanceFamilyT&& value) {
182 m_instanceFamilyHasBeenSet = true;
183 m_instanceFamily = std::forward<InstanceFamilyT>(value);
184 }
185 template <typename InstanceFamilyT = Aws::String>
186 HostReservation& WithInstanceFamily(InstanceFamilyT&& value) {
187 SetInstanceFamily(std::forward<InstanceFamilyT>(value));
188 return *this;
189 }
191
193
197 inline const Aws::String& GetOfferingId() const { return m_offeringId; }
198 inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
199 template <typename OfferingIdT = Aws::String>
200 void SetOfferingId(OfferingIdT&& value) {
201 m_offeringIdHasBeenSet = true;
202 m_offeringId = std::forward<OfferingIdT>(value);
203 }
204 template <typename OfferingIdT = Aws::String>
205 HostReservation& WithOfferingId(OfferingIdT&& value) {
206 SetOfferingId(std::forward<OfferingIdT>(value));
207 return *this;
208 }
210
212
215 inline PaymentOption GetPaymentOption() const { return m_paymentOption; }
216 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
217 inline void SetPaymentOption(PaymentOption value) {
218 m_paymentOptionHasBeenSet = true;
219 m_paymentOption = value;
220 }
222 SetPaymentOption(value);
223 return *this;
224 }
226
228
231 inline const Aws::Utils::DateTime& GetStart() const { return m_start; }
232 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
233 template <typename StartT = Aws::Utils::DateTime>
234 void SetStart(StartT&& value) {
235 m_startHasBeenSet = true;
236 m_start = std::forward<StartT>(value);
237 }
238 template <typename StartT = Aws::Utils::DateTime>
239 HostReservation& WithStart(StartT&& value) {
240 SetStart(std::forward<StartT>(value));
241 return *this;
242 }
244
246
249 inline ReservationState GetState() const { return m_state; }
250 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
251 inline void SetState(ReservationState value) {
252 m_stateHasBeenSet = true;
253 m_state = value;
254 }
256 SetState(value);
257 return *this;
258 }
260
262
265 inline const Aws::String& GetUpfrontPrice() const { return m_upfrontPrice; }
266 inline bool UpfrontPriceHasBeenSet() const { return m_upfrontPriceHasBeenSet; }
267 template <typename UpfrontPriceT = Aws::String>
268 void SetUpfrontPrice(UpfrontPriceT&& value) {
269 m_upfrontPriceHasBeenSet = true;
270 m_upfrontPrice = std::forward<UpfrontPriceT>(value);
271 }
272 template <typename UpfrontPriceT = Aws::String>
273 HostReservation& WithUpfrontPrice(UpfrontPriceT&& value) {
274 SetUpfrontPrice(std::forward<UpfrontPriceT>(value));
275 return *this;
276 }
278
280
283 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
284 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
285 template <typename TagsT = Aws::Vector<Tag>>
286 void SetTags(TagsT&& value) {
287 m_tagsHasBeenSet = true;
288 m_tags = std::forward<TagsT>(value);
289 }
290 template <typename TagsT = Aws::Vector<Tag>>
291 HostReservation& WithTags(TagsT&& value) {
292 SetTags(std::forward<TagsT>(value));
293 return *this;
294 }
295 template <typename TagsT = Tag>
296 HostReservation& AddTags(TagsT&& value) {
297 m_tagsHasBeenSet = true;
298 m_tags.emplace_back(std::forward<TagsT>(value));
299 return *this;
300 }
302 private:
303 int m_count{0};
304
306
307 int m_duration{0};
308
309 Aws::Utils::DateTime m_end{};
310
311 Aws::Vector<Aws::String> m_hostIdSet;
312
313 Aws::String m_hostReservationId;
314
315 Aws::String m_hourlyPrice;
316
317 Aws::String m_instanceFamily;
318
319 Aws::String m_offeringId;
320
321 PaymentOption m_paymentOption{PaymentOption::NOT_SET};
322
323 Aws::Utils::DateTime m_start{};
324
326
327 Aws::String m_upfrontPrice;
328
329 Aws::Vector<Tag> m_tags;
330 bool m_countHasBeenSet = false;
331 bool m_currencyCodeHasBeenSet = false;
332 bool m_durationHasBeenSet = false;
333 bool m_endHasBeenSet = false;
334 bool m_hostIdSetHasBeenSet = false;
335 bool m_hostReservationIdHasBeenSet = false;
336 bool m_hourlyPriceHasBeenSet = false;
337 bool m_instanceFamilyHasBeenSet = false;
338 bool m_offeringIdHasBeenSet = false;
339 bool m_paymentOptionHasBeenSet = false;
340 bool m_startHasBeenSet = false;
341 bool m_stateHasBeenSet = false;
342 bool m_upfrontPriceHasBeenSet = false;
343 bool m_tagsHasBeenSet = false;
344};
345
346} // namespace Model
347} // namespace EC2
348} // namespace Aws
void SetPaymentOption(PaymentOption value)
void SetOfferingId(OfferingIdT &&value)
HostReservation & AddTags(TagsT &&value)
const Aws::Vector< Aws::String > & GetHostIdSet() const
HostReservation & WithTags(TagsT &&value)
const Aws::Utils::DateTime & GetStart() const
AWS_EC2_API HostReservation & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
HostReservation & WithCount(int value)
void SetUpfrontPrice(UpfrontPriceT &&value)
const Aws::String & GetOfferingId() const
const Aws::String & GetUpfrontPrice() const
HostReservation & WithState(ReservationState value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
CurrencyCodeValues GetCurrencyCode() const
HostReservation & WithEnd(EndT &&value)
const Aws::String & GetInstanceFamily() const
void SetState(ReservationState value)
void SetCurrencyCode(CurrencyCodeValues value)
void SetHostReservationId(HostReservationIdT &&value)
HostReservation & AddHostIdSet(HostIdSetT &&value)
HostReservation & WithHostIdSet(HostIdSetT &&value)
HostReservation & WithCurrencyCode(CurrencyCodeValues value)
void SetInstanceFamily(InstanceFamilyT &&value)
AWS_EC2_API HostReservation()=default
HostReservation & WithOfferingId(OfferingIdT &&value)
HostReservation & WithStart(StartT &&value)
const Aws::Vector< Tag > & GetTags() const
HostReservation & WithHostReservationId(HostReservationIdT &&value)
const Aws::String & GetHostReservationId() const
ReservationState GetState() const
const Aws::Utils::DateTime & GetEnd() const
const Aws::String & GetHourlyPrice() const
AWS_EC2_API HostReservation(const Aws::Utils::Xml::XmlNode &xmlNode)
HostReservation & WithDuration(int value)
HostReservation & WithUpfrontPrice(UpfrontPriceT &&value)
void SetHostIdSet(HostIdSetT &&value)
void SetHourlyPrice(HourlyPriceT &&value)
HostReservation & WithInstanceFamily(InstanceFamilyT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
HostReservation & WithPaymentOption(PaymentOption value)
PaymentOption GetPaymentOption() const
HostReservation & WithHourlyPrice(HourlyPriceT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream