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 <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Xml
17 {
18   class XmlNode;
19 } // namespace Xml
20 } // namespace Utils
21 namespace EC2
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Describes the limit price of a Reserved Instance offering.</p><p><h3>See
28    * Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReservedInstanceLimitPrice">AWS
30    * API Reference</a></p>
31    */
32   class AWS_EC2_API ReservedInstanceLimitPrice
33   {
34   public:
35     ReservedInstanceLimitPrice();
36     ReservedInstanceLimitPrice(const Aws::Utils::Xml::XmlNode& xmlNode);
37     ReservedInstanceLimitPrice& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
38 
39     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40     void OutputToStream(Aws::OStream& oStream, const char* location) const;
41 
42 
43     /**
44      * <p>Used for Reserved Instance Marketplace offerings. Specifies the limit price
45      * on the total order (instanceCount * price).</p>
46      */
GetAmount()47     inline double GetAmount() const{ return m_amount; }
48 
49     /**
50      * <p>Used for Reserved Instance Marketplace offerings. Specifies the limit price
51      * on the total order (instanceCount * price).</p>
52      */
AmountHasBeenSet()53     inline bool AmountHasBeenSet() const { return m_amountHasBeenSet; }
54 
55     /**
56      * <p>Used for Reserved Instance Marketplace offerings. Specifies the limit price
57      * on the total order (instanceCount * price).</p>
58      */
SetAmount(double value)59     inline void SetAmount(double value) { m_amountHasBeenSet = true; m_amount = value; }
60 
61     /**
62      * <p>Used for Reserved Instance Marketplace offerings. Specifies the limit price
63      * on the total order (instanceCount * price).</p>
64      */
WithAmount(double value)65     inline ReservedInstanceLimitPrice& WithAmount(double value) { SetAmount(value); return *this;}
66 
67 
68     /**
69      * <p>The currency in which the <code>limitPrice</code> amount is specified. At
70      * this time, the only supported currency is <code>USD</code>.</p>
71      */
GetCurrencyCode()72     inline const CurrencyCodeValues& GetCurrencyCode() const{ return m_currencyCode; }
73 
74     /**
75      * <p>The currency in which the <code>limitPrice</code> amount is specified. At
76      * this time, the only supported currency is <code>USD</code>.</p>
77      */
CurrencyCodeHasBeenSet()78     inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
79 
80     /**
81      * <p>The currency in which the <code>limitPrice</code> amount is specified. At
82      * this time, the only supported currency is <code>USD</code>.</p>
83      */
SetCurrencyCode(const CurrencyCodeValues & value)84     inline void SetCurrencyCode(const CurrencyCodeValues& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = value; }
85 
86     /**
87      * <p>The currency in which the <code>limitPrice</code> amount is specified. At
88      * this time, the only supported currency is <code>USD</code>.</p>
89      */
SetCurrencyCode(CurrencyCodeValues && value)90     inline void SetCurrencyCode(CurrencyCodeValues&& value) { m_currencyCodeHasBeenSet = true; m_currencyCode = std::move(value); }
91 
92     /**
93      * <p>The currency in which the <code>limitPrice</code> amount is specified. At
94      * this time, the only supported currency is <code>USD</code>.</p>
95      */
WithCurrencyCode(const CurrencyCodeValues & value)96     inline ReservedInstanceLimitPrice& WithCurrencyCode(const CurrencyCodeValues& value) { SetCurrencyCode(value); return *this;}
97 
98     /**
99      * <p>The currency in which the <code>limitPrice</code> amount is specified. At
100      * this time, the only supported currency is <code>USD</code>.</p>
101      */
WithCurrencyCode(CurrencyCodeValues && value)102     inline ReservedInstanceLimitPrice& WithCurrencyCode(CurrencyCodeValues&& value) { SetCurrencyCode(std::move(value)); return *this;}
103 
104   private:
105 
106     double m_amount;
107     bool m_amountHasBeenSet;
108 
109     CurrencyCodeValues m_currencyCode;
110     bool m_currencyCodeHasBeenSet;
111   };
112 
113 } // namespace Model
114 } // namespace EC2
115 } // namespace Aws
116