AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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() = default;
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 CurrencyCodeValues GetCurrencyCode() const { return m_currencyCode; }
66 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
67 inline void SetCurrencyCode(CurrencyCodeValues value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
70
72
76 inline int GetDuration() const { return m_duration; }
77 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
78 inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
79 inline HostReservation& WithDuration(int value) { SetDuration(value); return *this;}
81
83
86 inline const Aws::Utils::DateTime& GetEnd() const { return m_end; }
87 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
88 template<typename EndT = Aws::Utils::DateTime>
89 void SetEnd(EndT&& value) { m_endHasBeenSet = true; m_end = std::forward<EndT>(value); }
90 template<typename EndT = Aws::Utils::DateTime>
91 HostReservation& WithEnd(EndT&& value) { SetEnd(std::forward<EndT>(value)); return *this;}
93
95
98 inline const Aws::Vector<Aws::String>& GetHostIdSet() const { return m_hostIdSet; }
99 inline bool HostIdSetHasBeenSet() const { return m_hostIdSetHasBeenSet; }
100 template<typename HostIdSetT = Aws::Vector<Aws::String>>
101 void SetHostIdSet(HostIdSetT&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = std::forward<HostIdSetT>(value); }
102 template<typename HostIdSetT = Aws::Vector<Aws::String>>
103 HostReservation& WithHostIdSet(HostIdSetT&& value) { SetHostIdSet(std::forward<HostIdSetT>(value)); return *this;}
104 template<typename HostIdSetT = Aws::String>
105 HostReservation& AddHostIdSet(HostIdSetT&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.emplace_back(std::forward<HostIdSetT>(value)); return *this; }
107
109
112 inline const Aws::String& GetHostReservationId() const { return m_hostReservationId; }
113 inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
114 template<typename HostReservationIdT = Aws::String>
115 void SetHostReservationId(HostReservationIdT&& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = std::forward<HostReservationIdT>(value); }
116 template<typename HostReservationIdT = Aws::String>
117 HostReservation& WithHostReservationId(HostReservationIdT&& value) { SetHostReservationId(std::forward<HostReservationIdT>(value)); return *this;}
119
121
124 inline const Aws::String& GetHourlyPrice() const { return m_hourlyPrice; }
125 inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
126 template<typename HourlyPriceT = Aws::String>
127 void SetHourlyPrice(HourlyPriceT&& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = std::forward<HourlyPriceT>(value); }
128 template<typename HourlyPriceT = Aws::String>
129 HostReservation& WithHourlyPrice(HourlyPriceT&& value) { SetHourlyPrice(std::forward<HourlyPriceT>(value)); return *this;}
131
133
138 inline const Aws::String& GetInstanceFamily() const { return m_instanceFamily; }
139 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
140 template<typename InstanceFamilyT = Aws::String>
141 void SetInstanceFamily(InstanceFamilyT&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::forward<InstanceFamilyT>(value); }
142 template<typename InstanceFamilyT = Aws::String>
143 HostReservation& WithInstanceFamily(InstanceFamilyT&& value) { SetInstanceFamily(std::forward<InstanceFamilyT>(value)); return *this;}
145
147
151 inline const Aws::String& GetOfferingId() const { return m_offeringId; }
152 inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
153 template<typename OfferingIdT = Aws::String>
154 void SetOfferingId(OfferingIdT&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::forward<OfferingIdT>(value); }
155 template<typename OfferingIdT = Aws::String>
156 HostReservation& WithOfferingId(OfferingIdT&& value) { SetOfferingId(std::forward<OfferingIdT>(value)); return *this;}
158
160
163 inline PaymentOption GetPaymentOption() const { return m_paymentOption; }
164 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
165 inline void SetPaymentOption(PaymentOption value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
166 inline HostReservation& WithPaymentOption(PaymentOption value) { SetPaymentOption(value); return *this;}
168
170
173 inline const Aws::Utils::DateTime& GetStart() const { return m_start; }
174 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
175 template<typename StartT = Aws::Utils::DateTime>
176 void SetStart(StartT&& value) { m_startHasBeenSet = true; m_start = std::forward<StartT>(value); }
177 template<typename StartT = Aws::Utils::DateTime>
178 HostReservation& WithStart(StartT&& value) { SetStart(std::forward<StartT>(value)); return *this;}
180
182
185 inline ReservationState GetState() const { return m_state; }
186 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
187 inline void SetState(ReservationState value) { m_stateHasBeenSet = true; m_state = value; }
188 inline HostReservation& WithState(ReservationState value) { SetState(value); return *this;}
190
192
195 inline const Aws::String& GetUpfrontPrice() const { return m_upfrontPrice; }
196 inline bool UpfrontPriceHasBeenSet() const { return m_upfrontPriceHasBeenSet; }
197 template<typename UpfrontPriceT = Aws::String>
198 void SetUpfrontPrice(UpfrontPriceT&& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = std::forward<UpfrontPriceT>(value); }
199 template<typename UpfrontPriceT = Aws::String>
200 HostReservation& WithUpfrontPrice(UpfrontPriceT&& value) { SetUpfrontPrice(std::forward<UpfrontPriceT>(value)); return *this;}
202
204
207 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
208 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
209 template<typename TagsT = Aws::Vector<Tag>>
210 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
211 template<typename TagsT = Aws::Vector<Tag>>
212 HostReservation& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
213 template<typename TagsT = Tag>
214 HostReservation& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
216 private:
217
218 int m_count{0};
219 bool m_countHasBeenSet = false;
220
222 bool m_currencyCodeHasBeenSet = false;
223
224 int m_duration{0};
225 bool m_durationHasBeenSet = false;
226
227 Aws::Utils::DateTime m_end{};
228 bool m_endHasBeenSet = false;
229
230 Aws::Vector<Aws::String> m_hostIdSet;
231 bool m_hostIdSetHasBeenSet = false;
232
233 Aws::String m_hostReservationId;
234 bool m_hostReservationIdHasBeenSet = false;
235
236 Aws::String m_hourlyPrice;
237 bool m_hourlyPriceHasBeenSet = false;
238
239 Aws::String m_instanceFamily;
240 bool m_instanceFamilyHasBeenSet = false;
241
242 Aws::String m_offeringId;
243 bool m_offeringIdHasBeenSet = false;
244
245 PaymentOption m_paymentOption{PaymentOption::NOT_SET};
246 bool m_paymentOptionHasBeenSet = false;
247
248 Aws::Utils::DateTime m_start{};
249 bool m_startHasBeenSet = false;
250
252 bool m_stateHasBeenSet = false;
253
254 Aws::String m_upfrontPrice;
255 bool m_upfrontPriceHasBeenSet = false;
256
257 Aws::Vector<Tag> m_tags;
258 bool m_tagsHasBeenSet = false;
259 };
260
261} // namespace Model
262} // namespace EC2
263} // 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