1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
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/AWSString.h>
11 #include <aws/ec2/model/PaymentOption.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Xml
19 {
20   class XmlNode;
21 } // namespace Xml
22 } // namespace Utils
23 namespace EC2
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>Details about the Dedicated Host Reservation offering.</p><p><h3>See
30    * Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/HostOffering">AWS
32    * API Reference</a></p>
33    */
34   class AWS_EC2_API HostOffering
35   {
36   public:
37     HostOffering();
38     HostOffering(const Aws::Utils::Xml::XmlNode& xmlNode);
39     HostOffering& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
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 
45     /**
46      * <p>The currency of the offering.</p>
47      */
GetCurrencyCode()48     inline const CurrencyCodeValues& GetCurrencyCode() const{ return m_currencyCode; }
49 
50     /**
51      * <p>The currency of the offering.</p>
52      */
CurrencyCodeHasBeenSet()53     inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
54 
55     /**
56      * <p>The currency of the offering.</p>
57      */
SetCurrencyCode(const CurrencyCodeValues & value)58     inline void SetCurrencyCode(const CurrencyCodeValues& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
59 
60     /**
61      * <p>The currency of the offering.</p>
62      */
SetCurrencyCode(CurrencyCodeValues && value)63     inline void SetCurrencyCode(CurrencyCodeValues&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); }
64 
65     /**
66      * <p>The currency of the offering.</p>
67      */
WithCurrencyCode(const CurrencyCodeValues & value)68     inline HostOffering& WithCurrencyCode(const CurrencyCodeValues& value) { SetCurrencyCode(value); return *this;}
69 
70     /**
71      * <p>The currency of the offering.</p>
72      */
WithCurrencyCode(CurrencyCodeValues && value)73     inline HostOffering& WithCurrencyCode(CurrencyCodeValues&& value) { SetCurrencyCode(std::move(value)); return *this;}
74 
75 
76     /**
77      * <p>The duration of the offering (in seconds).</p>
78      */
GetDuration()79     inline int GetDuration() const{ return m_duration; }
80 
81     /**
82      * <p>The duration of the offering (in seconds).</p>
83      */
DurationHasBeenSet()84     inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
85 
86     /**
87      * <p>The duration of the offering (in seconds).</p>
88      */
SetDuration(int value)89     inline void SetDuration(int value) { m_durationHasBeenSet = true; m_duration = value; }
90 
91     /**
92      * <p>The duration of the offering (in seconds).</p>
93      */
WithDuration(int value)94     inline HostOffering& WithDuration(int value) { SetDuration(value); return *this;}
95 
96 
97     /**
98      * <p>The hourly price of the offering.</p>
99      */
GetHourlyPrice()100     inline const Aws::String& GetHourlyPrice() const{ return m_hourlyPrice; }
101 
102     /**
103      * <p>The hourly price of the offering.</p>
104      */
HourlyPriceHasBeenSet()105     inline bool HourlyPriceHasBeenSet() const { return m_hourlyPriceHasBeenSet; }
106 
107     /**
108      * <p>The hourly price of the offering.</p>
109      */
SetHourlyPrice(const Aws::String & value)110     inline void SetHourlyPrice(const Aws::String& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = value; }
111 
112     /**
113      * <p>The hourly price of the offering.</p>
114      */
SetHourlyPrice(Aws::String && value)115     inline void SetHourlyPrice(Aws::String&& value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice = std::move(value); }
116 
117     /**
118      * <p>The hourly price of the offering.</p>
119      */
SetHourlyPrice(const char * value)120     inline void SetHourlyPrice(const char* value) { m_hourlyPriceHasBeenSet = true; m_hourlyPrice.assign(value); }
121 
122     /**
123      * <p>The hourly price of the offering.</p>
124      */
WithHourlyPrice(const Aws::String & value)125     inline HostOffering& WithHourlyPrice(const Aws::String& value) { SetHourlyPrice(value); return *this;}
126 
127     /**
128      * <p>The hourly price of the offering.</p>
129      */
WithHourlyPrice(Aws::String && value)130     inline HostOffering& WithHourlyPrice(Aws::String&& value) { SetHourlyPrice(std::move(value)); return *this;}
131 
132     /**
133      * <p>The hourly price of the offering.</p>
134      */
WithHourlyPrice(const char * value)135     inline HostOffering& WithHourlyPrice(const char* value) { SetHourlyPrice(value); return *this;}
136 
137 
138     /**
139      * <p>The instance family of the offering.</p>
140      */
GetInstanceFamily()141     inline const Aws::String& GetInstanceFamily() const{ return m_instanceFamily; }
142 
143     /**
144      * <p>The instance family of the offering.</p>
145      */
InstanceFamilyHasBeenSet()146     inline bool InstanceFamilyHasBeenSet() const { return m_instanceFamilyHasBeenSet; }
147 
148     /**
149      * <p>The instance family of the offering.</p>
150      */
SetInstanceFamily(const Aws::String & value)151     inline void SetInstanceFamily(const Aws::String& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = value; }
152 
153     /**
154      * <p>The instance family of the offering.</p>
155      */
SetInstanceFamily(Aws::String && value)156     inline void SetInstanceFamily(Aws::String&& value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily = std::move(value); }
157 
158     /**
159      * <p>The instance family of the offering.</p>
160      */
SetInstanceFamily(const char * value)161     inline void SetInstanceFamily(const char* value) { m_instanceFamilyHasBeenSet = true; m_instanceFamily.assign(value); }
162 
163     /**
164      * <p>The instance family of the offering.</p>
165      */
WithInstanceFamily(const Aws::String & value)166     inline HostOffering& WithInstanceFamily(const Aws::String& value) { SetInstanceFamily(value); return *this;}
167 
168     /**
169      * <p>The instance family of the offering.</p>
170      */
WithInstanceFamily(Aws::String && value)171     inline HostOffering& WithInstanceFamily(Aws::String&& value) { SetInstanceFamily(std::move(value)); return *this;}
172 
173     /**
174      * <p>The instance family of the offering.</p>
175      */
WithInstanceFamily(const char * value)176     inline HostOffering& WithInstanceFamily(const char* value) { SetInstanceFamily(value); return *this;}
177 
178 
179     /**
180      * <p>The ID of the offering.</p>
181      */
GetOfferingId()182     inline const Aws::String& GetOfferingId() const{ return m_offeringId; }
183 
184     /**
185      * <p>The ID of the offering.</p>
186      */
OfferingIdHasBeenSet()187     inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
188 
189     /**
190      * <p>The ID of the offering.</p>
191      */
SetOfferingId(const Aws::String & value)192     inline void SetOfferingId(const Aws::String& value) { m_offeringIdHasBeenSet = true; m_offeringId = value; }
193 
194     /**
195      * <p>The ID of the offering.</p>
196      */
SetOfferingId(Aws::String && value)197     inline void SetOfferingId(Aws::String&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::move(value); }
198 
199     /**
200      * <p>The ID of the offering.</p>
201      */
SetOfferingId(const char * value)202     inline void SetOfferingId(const char* value) { m_offeringIdHasBeenSet = true; m_offeringId.assign(value); }
203 
204     /**
205      * <p>The ID of the offering.</p>
206      */
WithOfferingId(const Aws::String & value)207     inline HostOffering& WithOfferingId(const Aws::String& value) { SetOfferingId(value); return *this;}
208 
209     /**
210      * <p>The ID of the offering.</p>
211      */
WithOfferingId(Aws::String && value)212     inline HostOffering& WithOfferingId(Aws::String&& value) { SetOfferingId(std::move(value)); return *this;}
213 
214     /**
215      * <p>The ID of the offering.</p>
216      */
WithOfferingId(const char * value)217     inline HostOffering& WithOfferingId(const char* value) { SetOfferingId(value); return *this;}
218 
219 
220     /**
221      * <p>The available payment option.</p>
222      */
GetPaymentOption()223     inline const PaymentOption& GetPaymentOption() const{ return m_paymentOption; }
224 
225     /**
226      * <p>The available payment option.</p>
227      */
PaymentOptionHasBeenSet()228     inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
229 
230     /**
231      * <p>The available payment option.</p>
232      */
SetPaymentOption(const PaymentOption & value)233     inline void SetPaymentOption(const PaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
234 
235     /**
236      * <p>The available payment option.</p>
237      */
SetPaymentOption(PaymentOption && value)238     inline void SetPaymentOption(PaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); }
239 
240     /**
241      * <p>The available payment option.</p>
242      */
WithPaymentOption(const PaymentOption & value)243     inline HostOffering& WithPaymentOption(const PaymentOption& value) { SetPaymentOption(value); return *this;}
244 
245     /**
246      * <p>The available payment option.</p>
247      */
WithPaymentOption(PaymentOption && value)248     inline HostOffering& WithPaymentOption(PaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;}
249 
250 
251     /**
252      * <p>The upfront price of the offering. Does not apply to No Upfront
253      * offerings.</p>
254      */
GetUpfrontPrice()255     inline const Aws::String& GetUpfrontPrice() const{ return m_upfrontPrice; }
256 
257     /**
258      * <p>The upfront price of the offering. Does not apply to No Upfront
259      * offerings.</p>
260      */
UpfrontPriceHasBeenSet()261     inline bool UpfrontPriceHasBeenSet() const { return m_upfrontPriceHasBeenSet; }
262 
263     /**
264      * <p>The upfront price of the offering. Does not apply to No Upfront
265      * offerings.</p>
266      */
SetUpfrontPrice(const Aws::String & value)267     inline void SetUpfrontPrice(const Aws::String& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = value; }
268 
269     /**
270      * <p>The upfront price of the offering. Does not apply to No Upfront
271      * offerings.</p>
272      */
SetUpfrontPrice(Aws::String && value)273     inline void SetUpfrontPrice(Aws::String&& value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice = std::move(value); }
274 
275     /**
276      * <p>The upfront price of the offering. Does not apply to No Upfront
277      * offerings.</p>
278      */
SetUpfrontPrice(const char * value)279     inline void SetUpfrontPrice(const char* value) { m_upfrontPriceHasBeenSet = true; m_upfrontPrice.assign(value); }
280 
281     /**
282      * <p>The upfront price of the offering. Does not apply to No Upfront
283      * offerings.</p>
284      */
WithUpfrontPrice(const Aws::String & value)285     inline HostOffering& WithUpfrontPrice(const Aws::String& value) { SetUpfrontPrice(value); return *this;}
286 
287     /**
288      * <p>The upfront price of the offering. Does not apply to No Upfront
289      * offerings.</p>
290      */
WithUpfrontPrice(Aws::String && value)291     inline HostOffering& WithUpfrontPrice(Aws::String&& value) { SetUpfrontPrice(std::move(value)); return *this;}
292 
293     /**
294      * <p>The upfront price of the offering. Does not apply to No Upfront
295      * offerings.</p>
296      */
WithUpfrontPrice(const char * value)297     inline HostOffering& WithUpfrontPrice(const char* value) { SetUpfrontPrice(value); return *this;}
298 
299   private:
300 
301     CurrencyCodeValues m_currencyCode;
302     bool m_currencyCodeHasBeenSet;
303 
304     int m_duration;
305     bool m_durationHasBeenSet;
306 
307     Aws::String m_hourlyPrice;
308     bool m_hourlyPriceHasBeenSet;
309 
310     Aws::String m_instanceFamily;
311     bool m_instanceFamilyHasBeenSet;
312 
313     Aws::String m_offeringId;
314     bool m_offeringIdHasBeenSet;
315 
316     PaymentOption m_paymentOption;
317     bool m_paymentOptionHasBeenSet;
318 
319     Aws::String m_upfrontPrice;
320     bool m_upfrontPriceHasBeenSet;
321   };
322 
323 } // namespace Model
324 } // namespace EC2
325 } // namespace Aws
326