AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
HostOffering.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/CurrencyCodeValues.h>
11#include <aws/ec2/model/PaymentOption.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace EC2 {
22namespace Model {
23
31 public:
32 AWS_EC2_API HostOffering() = default;
33 AWS_EC2_API HostOffering(const Aws::Utils::Xml::XmlNode& xmlNode);
34 AWS_EC2_API HostOffering& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline CurrencyCodeValues GetCurrencyCode() const { return m_currencyCode; }
44 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
46 m_currencyCodeHasBeenSet = true;
47 m_currencyCode = value;
48 }
50 SetCurrencyCode(value);
51 return *this;
52 }
54
56
59 inline int GetDuration() const { return m_duration; }
60 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
61 inline void SetDuration(int value) {
62 m_durationHasBeenSet = true;
63 m_duration = value;
64 }
65 inline HostOffering& WithDuration(int value) {
66 SetDuration(value);
67 return *this;
68 }
70
72
75 inline const Aws::String& GetHourlyPrice() const { return m_hourlyPrice; }
76 inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
77 template <typename HourlyPriceT = Aws::String>
78 void SetHourlyPrice(HourlyPriceT&& value) {
79 m_hourlyPriceHasBeenSet = true;
80 m_hourlyPrice = std::forward<HourlyPriceT>(value);
81 }
82 template <typename HourlyPriceT = Aws::String>
83 HostOffering& WithHourlyPrice(HourlyPriceT&& value) {
84 SetHourlyPrice(std::forward<HourlyPriceT>(value));
85 return *this;
86 }
88
90
93 inline const Aws::String& GetInstanceFamily() const { return m_instanceFamily; }
94 inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
95 template <typename InstanceFamilyT = Aws::String>
96 void SetInstanceFamily(InstanceFamilyT&& value) {
97 m_instanceFamilyHasBeenSet = true;
98 m_instanceFamily = std::forward<InstanceFamilyT>(value);
99 }
100 template <typename InstanceFamilyT = Aws::String>
101 HostOffering& WithInstanceFamily(InstanceFamilyT&& value) {
102 SetInstanceFamily(std::forward<InstanceFamilyT>(value));
103 return *this;
104 }
106
108
111 inline const Aws::String& GetOfferingId() const { return m_offeringId; }
112 inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
113 template <typename OfferingIdT = Aws::String>
114 void SetOfferingId(OfferingIdT&& value) {
115 m_offeringIdHasBeenSet = true;
116 m_offeringId = std::forward<OfferingIdT>(value);
117 }
118 template <typename OfferingIdT = Aws::String>
119 HostOffering& WithOfferingId(OfferingIdT&& value) {
120 SetOfferingId(std::forward<OfferingIdT>(value));
121 return *this;
122 }
124
126
129 inline PaymentOption GetPaymentOption() const { return m_paymentOption; }
130 inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
131 inline void SetPaymentOption(PaymentOption value) {
132 m_paymentOptionHasBeenSet = true;
133 m_paymentOption = value;
134 }
136 SetPaymentOption(value);
137 return *this;
138 }
140
142
146 inline const Aws::String& GetUpfrontPrice() const { return m_upfrontPrice; }
147 inline bool UpfrontPriceHasBeenSet() const { return m_upfrontPriceHasBeenSet; }
148 template <typename UpfrontPriceT = Aws::String>
149 void SetUpfrontPrice(UpfrontPriceT&& value) {
150 m_upfrontPriceHasBeenSet = true;
151 m_upfrontPrice = std::forward<UpfrontPriceT>(value);
152 }
153 template <typename UpfrontPriceT = Aws::String>
154 HostOffering& WithUpfrontPrice(UpfrontPriceT&& value) {
155 SetUpfrontPrice(std::forward<UpfrontPriceT>(value));
156 return *this;
157 }
159 private:
161
162 int m_duration{0};
163
164 Aws::String m_hourlyPrice;
165
166 Aws::String m_instanceFamily;
167
168 Aws::String m_offeringId;
169
170 PaymentOption m_paymentOption{PaymentOption::NOT_SET};
171
172 Aws::String m_upfrontPrice;
173 bool m_currencyCodeHasBeenSet = false;
174 bool m_durationHasBeenSet = false;
175 bool m_hourlyPriceHasBeenSet = false;
176 bool m_instanceFamilyHasBeenSet = false;
177 bool m_offeringIdHasBeenSet = false;
178 bool m_paymentOptionHasBeenSet = false;
179 bool m_upfrontPriceHasBeenSet = false;
180};
181
182} // namespace Model
183} // namespace EC2
184} // namespace Aws
PaymentOption GetPaymentOption() const
AWS_EC2_API HostOffering & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
HostOffering & WithOfferingId(OfferingIdT &&value)
HostOffering & WithUpfrontPrice(UpfrontPriceT &&value)
AWS_EC2_API HostOffering()=default
const Aws::String & GetUpfrontPrice() const
const Aws::String & GetOfferingId() const
HostOffering & WithHourlyPrice(HourlyPriceT &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
HostOffering & WithDuration(int value)
void SetUpfrontPrice(UpfrontPriceT &&value)
const Aws::String & GetInstanceFamily() const
void SetOfferingId(OfferingIdT &&value)
CurrencyCodeValues GetCurrencyCode() const
void SetPaymentOption(PaymentOption value)
bool InstanceFamilyHasBeenSet() const
void SetHourlyPrice(HourlyPriceT &&value)
AWS_EC2_API HostOffering(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetInstanceFamily(InstanceFamilyT &&value)
HostOffering & WithPaymentOption(PaymentOption value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetCurrencyCode(CurrencyCodeValues value)
HostOffering & WithCurrencyCode(CurrencyCodeValues value)
HostOffering & WithInstanceFamily(InstanceFamilyT &&value)
const Aws::String & GetHourlyPrice() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream