AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
MetricDefinition.h
1
6#pragma once
7#include <aws/appmonetization/AppMonetization_EXPORTS.h>
8#include <aws/appmonetization/model/AggregationFunction.h>
9#include <aws/appmonetization/model/MetricFilter.h>
10#include <aws/appmonetization/model/PeriodType.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace AppMonetization {
24namespace Model {
25
34 public:
35 AWS_APPMONETIZATION_API MetricDefinition() = default;
36 AWS_APPMONETIZATION_API MetricDefinition(Aws::Utils::Json::JsonView jsonValue);
37 AWS_APPMONETIZATION_API MetricDefinition& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_APPMONETIZATION_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
45 inline const Aws::Vector<MetricFilter>& GetFilters() const { return m_filters; }
46 inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
47 template <typename FiltersT = Aws::Vector<MetricFilter>>
48 void SetFilters(FiltersT&& value) {
49 m_filtersHasBeenSet = true;
50 m_filters = std::forward<FiltersT>(value);
51 }
52 template <typename FiltersT = Aws::Vector<MetricFilter>>
53 MetricDefinition& WithFilters(FiltersT&& value) {
54 SetFilters(std::forward<FiltersT>(value));
55 return *this;
56 }
57 template <typename FiltersT = MetricFilter>
58 MetricDefinition& AddFilters(FiltersT&& value) {
59 m_filtersHasBeenSet = true;
60 m_filters.emplace_back(std::forward<FiltersT>(value));
61 return *this;
62 }
64
66
69 inline AggregationFunction GetFunction() const { return m_function; }
70 inline bool FunctionHasBeenSet() const { return m_functionHasBeenSet; }
71 inline void SetFunction(AggregationFunction value) {
72 m_functionHasBeenSet = true;
73 m_function = value;
74 }
76 SetFunction(value);
77 return *this;
78 }
80
82
86 inline const Aws::String& GetFunctionField() const { return m_functionField; }
87 inline bool FunctionFieldHasBeenSet() const { return m_functionFieldHasBeenSet; }
88 template <typename FunctionFieldT = Aws::String>
89 void SetFunctionField(FunctionFieldT&& value) {
90 m_functionFieldHasBeenSet = true;
91 m_functionField = std::forward<FunctionFieldT>(value);
92 }
93 template <typename FunctionFieldT = Aws::String>
94 MetricDefinition& WithFunctionField(FunctionFieldT&& value) {
95 SetFunctionField(std::forward<FunctionFieldT>(value));
96 return *this;
97 }
99
101
104 inline const Aws::Vector<Aws::String>& GetGroupBy() const { return m_groupBy; }
105 inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; }
106 template <typename GroupByT = Aws::Vector<Aws::String>>
107 void SetGroupBy(GroupByT&& value) {
108 m_groupByHasBeenSet = true;
109 m_groupBy = std::forward<GroupByT>(value);
110 }
111 template <typename GroupByT = Aws::Vector<Aws::String>>
112 MetricDefinition& WithGroupBy(GroupByT&& value) {
113 SetGroupBy(std::forward<GroupByT>(value));
114 return *this;
115 }
116 template <typename GroupByT = Aws::String>
117 MetricDefinition& AddGroupBy(GroupByT&& value) {
118 m_groupByHasBeenSet = true;
119 m_groupBy.emplace_back(std::forward<GroupByT>(value));
120 return *this;
121 }
123
125
128 inline PeriodType GetPeriod() const { return m_period; }
129 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
130 inline void SetPeriod(PeriodType value) {
131 m_periodHasBeenSet = true;
132 m_period = value;
133 }
135 SetPeriod(value);
136 return *this;
137 }
139 private:
141
143
144 Aws::String m_functionField;
145
146 Aws::Vector<Aws::String> m_groupBy;
147
149 bool m_filtersHasBeenSet = false;
150 bool m_functionHasBeenSet = false;
151 bool m_functionFieldHasBeenSet = false;
152 bool m_groupByHasBeenSet = false;
153 bool m_periodHasBeenSet = false;
154};
155
156} // namespace Model
157} // namespace AppMonetization
158} // namespace Aws
const Aws::Vector< Aws::String > & GetGroupBy() const
void SetFunctionField(FunctionFieldT &&value)
MetricDefinition & WithFunction(AggregationFunction value)
const Aws::Vector< MetricFilter > & GetFilters() const
MetricDefinition & AddFilters(FiltersT &&value)
MetricDefinition & WithPeriod(PeriodType value)
MetricDefinition & AddGroupBy(GroupByT &&value)
MetricDefinition & WithFunctionField(FunctionFieldT &&value)
void SetFunction(AggregationFunction value)
AWS_APPMONETIZATION_API MetricDefinition & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_APPMONETIZATION_API MetricDefinition()=default
MetricDefinition & WithGroupBy(GroupByT &&value)
AWS_APPMONETIZATION_API MetricDefinition(Aws::Utils::Json::JsonView jsonValue)
AWS_APPMONETIZATION_API Aws::Utils::Json::JsonValue Jsonize() const
MetricDefinition & WithFilters(FiltersT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue