AWS SDK for C++  1.9.66
AWS SDK for C++
Purchase.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Xml
20 {
21  class XmlNode;
22 } // namespace Xml
23 } // namespace Utils
24 namespace EC2
25 {
26 namespace Model
27 {
28 
35  {
36  public:
40 
41  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42  void OutputToStream(Aws::OStream& oStream, const char* location) const;
43 
44 
50  inline const CurrencyCodeValues& GetCurrencyCode() const{ return m_currencyCode; }
51 
57  inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
58 
64  inline void SetCurrencyCode(const CurrencyCodeValues& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
65 
71  inline void SetCurrencyCode(CurrencyCodeValues&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); }
72 
78  inline Purchase& WithCurrencyCode(const CurrencyCodeValues& value) { SetCurrencyCode(value); return *this;}
79 
85  inline Purchase& WithCurrencyCode(CurrencyCodeValues&& value) { SetCurrencyCode(std::move(value)); return *this;}
86 
87 
91  inline int GetDuration() const{ return m_duration; }
92 
96  inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
97 
101  inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
102 
106  inline Purchase& WithDuration(int value) { SetDuration(value); return *this;}
107 
108 
112  inline const Aws::Vector<Aws::String>& GetHostIdSet() const{ return m_hostIdSet; }
113 
117  inline bool HostIdSetHasBeenSet() const { return m_hostIdSetHasBeenSet; }
118 
122  inline void SetHostIdSet(const Aws::Vector<Aws::String>& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = value; }
123 
127  inline void SetHostIdSet(Aws::Vector<Aws::String>&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = std::move(value); }
128 
132  inline Purchase& WithHostIdSet(const Aws::Vector<Aws::String>& value) { SetHostIdSet(value); return *this;}
133 
137  inline Purchase& WithHostIdSet(Aws::Vector<Aws::String>&& value) { SetHostIdSet(std::move(value)); return *this;}
138 
142  inline Purchase& AddHostIdSet(const Aws::String& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(value); return *this; }
143 
147  inline Purchase& AddHostIdSet(Aws::String&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(std::move(value)); return *this; }
148 
152  inline Purchase& AddHostIdSet(const char* value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.push_back(value); return *this; }
153 
154 
158  inline const Aws::String& GetHostReservationId() const{ return m_hostReservationId; }
159 
163  inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
164 
168  inline void SetHostReservationId(const Aws::String& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = value; }
169 
173  inline void SetHostReservationId(Aws::String&& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = std::move(value); }
174 
178  inline void SetHostReservationId(const char* value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId.assign(value); }
179 
183  inline Purchase& WithHostReservationId(const Aws::String& value) { SetHostReservationId(value); return *this;}
184 
188  inline Purchase& WithHostReservationId(Aws::String&& value) { SetHostReservationId(std::move(value)); return *this;}
189 
193  inline Purchase& WithHostReservationId(const char* value) { SetHostReservationId(value); return *this;}
194 
195 
199  inline const Aws::String& GetHourlyPrice() const{ return m_hourlyPrice; }
200 
204  inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
205 
209  inline void SetHourlyPrice(const Aws::String& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = value; }
210 
214  inline void SetHourlyPrice(Aws::String&& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = std::move(value); }
215 
219  inline void SetHourlyPrice(const char* value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice.assign(value); }
220 
224  inline Purchase& WithHourlyPrice(const Aws::String& value) { SetHourlyPrice(value); return *this;}
225 
229  inline Purchase& WithHourlyPrice(Aws::String&& value) { SetHourlyPrice(std::move(value)); return *this;}
230 
234  inline Purchase& WithHourlyPrice(const char* value) { SetHourlyPrice(value); return *this;}
235 
236 
241  inline const Aws::String& GetInstanceFamily() const{ return m_instanceFamily; }
242 
247  inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
248 
253  inline void SetInstanceFamily(const Aws::String& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = value; }
254 
259  inline void SetInstanceFamily(Aws::String&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::move(value); }
260 
265  inline void SetInstanceFamily(const char* value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily.assign(value); }
266 
271  inline Purchase& WithInstanceFamily(const Aws::String& value) { SetInstanceFamily(value); return *this;}
272 
277  inline Purchase& WithInstanceFamily(Aws::String&& value) { SetInstanceFamily(std::move(value)); return *this;}
278 
283  inline Purchase& WithInstanceFamily(const char* value) { SetInstanceFamily(value); return *this;}
284 
285 
289  inline const PaymentOption& GetPaymentOption() const{ return m_paymentOption; }
290 
294  inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
295 
299  inline void SetPaymentOption(const PaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
300 
304  inline void SetPaymentOption(PaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); }
305 
309  inline Purchase& WithPaymentOption(const PaymentOption& value) { SetPaymentOption(value); return *this;}
310 
314  inline Purchase& WithPaymentOption(PaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;}
315 
316 
320  inline const Aws::String& GetUpfrontPrice() const{ return m_upfrontPrice; }
321 
325  inline bool UpfrontPriceHasBeenSet() const { return m_upfrontPriceHasBeenSet; }
326 
330  inline void SetUpfrontPrice(const Aws::String& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = value; }
331 
335  inline void SetUpfrontPrice(Aws::String&& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = std::move(value); }
336 
340  inline void SetUpfrontPrice(const char* value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice.assign(value); }
341 
345  inline Purchase& WithUpfrontPrice(const Aws::String& value) { SetUpfrontPrice(value); return *this;}
346 
350  inline Purchase& WithUpfrontPrice(Aws::String&& value) { SetUpfrontPrice(std::move(value)); return *this;}
351 
355  inline Purchase& WithUpfrontPrice(const char* value) { SetUpfrontPrice(value); return *this;}
356 
357  private:
358 
359  CurrencyCodeValues m_currencyCode;
360  bool m_currencyCodeHasBeenSet;
361 
362  int m_duration;
363  bool m_durationHasBeenSet;
364 
365  Aws::Vector<Aws::String> m_hostIdSet;
366  bool m_hostIdSetHasBeenSet;
367 
368  Aws::String m_hostReservationId;
369  bool m_hostReservationIdHasBeenSet;
370 
371  Aws::String m_hourlyPrice;
372  bool m_hourlyPriceHasBeenSet;
373 
374  Aws::String m_instanceFamily;
375  bool m_instanceFamilyHasBeenSet;
376 
377  PaymentOption m_paymentOption;
378  bool m_paymentOptionHasBeenSet;
379 
380  Aws::String m_upfrontPrice;
381  bool m_upfrontPriceHasBeenSet;
382  };
383 
384 } // namespace Model
385 } // namespace EC2
386 } // namespace Aws
Aws::EC2::Model::Purchase::HostReservationIdHasBeenSet
bool HostReservationIdHasBeenSet() const
Definition: Purchase.h:163
Aws::EC2::Model::Purchase
Definition: Purchase.h:35
Aws::EC2::Model::Purchase::SetHostIdSet
void SetHostIdSet(const Aws::Vector< Aws::String > &value)
Definition: Purchase.h:122
Aws::EC2::Model::Purchase::WithPaymentOption
Purchase & WithPaymentOption(PaymentOption &&value)
Definition: Purchase.h:314
Aws::EC2::Model::Purchase::WithHostReservationId
Purchase & WithHostReservationId(Aws::String &&value)
Definition: Purchase.h:188
Aws::EC2::Model::Purchase::WithCurrencyCode
Purchase & WithCurrencyCode(CurrencyCodeValues &&value)
Definition: Purchase.h:85
Aws::EC2::Model::Purchase::GetUpfrontPrice
const Aws::String & GetUpfrontPrice() const
Definition: Purchase.h:320
Aws::EC2::Model::Purchase::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::Purchase::WithDuration
Purchase & WithDuration(int value)
Definition: Purchase.h:106
Aws::EC2::Model::Purchase::SetCurrencyCode
void SetCurrencyCode(const CurrencyCodeValues &value)
Definition: Purchase.h:64
Aws::EC2::Model::Purchase::SetCurrencyCode
void SetCurrencyCode(CurrencyCodeValues &&value)
Definition: Purchase.h:71
Aws::EC2::Model::Purchase::SetHostReservationId
void SetHostReservationId(const Aws::String &value)
Definition: Purchase.h:168
Aws::EC2::Model::Purchase::SetPaymentOption
void SetPaymentOption(PaymentOption &&value)
Definition: Purchase.h:304
Aws::EC2::Model::Purchase::WithHostReservationId
Purchase & WithHostReservationId(const Aws::String &value)
Definition: Purchase.h:183
Aws::EC2::Model::Purchase::SetDuration
void SetDuration(int value)
Definition: Purchase.h:101
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::Purchase::WithHourlyPrice
Purchase & WithHourlyPrice(Aws::String &&value)
Definition: Purchase.h:229
Aws::EC2::Model::Purchase::WithUpfrontPrice
Purchase & WithUpfrontPrice(const Aws::String &value)
Definition: Purchase.h:345
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSStreamFwd.h
Aws::EC2::Model::Purchase::WithPaymentOption
Purchase & WithPaymentOption(const PaymentOption &value)
Definition: Purchase.h:309
Aws::EC2::Model::Purchase::SetHourlyPrice
void SetHourlyPrice(const Aws::String &value)
Definition: Purchase.h:209
CurrencyCodeValues.h
AWSVector.h
Aws::EC2::Model::Purchase::GetHourlyPrice
const Aws::String & GetHourlyPrice() const
Definition: Purchase.h:199
Aws::EC2::Model::Purchase::GetHostReservationId
const Aws::String & GetHostReservationId() const
Definition: Purchase.h:158
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::Purchase::Purchase
Purchase(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::Purchase::DurationHasBeenSet
bool DurationHasBeenSet() const
Definition: Purchase.h:96
Aws::EC2::Model::Purchase::SetInstanceFamily
void SetInstanceFamily(Aws::String &&value)
Definition: Purchase.h:259
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
Aws::EC2::Model::Purchase::WithHourlyPrice
Purchase & WithHourlyPrice(const char *value)
Definition: Purchase.h:234
Aws::EC2::Model::Purchase::AddHostIdSet
Purchase & AddHostIdSet(const Aws::String &value)
Definition: Purchase.h:142
Aws::EC2::Model::Purchase::operator=
Purchase & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::Purchase::WithInstanceFamily
Purchase & WithInstanceFamily(const char *value)
Definition: Purchase.h:283
Aws::EC2::Model::Purchase::SetInstanceFamily
void SetInstanceFamily(const char *value)
Definition: Purchase.h:265
Aws::EC2::Model::Purchase::Purchase
Purchase()
Aws::EC2::Model::Purchase::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::Purchase::GetHostIdSet
const Aws::Vector< Aws::String > & GetHostIdSet() const
Definition: Purchase.h:112
AWSString.h
Aws::EC2::Model::Purchase::SetUpfrontPrice
void SetUpfrontPrice(const Aws::String &value)
Definition: Purchase.h:330
Aws::EC2::Model::Purchase::SetHourlyPrice
void SetHourlyPrice(const char *value)
Definition: Purchase.h:219
Aws::EC2::Model::Purchase::AddHostIdSet
Purchase & AddHostIdSet(Aws::String &&value)
Definition: Purchase.h:147
Aws::EC2::Model::Purchase::WithInstanceFamily
Purchase & WithInstanceFamily(Aws::String &&value)
Definition: Purchase.h:277
Aws::EC2::Model::Purchase::InstanceFamilyHasBeenSet
bool InstanceFamilyHasBeenSet() const
Definition: Purchase.h:247
Aws::EC2::Model::Purchase::WithUpfrontPrice
Purchase & WithUpfrontPrice(Aws::String &&value)
Definition: Purchase.h:350
Aws::EC2::Model::Purchase::UpfrontPriceHasBeenSet
bool UpfrontPriceHasBeenSet() const
Definition: Purchase.h:325
Aws::EC2::Model::Purchase::WithHourlyPrice
Purchase & WithHourlyPrice(const Aws::String &value)
Definition: Purchase.h:224
Aws::EC2::Model::Purchase::SetUpfrontPrice
void SetUpfrontPrice(const char *value)
Definition: Purchase.h:340
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::Purchase::GetDuration
int GetDuration() const
Definition: Purchase.h:91
PaymentOption.h
Aws::EC2::Model::Purchase::WithUpfrontPrice
Purchase & WithUpfrontPrice(const char *value)
Definition: Purchase.h:355
Aws::EC2::Model::Purchase::HostIdSetHasBeenSet
bool HostIdSetHasBeenSet() const
Definition: Purchase.h:117
Aws::EC2::Model::Purchase::GetInstanceFamily
const Aws::String & GetInstanceFamily() const
Definition: Purchase.h:241
Aws::EC2::Model::Purchase::SetInstanceFamily
void SetInstanceFamily(const Aws::String &value)
Definition: Purchase.h:253
Aws::EC2::Model::Purchase::CurrencyCodeHasBeenSet
bool CurrencyCodeHasBeenSet() const
Definition: Purchase.h:57
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::Purchase::SetHourlyPrice
void SetHourlyPrice(Aws::String &&value)
Definition: Purchase.h:214
Aws::EC2::Model::Purchase::WithHostIdSet
Purchase & WithHostIdSet(const Aws::Vector< Aws::String > &value)
Definition: Purchase.h:132
Aws::EC2::Model::Purchase::HourlyPriceHasBeenSet
bool HourlyPriceHasBeenSet() const
Definition: Purchase.h:204
Aws::EC2::Model::Purchase::GetPaymentOption
const PaymentOption & GetPaymentOption() const
Definition: Purchase.h:289
index
int index
Definition: cJSON.h:181
Aws::EC2::Model::Purchase::PaymentOptionHasBeenSet
bool PaymentOptionHasBeenSet() const
Definition: Purchase.h:294
Aws::EC2::Model::Purchase::AddHostIdSet
Purchase & AddHostIdSet(const char *value)
Definition: Purchase.h:152
Aws::EC2::Model::Purchase::WithHostIdSet
Purchase & WithHostIdSet(Aws::Vector< Aws::String > &&value)
Definition: Purchase.h:137
Aws::EC2::Model::Purchase::SetHostReservationId
void SetHostReservationId(const char *value)
Definition: Purchase.h:178
EC2_EXPORTS.h
Aws::EC2::Model::Purchase::SetHostIdSet
void SetHostIdSet(Aws::Vector< Aws::String > &&value)
Definition: Purchase.h:127
Aws::EC2::Model::PaymentOption
PaymentOption
Definition: PaymentOption.h:17
Aws::EC2::Model::Purchase::SetUpfrontPrice
void SetUpfrontPrice(Aws::String &&value)
Definition: Purchase.h:335
Aws::EC2::Model::Purchase::SetHostReservationId
void SetHostReservationId(Aws::String &&value)
Definition: Purchase.h:173
Aws::EC2::Model::Purchase::WithHostReservationId
Purchase & WithHostReservationId(const char *value)
Definition: Purchase.h:193
Aws::EC2::Model::Purchase::WithInstanceFamily
Purchase & WithInstanceFamily(const Aws::String &value)
Definition: Purchase.h:271
Aws::EC2::Model::CurrencyCodeValues
CurrencyCodeValues
Definition: CurrencyCodeValues.h:17
Aws::EC2::Model::Purchase::SetPaymentOption
void SetPaymentOption(const PaymentOption &value)
Definition: Purchase.h:299
Aws::EC2::Model::Purchase::WithCurrencyCode
Purchase & WithCurrencyCode(const CurrencyCodeValues &value)
Definition: Purchase.h:78
Aws::EC2::Model::Purchase::GetCurrencyCode
const CurrencyCodeValues & GetCurrencyCode() const
Definition: Purchase.h:50