AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
SavingsPlanRate.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
10#include <aws/savingsplans/model/CurrencyCode.h>
11#include <aws/savingsplans/model/SavingsPlanProductType.h>
12#include <aws/savingsplans/model/SavingsPlanRateProperty.h>
13#include <aws/savingsplans/model/SavingsPlanRateServiceCode.h>
14#include <aws/savingsplans/model/SavingsPlanRateUnit.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace SavingsPlans {
26namespace Model {
27
34 public:
35 AWS_SAVINGSPLANS_API SavingsPlanRate() = default;
36 AWS_SAVINGSPLANS_API SavingsPlanRate(Aws::Utils::Json::JsonView jsonValue);
37 AWS_SAVINGSPLANS_API SavingsPlanRate& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_SAVINGSPLANS_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline const Aws::String& GetRate() const { return m_rate; }
45 inline bool RateHasBeenSet() const { return m_rateHasBeenSet; }
46 template <typename RateT = Aws::String>
47 void SetRate(RateT&& value) {
48 m_rateHasBeenSet = true;
49 m_rate = std::forward<RateT>(value);
50 }
51 template <typename RateT = Aws::String>
52 SavingsPlanRate& WithRate(RateT&& value) {
53 SetRate(std::forward<RateT>(value));
54 return *this;
55 }
57
59
62 inline CurrencyCode GetCurrency() const { return m_currency; }
63 inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
64 inline void SetCurrency(CurrencyCode value) {
65 m_currencyHasBeenSet = true;
66 m_currency = value;
67 }
69 SetCurrency(value);
70 return *this;
71 }
73
75
78 inline SavingsPlanRateUnit GetUnit() const { return m_unit; }
79 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
80 inline void SetUnit(SavingsPlanRateUnit value) {
81 m_unitHasBeenSet = true;
82 m_unit = value;
83 }
85 SetUnit(value);
86 return *this;
87 }
89
91
94 inline SavingsPlanProductType GetProductType() const { return m_productType; }
95 inline bool ProductTypeHasBeenSet() const { return m_productTypeHasBeenSet; }
97 m_productTypeHasBeenSet = true;
98 m_productType = value;
99 }
101 SetProductType(value);
102 return *this;
103 }
105
107
110 inline SavingsPlanRateServiceCode GetServiceCode() const { return m_serviceCode; }
111 inline bool ServiceCodeHasBeenSet() const { return m_serviceCodeHasBeenSet; }
113 m_serviceCodeHasBeenSet = true;
114 m_serviceCode = value;
115 }
117 SetServiceCode(value);
118 return *this;
119 }
121
123
126 inline const Aws::String& GetUsageType() const { return m_usageType; }
127 inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; }
128 template <typename UsageTypeT = Aws::String>
129 void SetUsageType(UsageTypeT&& value) {
130 m_usageTypeHasBeenSet = true;
131 m_usageType = std::forward<UsageTypeT>(value);
132 }
133 template <typename UsageTypeT = Aws::String>
134 SavingsPlanRate& WithUsageType(UsageTypeT&& value) {
135 SetUsageType(std::forward<UsageTypeT>(value));
136 return *this;
137 }
139
141
145 inline const Aws::String& GetOperation() const { return m_operation; }
146 inline bool OperationHasBeenSet() const { return m_operationHasBeenSet; }
147 template <typename OperationT = Aws::String>
148 void SetOperation(OperationT&& value) {
149 m_operationHasBeenSet = true;
150 m_operation = std::forward<OperationT>(value);
151 }
152 template <typename OperationT = Aws::String>
153 SavingsPlanRate& WithOperation(OperationT&& value) {
154 SetOperation(std::forward<OperationT>(value));
155 return *this;
156 }
158
160
163 inline const Aws::Vector<SavingsPlanRateProperty>& GetProperties() const { return m_properties; }
164 inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
165 template <typename PropertiesT = Aws::Vector<SavingsPlanRateProperty>>
166 void SetProperties(PropertiesT&& value) {
167 m_propertiesHasBeenSet = true;
168 m_properties = std::forward<PropertiesT>(value);
169 }
170 template <typename PropertiesT = Aws::Vector<SavingsPlanRateProperty>>
171 SavingsPlanRate& WithProperties(PropertiesT&& value) {
172 SetProperties(std::forward<PropertiesT>(value));
173 return *this;
174 }
175 template <typename PropertiesT = SavingsPlanRateProperty>
176 SavingsPlanRate& AddProperties(PropertiesT&& value) {
177 m_propertiesHasBeenSet = true;
178 m_properties.emplace_back(std::forward<PropertiesT>(value));
179 return *this;
180 }
182 private:
183 Aws::String m_rate;
184
186
188
190
192
193 Aws::String m_usageType;
194
195 Aws::String m_operation;
196
198 bool m_rateHasBeenSet = false;
199 bool m_currencyHasBeenSet = false;
200 bool m_unitHasBeenSet = false;
201 bool m_productTypeHasBeenSet = false;
202 bool m_serviceCodeHasBeenSet = false;
203 bool m_usageTypeHasBeenSet = false;
204 bool m_operationHasBeenSet = false;
205 bool m_propertiesHasBeenSet = false;
206};
207
208} // namespace Model
209} // namespace SavingsPlans
210} // namespace Aws
SavingsPlanProductType GetProductType() const
AWS_SAVINGSPLANS_API SavingsPlanRate(Aws::Utils::Json::JsonView jsonValue)
SavingsPlanRate & WithCurrency(CurrencyCode value)
SavingsPlanRate & WithProperties(PropertiesT &&value)
SavingsPlanRate & WithOperation(OperationT &&value)
AWS_SAVINGSPLANS_API SavingsPlanRate()=default
AWS_SAVINGSPLANS_API SavingsPlanRate & operator=(Aws::Utils::Json::JsonView jsonValue)
SavingsPlanRate & WithUsageType(UsageTypeT &&value)
SavingsPlanRate & WithRate(RateT &&value)
SavingsPlanRate & WithServiceCode(SavingsPlanRateServiceCode value)
AWS_SAVINGSPLANS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetUnit(SavingsPlanRateUnit value)
const Aws::String & GetOperation() const
SavingsPlanRate & AddProperties(PropertiesT &&value)
SavingsPlanRate & WithUnit(SavingsPlanRateUnit value)
void SetProductType(SavingsPlanProductType value)
void SetServiceCode(SavingsPlanRateServiceCode value)
SavingsPlanRateServiceCode GetServiceCode() const
SavingsPlanRate & WithProductType(SavingsPlanProductType value)
const Aws::String & GetUsageType() const
const Aws::Vector< SavingsPlanRateProperty > & GetProperties() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue