AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
EstimateByTime.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/lightsail/model/Currency.h>
9#include <aws/lightsail/model/PricingUnit.h>
10#include <aws/lightsail/model/TimePeriod.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace Lightsail {
22namespace Model {
23
31 public:
32 AWS_LIGHTSAIL_API EstimateByTime() = default;
33 AWS_LIGHTSAIL_API EstimateByTime(Aws::Utils::Json::JsonView jsonValue);
35 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline double GetUsageCost() const { return m_usageCost; }
42 inline bool UsageCostHasBeenSet() const { return m_usageCostHasBeenSet; }
43 inline void SetUsageCost(double value) {
44 m_usageCostHasBeenSet = true;
45 m_usageCost = value;
46 }
47 inline EstimateByTime& WithUsageCost(double value) {
48 SetUsageCost(value);
49 return *this;
50 }
52
54
57 inline PricingUnit GetPricingUnit() const { return m_pricingUnit; }
58 inline bool PricingUnitHasBeenSet() const { return m_pricingUnitHasBeenSet; }
59 inline void SetPricingUnit(PricingUnit value) {
60 m_pricingUnitHasBeenSet = true;
61 m_pricingUnit = value;
62 }
64 SetPricingUnit(value);
65 return *this;
66 }
68
70
74 inline double GetUnit() const { return m_unit; }
75 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
76 inline void SetUnit(double value) {
77 m_unitHasBeenSet = true;
78 m_unit = value;
79 }
80 inline EstimateByTime& WithUnit(double value) {
81 SetUnit(value);
82 return *this;
83 }
85
87
90 inline Currency GetCurrency() const { return m_currency; }
91 inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
92 inline void SetCurrency(Currency value) {
93 m_currencyHasBeenSet = true;
94 m_currency = value;
95 }
97 SetCurrency(value);
98 return *this;
99 }
101
103
107 inline const TimePeriod& GetTimePeriod() const { return m_timePeriod; }
108 inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; }
109 template <typename TimePeriodT = TimePeriod>
110 void SetTimePeriod(TimePeriodT&& value) {
111 m_timePeriodHasBeenSet = true;
112 m_timePeriod = std::forward<TimePeriodT>(value);
113 }
114 template <typename TimePeriodT = TimePeriod>
115 EstimateByTime& WithTimePeriod(TimePeriodT&& value) {
116 SetTimePeriod(std::forward<TimePeriodT>(value));
117 return *this;
118 }
120 private:
121 double m_usageCost{0.0};
122 bool m_usageCostHasBeenSet = false;
123
124 PricingUnit m_pricingUnit{PricingUnit::NOT_SET};
125 bool m_pricingUnitHasBeenSet = false;
126
127 double m_unit{0.0};
128 bool m_unitHasBeenSet = false;
129
130 Currency m_currency{Currency::NOT_SET};
131 bool m_currencyHasBeenSet = false;
132
133 TimePeriod m_timePeriod;
134 bool m_timePeriodHasBeenSet = false;
135};
136
137} // namespace Model
138} // namespace Lightsail
139} // namespace Aws
EstimateByTime & WithTimePeriod(TimePeriodT &&value)
EstimateByTime & WithUnit(double value)
AWS_LIGHTSAIL_API EstimateByTime(Aws::Utils::Json::JsonView jsonValue)
AWS_LIGHTSAIL_API EstimateByTime & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
void SetTimePeriod(TimePeriodT &&value)
EstimateByTime & WithCurrency(Currency value)
AWS_LIGHTSAIL_API EstimateByTime()=default
EstimateByTime & WithPricingUnit(PricingUnit value)
EstimateByTime & WithUsageCost(double value)
const TimePeriod & GetTimePeriod() const
void SetPricingUnit(PricingUnit value)
Aws::Utils::Json::JsonValue JsonValue