AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
Purchase.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/memory/stl/AWSVector.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/ec2/model/PaymentOption.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2
25{
26namespace Model
27{
28
35 {
36 public:
37 AWS_EC2_API Purchase() = default;
38 AWS_EC2_API Purchase(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_EC2_API Purchase& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
43
44
46
51 inline CurrencyCodeValues GetCurrencyCode() const { return m_currencyCode; }
52 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
53 inline void SetCurrencyCode(CurrencyCodeValues value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
54 inline Purchase& WithCurrencyCode(CurrencyCodeValues value) { SetCurrencyCode(value); return *this;}
56
58
61 inline int GetDuration() const { return m_duration; }
62 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
63 inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
64 inline Purchase& WithDuration(int value) { SetDuration(value); return *this;}
66
68
71 inline const Aws::Vector<Aws::String>& GetHostIdSet() const { return m_hostIdSet; }
72 inline bool HostIdSetHasBeenSet() const { return m_hostIdSetHasBeenSet; }
73 template<typename HostIdSetT = Aws::Vector<Aws::String>>
74 void SetHostIdSet(HostIdSetT&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet = std::forward<HostIdSetT>(value); }
75 template<typename HostIdSetT = Aws::Vector<Aws::String>>
76 Purchase& WithHostIdSet(HostIdSetT&& value) { SetHostIdSet(std::forward<HostIdSetT>(value)); return *this;}
77 template<typename HostIdSetT = Aws::String>
78 Purchase& AddHostIdSet(HostIdSetT&& value) { m_hostIdSetHasBeenSet = true; m_hostIdSet.emplace_back(std::forward<HostIdSetT>(value)); return *this; }
80
82
85 inline const Aws::String& GetHostReservationId() const { return m_hostReservationId; }
86 inline bool HostReservationIdHasBeenSet() const { return m_hostReservationIdHasBeenSet; }
87 template<typename HostReservationIdT = Aws::String>
88 void SetHostReservationId(HostReservationIdT&& value) { m_hostReservationIdHasBeenSet = true; m_hostReservationId = std::forward<HostReservationIdT>(value); }
89 template<typename HostReservationIdT = Aws::String>
90 Purchase& WithHostReservationId(HostReservationIdT&& value) { SetHostReservationId(std::forward<HostReservationIdT>(value)); return *this;}
92
94
97 inline const Aws::String& GetHourlyPrice() const { return m_hourlyPrice; }
98 inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
99 template<typename HourlyPriceT = Aws::String>
100 void SetHourlyPrice(HourlyPriceT&& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = std::forward<HourlyPriceT>(value); }
101 template<typename HourlyPriceT = Aws::String>
102 Purchase& WithHourlyPrice(HourlyPriceT&& value) { SetHourlyPrice(std::forward<HourlyPriceT>(value)); return *this;}
104
106
110 inline const Aws::String& GetInstanceFamily() const { return m_instanceFamily; }
111 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
112 template<typename InstanceFamilyT = Aws::String>
113 void SetInstanceFamily(InstanceFamilyT&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::forward<InstanceFamilyT>(value); }
114 template<typename InstanceFamilyT = Aws::String>
115 Purchase& WithInstanceFamily(InstanceFamilyT&& value) { SetInstanceFamily(std::forward<InstanceFamilyT>(value)); return *this;}
117
119
122 inline PaymentOption GetPaymentOption() const { return m_paymentOption; }
123 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
124 inline void SetPaymentOption(PaymentOption value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
125 inline Purchase& WithPaymentOption(PaymentOption value) { SetPaymentOption(value); return *this;}
127
129
132 inline const Aws::String& GetUpfrontPrice() const { return m_upfrontPrice; }
133 inline bool UpfrontPriceHasBeenSet() const { return m_upfrontPriceHasBeenSet; }
134 template<typename UpfrontPriceT = Aws::String>
135 void SetUpfrontPrice(UpfrontPriceT&& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = std::forward<UpfrontPriceT>(value); }
136 template<typename UpfrontPriceT = Aws::String>
137 Purchase& WithUpfrontPrice(UpfrontPriceT&& value) { SetUpfrontPrice(std::forward<UpfrontPriceT>(value)); return *this;}
139 private:
140
142 bool m_currencyCodeHasBeenSet = false;
143
144 int m_duration{0};
145 bool m_durationHasBeenSet = false;
146
147 Aws::Vector<Aws::String> m_hostIdSet;
148 bool m_hostIdSetHasBeenSet = false;
149
150 Aws::String m_hostReservationId;
151 bool m_hostReservationIdHasBeenSet = false;
152
153 Aws::String m_hourlyPrice;
154 bool m_hourlyPriceHasBeenSet = false;
155
156 Aws::String m_instanceFamily;
157 bool m_instanceFamilyHasBeenSet = false;
158
159 PaymentOption m_paymentOption{PaymentOption::NOT_SET};
160 bool m_paymentOptionHasBeenSet = false;
161
162 Aws::String m_upfrontPrice;
163 bool m_upfrontPriceHasBeenSet = false;
164 };
165
166} // namespace Model
167} // namespace EC2
168} // namespace Aws
bool HourlyPriceHasBeenSet() const
Definition Purchase.h:98
const Aws::String & GetInstanceFamily() const
Definition Purchase.h:110
AWS_EC2_API Purchase & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool HostIdSetHasBeenSet() const
Definition Purchase.h:72
const Aws::String & GetHostReservationId() const
Definition Purchase.h:85
Purchase & WithInstanceFamily(InstanceFamilyT &&value)
Definition Purchase.h:115
Purchase & AddHostIdSet(HostIdSetT &&value)
Definition Purchase.h:78
Purchase & WithHostReservationId(HostReservationIdT &&value)
Definition Purchase.h:90
void SetCurrencyCode(CurrencyCodeValues value)
Definition Purchase.h:53
void SetHostIdSet(HostIdSetT &&value)
Definition Purchase.h:74
bool CurrencyCodeHasBeenSet() const
Definition Purchase.h:52
Purchase & WithUpfrontPrice(UpfrontPriceT &&value)
Definition Purchase.h:137
const Aws::Vector< Aws::String > & GetHostIdSet() const
Definition Purchase.h:71
AWS_EC2_API Purchase(const Aws::Utils::Xml::XmlNode &xmlNode)
bool InstanceFamilyHasBeenSet() const
Definition Purchase.h:111
int GetDuration() const
Definition Purchase.h:61
bool DurationHasBeenSet() const
Definition Purchase.h:62
Purchase & WithHourlyPrice(HourlyPriceT &&value)
Definition Purchase.h:102
void SetHostReservationId(HostReservationIdT &&value)
Definition Purchase.h:88
void SetInstanceFamily(InstanceFamilyT &&value)
Definition Purchase.h:113
Purchase & WithCurrencyCode(CurrencyCodeValues value)
Definition Purchase.h:54
AWS_EC2_API Purchase()=default
Purchase & WithPaymentOption(PaymentOption value)
Definition Purchase.h:125
Purchase & WithHostIdSet(HostIdSetT &&value)
Definition Purchase.h:76
bool UpfrontPriceHasBeenSet() const
Definition Purchase.h:133
void SetDuration(int value)
Definition Purchase.h:63
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
CurrencyCodeValues GetCurrencyCode() const
Definition Purchase.h:51
bool HostReservationIdHasBeenSet() const
Definition Purchase.h:86
Purchase & WithDuration(int value)
Definition Purchase.h:64
PaymentOption GetPaymentOption() const
Definition Purchase.h:122
void SetHourlyPrice(HourlyPriceT &&value)
Definition Purchase.h:100
const Aws::String & GetHourlyPrice() const
Definition Purchase.h:97
const Aws::String & GetUpfrontPrice() const
Definition Purchase.h:132
void SetUpfrontPrice(UpfrontPriceT &&value)
Definition Purchase.h:135
bool PaymentOptionHasBeenSet() const
Definition Purchase.h:123
void SetPaymentOption(PaymentOption value)
Definition Purchase.h:124
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