AWS SDK for C++

AWS SDK for C++ Version 1.11.741

Loading...
Searching...
No Matches
Cost.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/resiliencehub/ResilienceHub_EXPORTS.h>
9#include <aws/resiliencehub/model/CostFrequency.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace ResilienceHub {
21namespace Model {
22
28class Cost {
29 public:
30 AWS_RESILIENCEHUB_API Cost() = default;
31 AWS_RESILIENCEHUB_API Cost(Aws::Utils::Json::JsonView jsonValue);
32 AWS_RESILIENCEHUB_API Cost& operator=(Aws::Utils::Json::JsonView jsonValue);
33 AWS_RESILIENCEHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
34
36
39 inline double GetAmount() const { return m_amount; }
40 inline bool AmountHasBeenSet() const { return m_amountHasBeenSet; }
41 inline void SetAmount(double value) {
42 m_amountHasBeenSet = true;
43 m_amount = value;
44 }
45 inline Cost& WithAmount(double value) {
46 SetAmount(value);
47 return *this;
48 }
50
52
55 inline const Aws::String& GetCurrency() const { return m_currency; }
56 inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
57 template <typename CurrencyT = Aws::String>
58 void SetCurrency(CurrencyT&& value) {
59 m_currencyHasBeenSet = true;
60 m_currency = std::forward<CurrencyT>(value);
61 }
62 template <typename CurrencyT = Aws::String>
63 Cost& WithCurrency(CurrencyT&& value) {
64 SetCurrency(std::forward<CurrencyT>(value));
65 return *this;
66 }
68
70
73 inline CostFrequency GetFrequency() const { return m_frequency; }
74 inline bool FrequencyHasBeenSet() const { return m_frequencyHasBeenSet; }
75 inline void SetFrequency(CostFrequency value) {
76 m_frequencyHasBeenSet = true;
77 m_frequency = value;
78 }
80 SetFrequency(value);
81 return *this;
82 }
84 private:
85 double m_amount{0.0};
86
87 Aws::String m_currency;
88
90 bool m_amountHasBeenSet = false;
91 bool m_currencyHasBeenSet = false;
92 bool m_frequencyHasBeenSet = false;
93};
94
95} // namespace Model
96} // namespace ResilienceHub
97} // namespace Aws
AWS_RESILIENCEHUB_API Cost & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetCurrency() const
Definition Cost.h:55
CostFrequency GetFrequency() const
Definition Cost.h:73
void SetCurrency(CurrencyT &&value)
Definition Cost.h:58
bool FrequencyHasBeenSet() const
Definition Cost.h:74
void SetAmount(double value)
Definition Cost.h:41
bool AmountHasBeenSet() const
Definition Cost.h:40
Cost & WithCurrency(CurrencyT &&value)
Definition Cost.h:63
bool CurrencyHasBeenSet() const
Definition Cost.h:56
Cost & WithAmount(double value)
Definition Cost.h:45
AWS_RESILIENCEHUB_API Cost()=default
Cost & WithFrequency(CostFrequency value)
Definition Cost.h:79
void SetFrequency(CostFrequency value)
Definition Cost.h:75
AWS_RESILIENCEHUB_API Cost(Aws::Utils::Json::JsonView jsonValue)
double GetAmount() const
Definition Cost.h:39
AWS_RESILIENCEHUB_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue