AWS SDK for C++

AWS SDK for C++ Version 1.11.608

Loading...
Searching...
No Matches
CostDriver.h
1
6#pragma once
7#include <aws/ce/CostExplorer_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/ce/model/ComparisonMetricValue.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace CostExplorer
24{
25namespace Model
26{
27
36 {
37 public:
38 AWS_COSTEXPLORER_API CostDriver() = default;
39 AWS_COSTEXPLORER_API CostDriver(Aws::Utils::Json::JsonView jsonValue);
40 AWS_COSTEXPLORER_API CostDriver& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
43
45
52 inline const Aws::String& GetType() const { return m_type; }
53 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
54 template<typename TypeT = Aws::String>
55 void SetType(TypeT&& value) { m_typeHasBeenSet = true; m_type = std::forward<TypeT>(value); }
56 template<typename TypeT = Aws::String>
57 CostDriver& WithType(TypeT&& value) { SetType(std::forward<TypeT>(value)); return *this;}
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) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
68 template<typename NameT = Aws::String>
69 CostDriver& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
71
73
77 inline const Aws::Map<Aws::String, ComparisonMetricValue>& GetMetrics() const { return m_metrics; }
78 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
79 template<typename MetricsT = Aws::Map<Aws::String, ComparisonMetricValue>>
80 void SetMetrics(MetricsT&& value) { m_metricsHasBeenSet = true; m_metrics = std::forward<MetricsT>(value); }
81 template<typename MetricsT = Aws::Map<Aws::String, ComparisonMetricValue>>
82 CostDriver& WithMetrics(MetricsT&& value) { SetMetrics(std::forward<MetricsT>(value)); return *this;}
83 template<typename MetricsKeyT = Aws::String, typename MetricsValueT = ComparisonMetricValue>
84 CostDriver& AddMetrics(MetricsKeyT&& key, MetricsValueT&& value) {
85 m_metricsHasBeenSet = true; m_metrics.emplace(std::forward<MetricsKeyT>(key), std::forward<MetricsValueT>(value)); return *this;
86 }
88 private:
89
90 Aws::String m_type;
91 bool m_typeHasBeenSet = false;
92
93 Aws::String m_name;
94 bool m_nameHasBeenSet = false;
95
97 bool m_metricsHasBeenSet = false;
98 };
99
100} // namespace Model
101} // namespace CostExplorer
102} // namespace Aws
AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetMetrics(MetricsT &&value)
Definition CostDriver.h:80
AWS_COSTEXPLORER_API CostDriver(Aws::Utils::Json::JsonView jsonValue)
CostDriver & WithType(TypeT &&value)
Definition CostDriver.h:57
CostDriver & WithMetrics(MetricsT &&value)
Definition CostDriver.h:82
const Aws::String & GetName() const
Definition CostDriver.h:64
AWS_COSTEXPLORER_API CostDriver()=default
const Aws::String & GetType() const
Definition CostDriver.h:52
AWS_COSTEXPLORER_API CostDriver & operator=(Aws::Utils::Json::JsonView jsonValue)
CostDriver & AddMetrics(MetricsKeyT &&key, MetricsValueT &&value)
Definition CostDriver.h:84
const Aws::Map< Aws::String, ComparisonMetricValue > & GetMetrics() const
Definition CostDriver.h:77
CostDriver & WithName(NameT &&value)
Definition CostDriver.h:69
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