AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Usage.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/cost-optimization-hub/CostOptimizationHub_EXPORTS.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace CostOptimizationHub {
20namespace Model {
21
27class Usage {
28 public:
29 AWS_COSTOPTIMIZATIONHUB_API Usage() = default;
30 AWS_COSTOPTIMIZATIONHUB_API Usage(Aws::Utils::Json::JsonView jsonValue);
31 AWS_COSTOPTIMIZATIONHUB_API Usage& operator=(Aws::Utils::Json::JsonView jsonValue);
32 AWS_COSTOPTIMIZATIONHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
33
35
38 inline const Aws::String& GetUsageType() const { return m_usageType; }
39 inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; }
40 template <typename UsageTypeT = Aws::String>
41 void SetUsageType(UsageTypeT&& value) {
42 m_usageTypeHasBeenSet = true;
43 m_usageType = std::forward<UsageTypeT>(value);
44 }
45 template <typename UsageTypeT = Aws::String>
46 Usage& WithUsageType(UsageTypeT&& value) {
47 SetUsageType(std::forward<UsageTypeT>(value));
48 return *this;
49 }
51
53
56 inline double GetUsageAmount() const { return m_usageAmount; }
57 inline bool UsageAmountHasBeenSet() const { return m_usageAmountHasBeenSet; }
58 inline void SetUsageAmount(double value) {
59 m_usageAmountHasBeenSet = true;
60 m_usageAmount = value;
61 }
62 inline Usage& WithUsageAmount(double value) {
63 SetUsageAmount(value);
64 return *this;
65 }
67
69
72 inline const Aws::String& GetOperation() const { return m_operation; }
73 inline bool OperationHasBeenSet() const { return m_operationHasBeenSet; }
74 template <typename OperationT = Aws::String>
75 void SetOperation(OperationT&& value) {
76 m_operationHasBeenSet = true;
77 m_operation = std::forward<OperationT>(value);
78 }
79 template <typename OperationT = Aws::String>
80 Usage& WithOperation(OperationT&& value) {
81 SetOperation(std::forward<OperationT>(value));
82 return *this;
83 }
85
87
90 inline const Aws::String& GetProductCode() const { return m_productCode; }
91 inline bool ProductCodeHasBeenSet() const { return m_productCodeHasBeenSet; }
92 template <typename ProductCodeT = Aws::String>
93 void SetProductCode(ProductCodeT&& value) {
94 m_productCodeHasBeenSet = true;
95 m_productCode = std::forward<ProductCodeT>(value);
96 }
97 template <typename ProductCodeT = Aws::String>
98 Usage& WithProductCode(ProductCodeT&& value) {
99 SetProductCode(std::forward<ProductCodeT>(value));
100 return *this;
101 }
103
105
108 inline const Aws::String& GetUnit() const { return m_unit; }
109 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
110 template <typename UnitT = Aws::String>
111 void SetUnit(UnitT&& value) {
112 m_unitHasBeenSet = true;
113 m_unit = std::forward<UnitT>(value);
114 }
115 template <typename UnitT = Aws::String>
116 Usage& WithUnit(UnitT&& value) {
117 SetUnit(std::forward<UnitT>(value));
118 return *this;
119 }
121 private:
122 Aws::String m_usageType;
123
124 double m_usageAmount{0.0};
125
126 Aws::String m_operation;
127
128 Aws::String m_productCode;
129
130 Aws::String m_unit;
131 bool m_usageTypeHasBeenSet = false;
132 bool m_usageAmountHasBeenSet = false;
133 bool m_operationHasBeenSet = false;
134 bool m_productCodeHasBeenSet = false;
135 bool m_unitHasBeenSet = false;
136};
137
138} // namespace Model
139} // namespace CostOptimizationHub
140} // namespace Aws
const Aws::String & GetUsageType() const
Definition Usage.h:38
Usage & WithUsageType(UsageTypeT &&value)
Definition Usage.h:46
void SetUsageType(UsageTypeT &&value)
Definition Usage.h:41
AWS_COSTOPTIMIZATIONHUB_API Usage & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetProductCode(ProductCodeT &&value)
Definition Usage.h:93
const Aws::String & GetUnit() const
Definition Usage.h:108
AWS_COSTOPTIMIZATIONHUB_API Usage()=default
AWS_COSTOPTIMIZATIONHUB_API Aws::Utils::Json::JsonValue Jsonize() const
void SetUsageAmount(double value)
Definition Usage.h:58
Usage & WithUnit(UnitT &&value)
Definition Usage.h:116
const Aws::String & GetProductCode() const
Definition Usage.h:90
const Aws::String & GetOperation() const
Definition Usage.h:72
Usage & WithProductCode(ProductCodeT &&value)
Definition Usage.h:98
Usage & WithUsageAmount(double value)
Definition Usage.h:62
void SetOperation(OperationT &&value)
Definition Usage.h:75
AWS_COSTOPTIMIZATIONHUB_API Usage(Aws::Utils::Json::JsonView jsonValue)
Usage & WithOperation(OperationT &&value)
Definition Usage.h:80
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue