AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
HostReservation.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/ec2/model/CurrencyCodeValues.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/ec2/model/PaymentOption.h>
14#include <aws/ec2/model/ReservationState.h>
15#include <aws/ec2/model/Tag.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Xml
23{
24 class XmlNode;
25} // namespace Xml
26} // namespace Utils
27namespace EC2
28{
29namespace Model
30{
31
39 {
40 public:
41 AWS_EC2_API HostReservation();
42 AWS_EC2_API HostReservation(const Aws::Utils::Xml::XmlNode& xmlNode);
44
45 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
47
48
50
53 inline int GetCount() const{ return m_count; }
54 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
55 inline void SetCount(int value) { m_countHasBeenSet = true; m_count = value; }
56 inline HostReservation& WithCount(int value) { SetCount(value); return *this;}
58
60
65 inline const CurrencyCodeValues& GetCurrencyCode() const{ return m_currencyCode; }
66 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
67 inline void SetCurrencyCode(const CurrencyCodeValues& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
68 inline void SetCurrencyCode(CurrencyCodeValues&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); }
69 inline HostReservation& WithCurrencyCode(const CurrencyCodeValues& value) { SetCurrencyCode(value); return *this;}
70 inline HostReservation& WithCurrencyCode(CurrencyCodeValues&& value) { SetCurrencyCode(std::move(value)); return *this;}
72
74
78 inline int GetDuration() const{ return m_duration; }
79 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
80 inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
81 inline HostReservation& WithDuration(int value) { SetDuration(value); return *this;}
83
85
88 inline const Aws::Utils::DateTime& GetEnd() const{ return m_end; }
89 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
90 inline void SetEnd(const Aws::Utils::DateTime& value) { m_endHasBeenSet = true; m_end = value; }
91 inline void SetEnd(Aws::Utils::DateTime&& value) { m_endHasBeenSet = true; m_end = std::move(value); }
92 inline HostReservation& WithEnd(const Aws::Utils::DateTime& value) { SetEnd(value); return *this;}
93 inline HostReservation& WithEnd(Aws::Utils::DateTime&& value) { SetEnd(std::move(value)); return *this;}
95
97
100 inline const Aws::Vector<Aws::String>& GetHostIdSet() const{ return m_hostIdSet; }
101 inline bool HostIdSetHasBeenSet() const { return m_hostIdSetHasBeenSet; }
102 inline void SetHostIdSet(const Aws::Vector<Aws::String>& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = value; }
103 inline void SetHostIdSet(Aws::Vector<Aws::String>&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = std::move(value); }
104 inline HostReservation& WithHostIdSet(const Aws::Vector<Aws::String>& value) { SetHostIdSet(value); return *this;}
105 inline HostReservation& WithHostIdSet(Aws::Vector<Aws::String>&& value) { SetHostIdSet(std::move(value)); return *this;}
106 inline HostReservation& AddHostIdSet(const Aws::String& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(value); return *this; }
107 inline HostReservation& AddHostIdSet(Aws::String&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(std::move(value)); return *this; }
108 inline HostReservation& AddHostIdSet(const char* value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(value); return *this; }
110
112
115 inline const Aws::String& GetHostReservationId() const{ return m_hostReservationId; }
116 inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
117 inline void SetHostReservationId(const Aws::String& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = value; }
118 inline void SetHostReservationId(Aws::String&& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = std::move(value); }
119 inline void SetHostReservationId(const char* value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId.assign(value); }
120 inline HostReservation& WithHostReservationId(const Aws::String& value) { SetHostReservationId(value); return *this;}
121 inline HostReservation& WithHostReservationId(Aws::String&& value) { SetHostReservationId(std::move(value)); return *this;}
122 inline HostReservation& WithHostReservationId(const char* value) { SetHostReservationId(value); return *this;}
124
126
129 inline const Aws::String& GetHourlyPrice() const{ return m_hourlyPrice; }
130 inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
131 inline void SetHourlyPrice(const Aws::String& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = value; }
132 inline void SetHourlyPrice(Aws::String&& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = std::move(value); }
133 inline void SetHourlyPrice(const char* value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice.assign(value); }
134 inline HostReservation& WithHourlyPrice(const Aws::String& value) { SetHourlyPrice(value); return *this;}
135 inline HostReservation& WithHourlyPrice(Aws::String&& value) { SetHourlyPrice(std::move(value)); return *this;}
136 inline HostReservation& WithHourlyPrice(const char* value) { SetHourlyPrice(value); return *this;}
138
140
145 inline const Aws::String& GetInstanceFamily() const{ return m_instanceFamily; }
146 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
147 inline void SetInstanceFamily(const Aws::String& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = value; }
148 inline void SetInstanceFamily(Aws::String&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::move(value); }
149 inline void SetInstanceFamily(const char* value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily.assign(value); }
150 inline HostReservation& WithInstanceFamily(const Aws::String& value) { SetInstanceFamily(value); return *this;}
151 inline HostReservation& WithInstanceFamily(Aws::String&& value) { SetInstanceFamily(std::move(value)); return *this;}
152 inline HostReservation& WithInstanceFamily(const char* value) { SetInstanceFamily(value); return *this;}
154
156
160 inline const Aws::String& GetOfferingId() const{ return m_offeringId; }
161 inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
162 inline void SetOfferingId(const Aws::String& value) { m_offeringIdHasBeenSet = true; m_offeringId = value; }
163 inline void SetOfferingId(Aws::String&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::move(value); }
164 inline void SetOfferingId(const char* value) { m_offeringIdHasBeenSet = true; m_offeringId.assign(value); }
165 inline HostReservation& WithOfferingId(const Aws::String& value) { SetOfferingId(value); return *this;}
166 inline HostReservation& WithOfferingId(Aws::String&& value) { SetOfferingId(std::move(value)); return *this;}
167 inline HostReservation& WithOfferingId(const char* value) { SetOfferingId(value); return *this;}
169
171
174 inline const PaymentOption& GetPaymentOption() const{ return m_paymentOption; }
175 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
176 inline void SetPaymentOption(const PaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
177 inline void SetPaymentOption(PaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); }
178 inline HostReservation& WithPaymentOption(const PaymentOption& value) { SetPaymentOption(value); return *this;}
179 inline HostReservation& WithPaymentOption(PaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;}
181
183
186 inline const Aws::Utils::DateTime& GetStart() const{ return m_start; }
187 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
188 inline void SetStart(const Aws::Utils::DateTime& value) { m_startHasBeenSet = true; m_start = value; }
189 inline void SetStart(Aws::Utils::DateTime&& value) { m_startHasBeenSet = true; m_start = std::move(value); }
190 inline HostReservation& WithStart(const Aws::Utils::DateTime& value) { SetStart(value); return *this;}
191 inline HostReservation& WithStart(Aws::Utils::DateTime&& value) { SetStart(std::move(value)); return *this;}
193
195
198 inline const ReservationState& GetState() const{ return m_state; }
199 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
200 inline void SetState(const ReservationState& value) { m_stateHasBeenSet = true; m_state = value; }
201 inline void SetState(ReservationState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
202 inline HostReservation& WithState(const ReservationState& value) { SetState(value); return *this;}
203 inline HostReservation& WithState(ReservationState&& value) { SetState(std::move(value)); return *this;}
205
207
210 inline const Aws::String& GetUpfrontPrice() const{ return m_upfrontPrice; }
211 inline bool UpfrontPriceHasBeenSet() const { return m_upfrontPriceHasBeenSet; }
212 inline void SetUpfrontPrice(const Aws::String& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = value; }
213 inline void SetUpfrontPrice(Aws::String&& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = std::move(value); }
214 inline void SetUpfrontPrice(const char* value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice.assign(value); }
215 inline HostReservation& WithUpfrontPrice(const Aws::String& value) { SetUpfrontPrice(value); return *this;}
216 inline HostReservation& WithUpfrontPrice(Aws::String&& value) { SetUpfrontPrice(std::move(value)); return *this;}
217 inline HostReservation& WithUpfrontPrice(const char* value) { SetUpfrontPrice(value); return *this;}
219
221
224 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
225 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
226 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
227 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
228 inline HostReservation& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
229 inline HostReservation& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
230 inline HostReservation& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
231 inline HostReservation& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
233 private:
234
235 int m_count;
236 bool m_countHasBeenSet = false;
237
238 CurrencyCodeValues m_currencyCode;
239 bool m_currencyCodeHasBeenSet = false;
240
241 int m_duration;
242 bool m_durationHasBeenSet = false;
243
245 bool m_endHasBeenSet = false;
246
247 Aws::Vector<Aws::String> m_hostIdSet;
248 bool m_hostIdSetHasBeenSet = false;
249
250 Aws::String m_hostReservationId;
251 bool m_hostReservationIdHasBeenSet = false;
252
253 Aws::String m_hourlyPrice;
254 bool m_hourlyPriceHasBeenSet = false;
255
256 Aws::String m_instanceFamily;
257 bool m_instanceFamilyHasBeenSet = false;
258
259 Aws::String m_offeringId;
260 bool m_offeringIdHasBeenSet = false;
261
262 PaymentOption m_paymentOption;
263 bool m_paymentOptionHasBeenSet = false;
264
265 Aws::Utils::DateTime m_start;
266 bool m_startHasBeenSet = false;
267
268 ReservationState m_state;
269 bool m_stateHasBeenSet = false;
270
271 Aws::String m_upfrontPrice;
272 bool m_upfrontPriceHasBeenSet = false;
273
274 Aws::Vector<Tag> m_tags;
275 bool m_tagsHasBeenSet = false;
276 };
277
278} // namespace Model
279} // namespace EC2
280} // namespace Aws
HostReservation & WithHostReservationId(const Aws::String &value)
HostReservation & WithHostIdSet(Aws::Vector< Aws::String > &&value)
HostReservation & WithOfferingId(const Aws::String &value)
const Aws::Vector< Aws::String > & GetHostIdSet() const
HostReservation & WithHostIdSet(const Aws::Vector< Aws::String > &value)
void SetUpfrontPrice(Aws::String &&value)
void SetInstanceFamily(Aws::String &&value)
HostReservation & WithPaymentOption(PaymentOption &&value)
HostReservation & WithEnd(Aws::Utils::DateTime &&value)
void SetHostIdSet(Aws::Vector< Aws::String > &&value)
HostReservation & WithHourlyPrice(const Aws::String &value)
void SetHourlyPrice(const Aws::String &value)
const Aws::Utils::DateTime & GetStart() const
AWS_EC2_API HostReservation & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetStart(Aws::Utils::DateTime &&value)
HostReservation & WithCount(int value)
HostReservation & WithEnd(const Aws::Utils::DateTime &value)
HostReservation & WithCurrencyCode(const CurrencyCodeValues &value)
const PaymentOption & GetPaymentOption() const
void SetState(ReservationState &&value)
const Aws::String & GetOfferingId() const
HostReservation & AddTags(Tag &&value)
const Aws::String & GetUpfrontPrice() const
HostReservation & WithUpfrontPrice(const char *value)
HostReservation & AddHostIdSet(const char *value)
void SetOfferingId(const Aws::String &value)
void SetInstanceFamily(const char *value)
void SetHourlyPrice(const char *value)
void SetEnd(Aws::Utils::DateTime &&value)
void SetInstanceFamily(const Aws::String &value)
void SetEnd(const Aws::Utils::DateTime &value)
HostReservation & WithCurrencyCode(CurrencyCodeValues &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetUpfrontPrice(const char *value)
const Aws::String & GetInstanceFamily() const
HostReservation & WithHostReservationId(const char *value)
void SetUpfrontPrice(const Aws::String &value)
HostReservation & WithOfferingId(const char *value)
void SetOfferingId(Aws::String &&value)
HostReservation & WithInstanceFamily(Aws::String &&value)
void SetStart(const Aws::Utils::DateTime &value)
void SetHostIdSet(const Aws::Vector< Aws::String > &value)
HostReservation & AddTags(const Tag &value)
void SetCurrencyCode(const CurrencyCodeValues &value)
HostReservation & WithOfferingId(Aws::String &&value)
HostReservation & WithState(ReservationState &&value)
HostReservation & WithStart(Aws::Utils::DateTime &&value)
HostReservation & WithHourlyPrice(Aws::String &&value)
HostReservation & WithState(const ReservationState &value)
const Aws::Vector< Tag > & GetTags() const
HostReservation & WithStart(const Aws::Utils::DateTime &value)
void SetHostReservationId(const char *value)
HostReservation & AddHostIdSet(const Aws::String &value)
HostReservation & WithInstanceFamily(const char *value)
void SetTags(Aws::Vector< Tag > &&value)
void SetHourlyPrice(Aws::String &&value)
const Aws::String & GetHostReservationId() const
HostReservation & WithPaymentOption(const PaymentOption &value)
HostReservation & WithUpfrontPrice(const Aws::String &value)
HostReservation & AddHostIdSet(Aws::String &&value)
void SetPaymentOption(PaymentOption &&value)
void SetTags(const Aws::Vector< Tag > &value)
HostReservation & WithHostReservationId(Aws::String &&value)
const Aws::Utils::DateTime & GetEnd() const
void SetState(const ReservationState &value)
const Aws::String & GetHourlyPrice() const
void SetOfferingId(const char *value)
HostReservation & WithTags(const Aws::Vector< Tag > &value)
AWS_EC2_API HostReservation(const Aws::Utils::Xml::XmlNode &xmlNode)
HostReservation & WithUpfrontPrice(Aws::String &&value)
const CurrencyCodeValues & GetCurrencyCode() const
void SetHostReservationId(const Aws::String &value)
const ReservationState & GetState() const
HostReservation & WithInstanceFamily(const Aws::String &value)
void SetPaymentOption(const PaymentOption &value)
HostReservation & WithDuration(int value)
void SetHostReservationId(Aws::String &&value)
HostReservation & WithHourlyPrice(const char *value)
void SetCurrencyCode(CurrencyCodeValues &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
HostReservation & WithTags(Aws::Vector< Tag > &&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