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/RecurringChargeFrequency.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 a recurring charge.</p><p><h3>See Also:</h3>   <a
28    * href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RecurringCharge">AWS
29    * API Reference</a></p>
30    */
31   class AWS_EC2_API RecurringCharge
32   {
33   public:
34     RecurringCharge();
35     RecurringCharge(const Aws::Utils::Xml::XmlNode& xmlNode);
36     RecurringCharge& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37 
38     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39     void OutputToStream(Aws::OStream& oStream, const char* location) const;
40 
41 
42     /**
43      * <p>The amount of the recurring charge.</p>
44      */
GetAmount()45     inline double GetAmount() const{ return m_amount; }
46 
47     /**
48      * <p>The amount of the recurring charge.</p>
49      */
AmountHasBeenSet()50     inline bool AmountHasBeenSet() const { return m_amountHasBeenSet; }
51 
52     /**
53      * <p>The amount of the recurring charge.</p>
54      */
SetAmount(double value)55     inline void SetAmount(double value) { m_amountHasBeenSet = true; m_amount = value; }
56 
57     /**
58      * <p>The amount of the recurring charge.</p>
59      */
WithAmount(double value)60     inline RecurringCharge& WithAmount(double value) { SetAmount(value); return *this;}
61 
62 
63     /**
64      * <p>The frequency of the recurring charge.</p>
65      */
GetFrequency()66     inline const RecurringChargeFrequency& GetFrequency() const{ return m_frequency; }
67 
68     /**
69      * <p>The frequency of the recurring charge.</p>
70      */
FrequencyHasBeenSet()71     inline bool FrequencyHasBeenSet() const { return m_frequencyHasBeenSet; }
72 
73     /**
74      * <p>The frequency of the recurring charge.</p>
75      */
SetFrequency(const RecurringChargeFrequency & value)76     inline void SetFrequency(const RecurringChargeFrequency& value) { m_frequencyHasBeenSet = true; m_frequency = value; }
77 
78     /**
79      * <p>The frequency of the recurring charge.</p>
80      */
SetFrequency(RecurringChargeFrequency && value)81     inline void SetFrequency(RecurringChargeFrequency&& value) { m_frequencyHasBeenSet = true; m_frequency = std::move(value); }
82 
83     /**
84      * <p>The frequency of the recurring charge.</p>
85      */
WithFrequency(const RecurringChargeFrequency & value)86     inline RecurringCharge& WithFrequency(const RecurringChargeFrequency& value) { SetFrequency(value); return *this;}
87 
88     /**
89      * <p>The frequency of the recurring charge.</p>
90      */
WithFrequency(RecurringChargeFrequency && value)91     inline RecurringCharge& WithFrequency(RecurringChargeFrequency&& value) { SetFrequency(std::move(value)); return *this;}
92 
93   private:
94 
95     double m_amount;
96     bool m_amountHasBeenSet;
97 
98     RecurringChargeFrequency m_frequency;
99     bool m_frequencyHasBeenSet;
100   };
101 
102 } // namespace Model
103 } // namespace EC2
104 } // namespace Aws
105