AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
Comparable.h
1
6#pragma once
7#include <aws/appmonetization/AppMonetization_EXPORTS.h>
8#include <aws/appmonetization/model/ComparableMechanism.h>
9#include <aws/appmonetization/model/Price.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace AppMonetization {
23namespace Model {
24
33 public:
34 AWS_APPMONETIZATION_API Comparable() = default;
35 AWS_APPMONETIZATION_API Comparable(Aws::Utils::Json::JsonView jsonValue);
36 AWS_APPMONETIZATION_API Comparable& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_APPMONETIZATION_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
45 inline const Aws::String& GetName() const { return m_name; }
46 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
47 template <typename NameT = Aws::String>
48 void SetName(NameT&& value) {
49 m_nameHasBeenSet = true;
50 m_name = std::forward<NameT>(value);
51 }
52 template <typename NameT = Aws::String>
53 Comparable& WithName(NameT&& value) {
54 SetName(std::forward<NameT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetUrl() const { return m_url; }
64 inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
65 template <typename UrlT = Aws::String>
66 void SetUrl(UrlT&& value) {
67 m_urlHasBeenSet = true;
68 m_url = std::forward<UrlT>(value);
69 }
70 template <typename UrlT = Aws::String>
71 Comparable& WithUrl(UrlT&& value) {
72 SetUrl(std::forward<UrlT>(value));
73 return *this;
74 }
76
78
81 inline ComparableMechanism GetMechanism() const { return m_mechanism; }
82 inline bool MechanismHasBeenSet() const { return m_mechanismHasBeenSet; }
83 inline void SetMechanism(ComparableMechanism value) {
84 m_mechanismHasBeenSet = true;
85 m_mechanism = value;
86 }
88 SetMechanism(value);
89 return *this;
90 }
92
94
99 inline const Price& GetPrice() const { return m_price; }
100 inline bool PriceHasBeenSet() const { return m_priceHasBeenSet; }
101 template <typename PriceT = Price>
102 void SetPrice(PriceT&& value) {
103 m_priceHasBeenSet = true;
104 m_price = std::forward<PriceT>(value);
105 }
106 template <typename PriceT = Price>
107 Comparable& WithPrice(PriceT&& value) {
108 SetPrice(std::forward<PriceT>(value));
109 return *this;
110 }
112
114
118 inline double GetCap() const { return m_cap; }
119 inline bool CapHasBeenSet() const { return m_capHasBeenSet; }
120 inline void SetCap(double value) {
121 m_capHasBeenSet = true;
122 m_cap = value;
123 }
124 inline Comparable& WithCap(double value) {
125 SetCap(value);
126 return *this;
127 }
129
131
137 inline double GetIncludedUnits() const { return m_includedUnits; }
138 inline bool IncludedUnitsHasBeenSet() const { return m_includedUnitsHasBeenSet; }
139 inline void SetIncludedUnits(double value) {
140 m_includedUnitsHasBeenSet = true;
141 m_includedUnits = value;
142 }
143 inline Comparable& WithIncludedUnits(double value) {
144 SetIncludedUnits(value);
145 return *this;
146 }
148
150
155 inline double GetOverageRate() const { return m_overageRate; }
156 inline bool OverageRateHasBeenSet() const { return m_overageRateHasBeenSet; }
157 inline void SetOverageRate(double value) {
158 m_overageRateHasBeenSet = true;
159 m_overageRate = value;
160 }
161 inline Comparable& WithOverageRate(double value) {
162 SetOverageRate(value);
163 return *this;
164 }
166
168
171 inline double GetQuality() const { return m_quality; }
172 inline bool QualityHasBeenSet() const { return m_qualityHasBeenSet; }
173 inline void SetQuality(double value) {
174 m_qualityHasBeenSet = true;
175 m_quality = value;
176 }
177 inline Comparable& WithQuality(double value) {
178 SetQuality(value);
179 return *this;
180 }
182
184
188 inline const Aws::Map<Aws::String, double>& GetFeatures() const { return m_features; }
189 inline bool FeaturesHasBeenSet() const { return m_featuresHasBeenSet; }
190 template <typename FeaturesT = Aws::Map<Aws::String, double>>
191 void SetFeatures(FeaturesT&& value) {
192 m_featuresHasBeenSet = true;
193 m_features = std::forward<FeaturesT>(value);
194 }
195 template <typename FeaturesT = Aws::Map<Aws::String, double>>
196 Comparable& WithFeatures(FeaturesT&& value) {
197 SetFeatures(std::forward<FeaturesT>(value));
198 return *this;
199 }
200 inline Comparable& AddFeatures(Aws::String key, double value) {
201 m_featuresHasBeenSet = true;
202 m_features.emplace(key, value);
203 return *this;
204 }
206 private:
207 Aws::String m_name;
208
209 Aws::String m_url;
210
212
213 Price m_price;
214
215 double m_cap{0.0};
216
217 double m_includedUnits{0.0};
218
219 double m_overageRate{0.0};
220
221 double m_quality{0.0};
222
224 bool m_nameHasBeenSet = false;
225 bool m_urlHasBeenSet = false;
226 bool m_mechanismHasBeenSet = false;
227 bool m_priceHasBeenSet = false;
228 bool m_capHasBeenSet = false;
229 bool m_includedUnitsHasBeenSet = false;
230 bool m_overageRateHasBeenSet = false;
231 bool m_qualityHasBeenSet = false;
232 bool m_featuresHasBeenSet = false;
233};
234
235} // namespace Model
236} // namespace AppMonetization
237} // namespace Aws
AWS_APPMONETIZATION_API Aws::Utils::Json::JsonValue Jsonize() const
Comparable & WithCap(double value)
Definition Comparable.h:124
Comparable & WithQuality(double value)
Definition Comparable.h:177
AWS_APPMONETIZATION_API Comparable(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetName() const
Definition Comparable.h:45
Comparable & AddFeatures(Aws::String key, double value)
Definition Comparable.h:200
void SetMechanism(ComparableMechanism value)
Definition Comparable.h:83
ComparableMechanism GetMechanism() const
Definition Comparable.h:81
Comparable & WithMechanism(ComparableMechanism value)
Definition Comparable.h:87
Comparable & WithOverageRate(double value)
Definition Comparable.h:161
const Aws::String & GetUrl() const
Definition Comparable.h:63
Comparable & WithName(NameT &&value)
Definition Comparable.h:53
const Aws::Map< Aws::String, double > & GetFeatures() const
Definition Comparable.h:188
AWS_APPMONETIZATION_API Comparable & operator=(Aws::Utils::Json::JsonView jsonValue)
Comparable & WithUrl(UrlT &&value)
Definition Comparable.h:71
void SetFeatures(FeaturesT &&value)
Definition Comparable.h:191
Comparable & WithIncludedUnits(double value)
Definition Comparable.h:143
Comparable & WithPrice(PriceT &&value)
Definition Comparable.h:107
Comparable & WithFeatures(FeaturesT &&value)
Definition Comparable.h:196
AWS_APPMONETIZATION_API Comparable()=default
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue