AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
MetricQuery.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/pi/PI_EXPORTS.h>
10#include <aws/pi/model/DimensionGroup.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace PI {
22namespace Model {
23
38 public:
39 AWS_PI_API MetricQuery() = default;
43
45
66 inline const Aws::String& GetMetric() const { return m_metric; }
67 inline bool MetricHasBeenSet() const { return m_metricHasBeenSet; }
68 template <typename MetricT = Aws::String>
69 void SetMetric(MetricT&& value) {
70 m_metricHasBeenSet = true;
71 m_metric = std::forward<MetricT>(value);
72 }
73 template <typename MetricT = Aws::String>
74 MetricQuery& WithMetric(MetricT&& value) {
75 SetMetric(std::forward<MetricT>(value));
76 return *this;
77 }
79
81
88 inline const DimensionGroup& GetGroupBy() const { return m_groupBy; }
89 inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; }
90 template <typename GroupByT = DimensionGroup>
91 void SetGroupBy(GroupByT&& value) {
92 m_groupByHasBeenSet = true;
93 m_groupBy = std::forward<GroupByT>(value);
94 }
95 template <typename GroupByT = DimensionGroup>
96 MetricQuery& WithGroupBy(GroupByT&& value) {
97 SetGroupBy(std::forward<GroupByT>(value));
98 return *this;
99 }
101
103
111 inline const Aws::Map<Aws::String, Aws::String>& GetFilter() const { return m_filter; }
112 inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
113 template <typename FilterT = Aws::Map<Aws::String, Aws::String>>
114 void SetFilter(FilterT&& value) {
115 m_filterHasBeenSet = true;
116 m_filter = std::forward<FilterT>(value);
117 }
118 template <typename FilterT = Aws::Map<Aws::String, Aws::String>>
119 MetricQuery& WithFilter(FilterT&& value) {
120 SetFilter(std::forward<FilterT>(value));
121 return *this;
122 }
123 template <typename FilterKeyT = Aws::String, typename FilterValueT = Aws::String>
124 MetricQuery& AddFilter(FilterKeyT&& key, FilterValueT&& value) {
125 m_filterHasBeenSet = true;
126 m_filter.emplace(std::forward<FilterKeyT>(key), std::forward<FilterValueT>(value));
127 return *this;
128 }
130 private:
131 Aws::String m_metric;
132
133 DimensionGroup m_groupBy;
134
136 bool m_metricHasBeenSet = false;
137 bool m_groupByHasBeenSet = false;
138 bool m_filterHasBeenSet = false;
139};
140
141} // namespace Model
142} // namespace PI
143} // namespace Aws
MetricQuery & WithFilter(FilterT &&value)
void SetGroupBy(GroupByT &&value)
Definition MetricQuery.h:91
void SetFilter(FilterT &&value)
void SetMetric(MetricT &&value)
Definition MetricQuery.h:69
MetricQuery & WithGroupBy(GroupByT &&value)
Definition MetricQuery.h:96
AWS_PI_API MetricQuery(Aws::Utils::Json::JsonView jsonValue)
AWS_PI_API MetricQuery()=default
const Aws::String & GetMetric() const
Definition MetricQuery.h:66
AWS_PI_API MetricQuery & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Map< Aws::String, Aws::String > & GetFilter() const
const DimensionGroup & GetGroupBy() const
Definition MetricQuery.h:88
AWS_PI_API Aws::Utils::Json::JsonValue Jsonize() const
MetricQuery & AddFilter(FilterKeyT &&key, FilterValueT &&value)
MetricQuery & WithMetric(MetricT &&value)
Definition MetricQuery.h:74
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