AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
Group.h
1
6#pragma once
7#include <aws/ce/CostExplorer_EXPORTS.h>
8#include <aws/ce/model/MetricValue.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace CostExplorer {
23namespace Model {
24
30class Group {
31 public:
32 AWS_COSTEXPLORER_API Group() = default;
33 AWS_COSTEXPLORER_API Group(Aws::Utils::Json::JsonView jsonValue);
34 AWS_COSTEXPLORER_API Group& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::Vector<Aws::String>& GetKeys() const { return m_keys; }
42 inline bool KeysHasBeenSet() const { return m_keysHasBeenSet; }
43 template <typename KeysT = Aws::Vector<Aws::String>>
44 void SetKeys(KeysT&& value) {
45 m_keysHasBeenSet = true;
46 m_keys = std::forward<KeysT>(value);
47 }
48 template <typename KeysT = Aws::Vector<Aws::String>>
49 Group& WithKeys(KeysT&& value) {
50 SetKeys(std::forward<KeysT>(value));
51 return *this;
52 }
53 template <typename KeysT = Aws::String>
54 Group& AddKeys(KeysT&& value) {
55 m_keysHasBeenSet = true;
56 m_keys.emplace_back(std::forward<KeysT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::Map<Aws::String, MetricValue>& GetMetrics() const { return m_metrics; }
66 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
67 template <typename MetricsT = Aws::Map<Aws::String, MetricValue>>
68 void SetMetrics(MetricsT&& value) {
69 m_metricsHasBeenSet = true;
70 m_metrics = std::forward<MetricsT>(value);
71 }
72 template <typename MetricsT = Aws::Map<Aws::String, MetricValue>>
73 Group& WithMetrics(MetricsT&& value) {
74 SetMetrics(std::forward<MetricsT>(value));
75 return *this;
76 }
77 template <typename MetricsKeyT = Aws::String, typename MetricsValueT = MetricValue>
78 Group& AddMetrics(MetricsKeyT&& key, MetricsValueT&& value) {
79 m_metricsHasBeenSet = true;
80 m_metrics.emplace(std::forward<MetricsKeyT>(key), std::forward<MetricsValueT>(value));
81 return *this;
82 }
84 private:
86
88 bool m_keysHasBeenSet = false;
89 bool m_metricsHasBeenSet = false;
90};
91
92} // namespace Model
93} // namespace CostExplorer
94} // namespace Aws
Group & WithKeys(KeysT &&value)
Definition Group.h:49
void SetMetrics(MetricsT &&value)
Definition Group.h:68
bool MetricsHasBeenSet() const
Definition Group.h:66
Group & AddMetrics(MetricsKeyT &&key, MetricsValueT &&value)
Definition Group.h:78
Group & WithMetrics(MetricsT &&value)
Definition Group.h:73
AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetKeys(KeysT &&value)
Definition Group.h:44
AWS_COSTEXPLORER_API Group(Aws::Utils::Json::JsonView jsonValue)
const Aws::Map< Aws::String, MetricValue > & GetMetrics() const
Definition Group.h:65
AWS_COSTEXPLORER_API Group()=default
AWS_COSTEXPLORER_API Group & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetKeys() const
Definition Group.h:41
bool KeysHasBeenSet() const
Definition Group.h:42
Group & AddKeys(KeysT &&value)
Definition Group.h:54
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue