AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CostDriver.h
1
6#pragma once
7#include <aws/ce/CostExplorer_EXPORTS.h>
8#include <aws/ce/model/ComparisonMetricValue.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace CostExplorer {
22namespace Model {
23
32 public:
33 AWS_COSTEXPLORER_API CostDriver() = default;
34 AWS_COSTEXPLORER_API CostDriver(Aws::Utils::Json::JsonView jsonValue);
35 AWS_COSTEXPLORER_API CostDriver& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
46 inline const Aws::String& GetType() const { return m_type; }
47 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
48 template <typename TypeT = Aws::String>
49 void SetType(TypeT&& value) {
50 m_typeHasBeenSet = true;
51 m_type = std::forward<TypeT>(value);
52 }
53 template <typename TypeT = Aws::String>
54 CostDriver& WithType(TypeT&& value) {
55 SetType(std::forward<TypeT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetName() const { return m_name; }
65 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
66 template <typename NameT = Aws::String>
67 void SetName(NameT&& value) {
68 m_nameHasBeenSet = true;
69 m_name = std::forward<NameT>(value);
70 }
71 template <typename NameT = Aws::String>
72 CostDriver& WithName(NameT&& value) {
73 SetName(std::forward<NameT>(value));
74 return *this;
75 }
77
79
83 inline const Aws::Map<Aws::String, ComparisonMetricValue>& GetMetrics() const { return m_metrics; }
84 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
85 template <typename MetricsT = Aws::Map<Aws::String, ComparisonMetricValue>>
86 void SetMetrics(MetricsT&& value) {
87 m_metricsHasBeenSet = true;
88 m_metrics = std::forward<MetricsT>(value);
89 }
90 template <typename MetricsT = Aws::Map<Aws::String, ComparisonMetricValue>>
91 CostDriver& WithMetrics(MetricsT&& value) {
92 SetMetrics(std::forward<MetricsT>(value));
93 return *this;
94 }
95 template <typename MetricsKeyT = Aws::String, typename MetricsValueT = ComparisonMetricValue>
96 CostDriver& AddMetrics(MetricsKeyT&& key, MetricsValueT&& value) {
97 m_metricsHasBeenSet = true;
98 m_metrics.emplace(std::forward<MetricsKeyT>(key), std::forward<MetricsValueT>(value));
99 return *this;
100 }
102 private:
103 Aws::String m_type;
104
105 Aws::String m_name;
106
108 bool m_typeHasBeenSet = false;
109 bool m_nameHasBeenSet = false;
110 bool m_metricsHasBeenSet = false;
111};
112
113} // namespace Model
114} // namespace CostExplorer
115} // namespace Aws
AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetMetrics(MetricsT &&value)
Definition CostDriver.h:86
AWS_COSTEXPLORER_API CostDriver(Aws::Utils::Json::JsonView jsonValue)
CostDriver & WithType(TypeT &&value)
Definition CostDriver.h:54
CostDriver & WithMetrics(MetricsT &&value)
Definition CostDriver.h:91
const Aws::String & GetName() const
Definition CostDriver.h:64
AWS_COSTEXPLORER_API CostDriver()=default
const Aws::String & GetType() const
Definition CostDriver.h:46
AWS_COSTEXPLORER_API CostDriver & operator=(Aws::Utils::Json::JsonView jsonValue)
CostDriver & AddMetrics(MetricsKeyT &&key, MetricsValueT &&value)
Definition CostDriver.h:96
const Aws::Map< Aws::String, ComparisonMetricValue > & GetMetrics() const
Definition CostDriver.h:83
CostDriver & WithName(NameT &&value)
Definition CostDriver.h:72
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