AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
Reservation.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/medialive/MediaLive_EXPORTS.h>
10#include <aws/medialive/model/OfferingDurationUnits.h>
11#include <aws/medialive/model/OfferingType.h>
12#include <aws/medialive/model/RenewalSettings.h>
13#include <aws/medialive/model/ReservationResourceSpecification.h>
14#include <aws/medialive/model/ReservationState.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace MediaLive {
26namespace Model {
27
34 public:
35 AWS_MEDIALIVE_API Reservation() = default;
36 AWS_MEDIALIVE_API Reservation(Aws::Utils::Json::JsonView jsonValue);
37 AWS_MEDIALIVE_API Reservation& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_MEDIALIVE_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
45 inline const Aws::String& GetArn() const { return m_arn; }
46 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
47 template <typename ArnT = Aws::String>
48 void SetArn(ArnT&& value) {
49 m_arnHasBeenSet = true;
50 m_arn = std::forward<ArnT>(value);
51 }
52 template <typename ArnT = Aws::String>
53 Reservation& WithArn(ArnT&& value) {
54 SetArn(std::forward<ArnT>(value));
55 return *this;
56 }
58
60
63 inline int GetCount() const { return m_count; }
64 inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
65 inline void SetCount(int value) {
66 m_countHasBeenSet = true;
67 m_count = value;
68 }
69 inline Reservation& WithCount(int value) {
70 SetCount(value);
71 return *this;
72 }
74
76
79 inline const Aws::String& GetCurrencyCode() const { return m_currencyCode; }
80 inline bool CurrencyCodeHasBeenSet() const { return m_currencyCodeHasBeenSet; }
81 template <typename CurrencyCodeT = Aws::String>
82 void SetCurrencyCode(CurrencyCodeT&& value) {
83 m_currencyCodeHasBeenSet = true;
84 m_currencyCode = std::forward<CurrencyCodeT>(value);
85 }
86 template <typename CurrencyCodeT = Aws::String>
87 Reservation& WithCurrencyCode(CurrencyCodeT&& value) {
88 SetCurrencyCode(std::forward<CurrencyCodeT>(value));
89 return *this;
90 }
92
94
97 inline int GetDuration() const { return m_duration; }
98 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
99 inline void SetDuration(int value) {
100 m_durationHasBeenSet = true;
101 m_duration = value;
102 }
103 inline Reservation& WithDuration(int value) {
104 SetDuration(value);
105 return *this;
106 }
108
110
113 inline OfferingDurationUnits GetDurationUnits() const { return m_durationUnits; }
114 inline bool DurationUnitsHasBeenSet() const { return m_durationUnitsHasBeenSet; }
116 m_durationUnitsHasBeenSet = true;
117 m_durationUnits = value;
118 }
120 SetDurationUnits(value);
121 return *this;
122 }
124
126
129 inline const Aws::String& GetEnd() const { return m_end; }
130 inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
131 template <typename EndT = Aws::String>
132 void SetEnd(EndT&& value) {
133 m_endHasBeenSet = true;
134 m_end = std::forward<EndT>(value);
135 }
136 template <typename EndT = Aws::String>
137 Reservation& WithEnd(EndT&& value) {
138 SetEnd(std::forward<EndT>(value));
139 return *this;
140 }
142
144
147 inline double GetFixedPrice() const { return m_fixedPrice; }
148 inline bool FixedPriceHasBeenSet() const { return m_fixedPriceHasBeenSet; }
149 inline void SetFixedPrice(double value) {
150 m_fixedPriceHasBeenSet = true;
151 m_fixedPrice = value;
152 }
153 inline Reservation& WithFixedPrice(double value) {
154 SetFixedPrice(value);
155 return *this;
156 }
158
160
163 inline const Aws::String& GetName() const { return m_name; }
164 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
165 template <typename NameT = Aws::String>
166 void SetName(NameT&& value) {
167 m_nameHasBeenSet = true;
168 m_name = std::forward<NameT>(value);
169 }
170 template <typename NameT = Aws::String>
171 Reservation& WithName(NameT&& value) {
172 SetName(std::forward<NameT>(value));
173 return *this;
174 }
176
178
182 inline const Aws::String& GetOfferingDescription() const { return m_offeringDescription; }
183 inline bool OfferingDescriptionHasBeenSet() const { return m_offeringDescriptionHasBeenSet; }
184 template <typename OfferingDescriptionT = Aws::String>
185 void SetOfferingDescription(OfferingDescriptionT&& value) {
186 m_offeringDescriptionHasBeenSet = true;
187 m_offeringDescription = std::forward<OfferingDescriptionT>(value);
188 }
189 template <typename OfferingDescriptionT = Aws::String>
190 Reservation& WithOfferingDescription(OfferingDescriptionT&& value) {
191 SetOfferingDescription(std::forward<OfferingDescriptionT>(value));
192 return *this;
193 }
195
197
200 inline const Aws::String& GetOfferingId() const { return m_offeringId; }
201 inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
202 template <typename OfferingIdT = Aws::String>
203 void SetOfferingId(OfferingIdT&& value) {
204 m_offeringIdHasBeenSet = true;
205 m_offeringId = std::forward<OfferingIdT>(value);
206 }
207 template <typename OfferingIdT = Aws::String>
208 Reservation& WithOfferingId(OfferingIdT&& value) {
209 SetOfferingId(std::forward<OfferingIdT>(value));
210 return *this;
211 }
213
215
218 inline OfferingType GetOfferingType() const { return m_offeringType; }
219 inline bool OfferingTypeHasBeenSet() const { return m_offeringTypeHasBeenSet; }
220 inline void SetOfferingType(OfferingType value) {
221 m_offeringTypeHasBeenSet = true;
222 m_offeringType = value;
223 }
225 SetOfferingType(value);
226 return *this;
227 }
229
231
234 inline const Aws::String& GetRegion() const { return m_region; }
235 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
236 template <typename RegionT = Aws::String>
237 void SetRegion(RegionT&& value) {
238 m_regionHasBeenSet = true;
239 m_region = std::forward<RegionT>(value);
240 }
241 template <typename RegionT = Aws::String>
242 Reservation& WithRegion(RegionT&& value) {
243 SetRegion(std::forward<RegionT>(value));
244 return *this;
245 }
247
249
252 inline const RenewalSettings& GetRenewalSettings() const { return m_renewalSettings; }
253 inline bool RenewalSettingsHasBeenSet() const { return m_renewalSettingsHasBeenSet; }
254 template <typename RenewalSettingsT = RenewalSettings>
255 void SetRenewalSettings(RenewalSettingsT&& value) {
256 m_renewalSettingsHasBeenSet = true;
257 m_renewalSettings = std::forward<RenewalSettingsT>(value);
258 }
259 template <typename RenewalSettingsT = RenewalSettings>
260 Reservation& WithRenewalSettings(RenewalSettingsT&& value) {
261 SetRenewalSettings(std::forward<RenewalSettingsT>(value));
262 return *this;
263 }
265
267
270 inline const Aws::String& GetReservationId() const { return m_reservationId; }
271 inline bool ReservationIdHasBeenSet() const { return m_reservationIdHasBeenSet; }
272 template <typename ReservationIdT = Aws::String>
273 void SetReservationId(ReservationIdT&& value) {
274 m_reservationIdHasBeenSet = true;
275 m_reservationId = std::forward<ReservationIdT>(value);
276 }
277 template <typename ReservationIdT = Aws::String>
278 Reservation& WithReservationId(ReservationIdT&& value) {
279 SetReservationId(std::forward<ReservationIdT>(value));
280 return *this;
281 }
283
285
288 inline const ReservationResourceSpecification& GetResourceSpecification() const { return m_resourceSpecification; }
289 inline bool ResourceSpecificationHasBeenSet() const { return m_resourceSpecificationHasBeenSet; }
290 template <typename ResourceSpecificationT = ReservationResourceSpecification>
291 void SetResourceSpecification(ResourceSpecificationT&& value) {
292 m_resourceSpecificationHasBeenSet = true;
293 m_resourceSpecification = std::forward<ResourceSpecificationT>(value);
294 }
295 template <typename ResourceSpecificationT = ReservationResourceSpecification>
296 Reservation& WithResourceSpecification(ResourceSpecificationT&& value) {
297 SetResourceSpecification(std::forward<ResourceSpecificationT>(value));
298 return *this;
299 }
301
303
307 inline const Aws::String& GetStart() const { return m_start; }
308 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
309 template <typename StartT = Aws::String>
310 void SetStart(StartT&& value) {
311 m_startHasBeenSet = true;
312 m_start = std::forward<StartT>(value);
313 }
314 template <typename StartT = Aws::String>
315 Reservation& WithStart(StartT&& value) {
316 SetStart(std::forward<StartT>(value));
317 return *this;
318 }
320
322
325 inline ReservationState GetState() const { return m_state; }
326 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
327 inline void SetState(ReservationState value) {
328 m_stateHasBeenSet = true;
329 m_state = value;
330 }
332 SetState(value);
333 return *this;
334 }
336
338
341 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
342 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
343 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
344 void SetTags(TagsT&& value) {
345 m_tagsHasBeenSet = true;
346 m_tags = std::forward<TagsT>(value);
347 }
348 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
349 Reservation& WithTags(TagsT&& value) {
350 SetTags(std::forward<TagsT>(value));
351 return *this;
352 }
353 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
354 Reservation& AddTags(TagsKeyT&& key, TagsValueT&& value) {
355 m_tagsHasBeenSet = true;
356 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
357 return *this;
358 }
360
362
365 inline double GetUsagePrice() const { return m_usagePrice; }
366 inline bool UsagePriceHasBeenSet() const { return m_usagePriceHasBeenSet; }
367 inline void SetUsagePrice(double value) {
368 m_usagePriceHasBeenSet = true;
369 m_usagePrice = value;
370 }
371 inline Reservation& WithUsagePrice(double value) {
372 SetUsagePrice(value);
373 return *this;
374 }
376 private:
377 Aws::String m_arn;
378
379 int m_count{0};
380
381 Aws::String m_currencyCode;
382
383 int m_duration{0};
384
386
387 Aws::String m_end;
388
389 double m_fixedPrice{0.0};
390
391 Aws::String m_name;
392
393 Aws::String m_offeringDescription;
394
395 Aws::String m_offeringId;
396
397 OfferingType m_offeringType{OfferingType::NOT_SET};
398
399 Aws::String m_region;
400
401 RenewalSettings m_renewalSettings;
402
403 Aws::String m_reservationId;
404
405 ReservationResourceSpecification m_resourceSpecification;
406
407 Aws::String m_start;
408
410
412
413 double m_usagePrice{0.0};
414 bool m_arnHasBeenSet = false;
415 bool m_countHasBeenSet = false;
416 bool m_currencyCodeHasBeenSet = false;
417 bool m_durationHasBeenSet = false;
418 bool m_durationUnitsHasBeenSet = false;
419 bool m_endHasBeenSet = false;
420 bool m_fixedPriceHasBeenSet = false;
421 bool m_nameHasBeenSet = false;
422 bool m_offeringDescriptionHasBeenSet = false;
423 bool m_offeringIdHasBeenSet = false;
424 bool m_offeringTypeHasBeenSet = false;
425 bool m_regionHasBeenSet = false;
426 bool m_renewalSettingsHasBeenSet = false;
427 bool m_reservationIdHasBeenSet = false;
428 bool m_resourceSpecificationHasBeenSet = false;
429 bool m_startHasBeenSet = false;
430 bool m_stateHasBeenSet = false;
431 bool m_tagsHasBeenSet = false;
432 bool m_usagePriceHasBeenSet = false;
433};
434
435} // namespace Model
436} // namespace MediaLive
437} // namespace Aws
Reservation & WithArn(ArnT &&value)
Definition Reservation.h:53
AWS_MEDIALIVE_API Reservation & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_MEDIALIVE_API Aws::Utils::Json::JsonValue Jsonize() const
void SetOfferingId(OfferingIdT &&value)
Reservation & WithTags(TagsT &&value)
Reservation & WithStart(StartT &&value)
void SetRegion(RegionT &&value)
Reservation & WithName(NameT &&value)
const Aws::String & GetName() const
Reservation & WithCount(int value)
Definition Reservation.h:69
AWS_MEDIALIVE_API Reservation(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetCurrencyCode() const
Definition Reservation.h:79
OfferingDurationUnits GetDurationUnits() const
Reservation & WithOfferingDescription(OfferingDescriptionT &&value)
void SetCurrencyCode(CurrencyCodeT &&value)
Definition Reservation.h:82
void SetDurationUnits(OfferingDurationUnits value)
Reservation & AddTags(TagsKeyT &&key, TagsValueT &&value)
void SetResourceSpecification(ResourceSpecificationT &&value)
const Aws::String & GetRegion() const
const Aws::String & GetOfferingDescription() const
void SetOfferingType(OfferingType value)
const Aws::String & GetStart() const
OfferingType GetOfferingType() const
Reservation & WithState(ReservationState value)
Reservation & WithResourceSpecification(ResourceSpecificationT &&value)
Reservation & WithFixedPrice(double value)
Reservation & WithEnd(EndT &&value)
void SetState(ReservationState value)
AWS_MEDIALIVE_API Reservation()=default
const Aws::String & GetArn() const
Definition Reservation.h:45
Reservation & WithDuration(int value)
const RenewalSettings & GetRenewalSettings() const
Reservation & WithRenewalSettings(RenewalSettingsT &&value)
Reservation & WithReservationId(ReservationIdT &&value)
const Aws::String & GetEnd() const
Reservation & WithCurrencyCode(CurrencyCodeT &&value)
Definition Reservation.h:87
Reservation & WithUsagePrice(double value)
Reservation & WithOfferingType(OfferingType value)
void SetReservationId(ReservationIdT &&value)
Reservation & WithOfferingId(OfferingIdT &&value)
const Aws::String & GetReservationId() const
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Reservation & WithDurationUnits(OfferingDurationUnits value)
const ReservationResourceSpecification & GetResourceSpecification() const
Reservation & WithRegion(RegionT &&value)
ReservationState GetState() const
void SetOfferingDescription(OfferingDescriptionT &&value)
void SetRenewalSettings(RenewalSettingsT &&value)
const Aws::String & GetOfferingId() const
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