1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/ssm/SSM_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/memory/stl/AWSMap.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <aws/ssm/model/OpsFilter.h>
12 #include <aws/ssm/model/OpsAggregator.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Json
20 {
21   class JsonValue;
22   class JsonView;
23 } // namespace Json
24 } // namespace Utils
25 namespace SSM
26 {
27 namespace Model
28 {
29 
30   /**
31    * <p>One or more aggregators for viewing counts of OpsData using different
32    * dimensions such as <code>Source</code>, <code>CreatedTime</code>, or
33    * <code>Source and CreatedTime</code>, to name a few.</p><p><h3>See Also:</h3>
34    * <a
35    * href="http://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/OpsAggregator">AWS
36    * API Reference</a></p>
37    */
38   class AWS_SSM_API OpsAggregator
39   {
40   public:
41     OpsAggregator();
42     OpsAggregator(Aws::Utils::Json::JsonView jsonValue);
43     OpsAggregator& operator=(Aws::Utils::Json::JsonView jsonValue);
44     Aws::Utils::Json::JsonValue Jsonize() const;
45 
46 
47     /**
48      * <p>Either a <code>Range</code> or <code>Count</code> aggregator for limiting an
49      * OpsData summary.</p>
50      */
GetAggregatorType()51     inline const Aws::String& GetAggregatorType() const{ return m_aggregatorType; }
52 
53     /**
54      * <p>Either a <code>Range</code> or <code>Count</code> aggregator for limiting an
55      * OpsData summary.</p>
56      */
AggregatorTypeHasBeenSet()57     inline bool AggregatorTypeHasBeenSet() const { return m_aggregatorTypeHasBeenSet; }
58 
59     /**
60      * <p>Either a <code>Range</code> or <code>Count</code> aggregator for limiting an
61      * OpsData summary.</p>
62      */
SetAggregatorType(const Aws::String & value)63     inline void SetAggregatorType(const Aws::String& value) { m_aggregatorTypeHasBeenSet = true; m_aggregatorType = value; }
64 
65     /**
66      * <p>Either a <code>Range</code> or <code>Count</code> aggregator for limiting an
67      * OpsData summary.</p>
68      */
SetAggregatorType(Aws::String && value)69     inline void SetAggregatorType(Aws::String&& value) { m_aggregatorTypeHasBeenSet = true; m_aggregatorType = std::move(value); }
70 
71     /**
72      * <p>Either a <code>Range</code> or <code>Count</code> aggregator for limiting an
73      * OpsData summary.</p>
74      */
SetAggregatorType(const char * value)75     inline void SetAggregatorType(const char* value) { m_aggregatorTypeHasBeenSet = true; m_aggregatorType.assign(value); }
76 
77     /**
78      * <p>Either a <code>Range</code> or <code>Count</code> aggregator for limiting an
79      * OpsData summary.</p>
80      */
WithAggregatorType(const Aws::String & value)81     inline OpsAggregator& WithAggregatorType(const Aws::String& value) { SetAggregatorType(value); return *this;}
82 
83     /**
84      * <p>Either a <code>Range</code> or <code>Count</code> aggregator for limiting an
85      * OpsData summary.</p>
86      */
WithAggregatorType(Aws::String && value)87     inline OpsAggregator& WithAggregatorType(Aws::String&& value) { SetAggregatorType(std::move(value)); return *this;}
88 
89     /**
90      * <p>Either a <code>Range</code> or <code>Count</code> aggregator for limiting an
91      * OpsData summary.</p>
92      */
WithAggregatorType(const char * value)93     inline OpsAggregator& WithAggregatorType(const char* value) { SetAggregatorType(value); return *this;}
94 
95 
96     /**
97      * <p>The data type name to use for viewing counts of OpsData.</p>
98      */
GetTypeName()99     inline const Aws::String& GetTypeName() const{ return m_typeName; }
100 
101     /**
102      * <p>The data type name to use for viewing counts of OpsData.</p>
103      */
TypeNameHasBeenSet()104     inline bool TypeNameHasBeenSet() const { return m_typeNameHasBeenSet; }
105 
106     /**
107      * <p>The data type name to use for viewing counts of OpsData.</p>
108      */
SetTypeName(const Aws::String & value)109     inline void SetTypeName(const Aws::String& value) { m_typeNameHasBeenSet = true; m_typeName = value; }
110 
111     /**
112      * <p>The data type name to use for viewing counts of OpsData.</p>
113      */
SetTypeName(Aws::String && value)114     inline void SetTypeName(Aws::String&& value) { m_typeNameHasBeenSet = true; m_typeName = std::move(value); }
115 
116     /**
117      * <p>The data type name to use for viewing counts of OpsData.</p>
118      */
SetTypeName(const char * value)119     inline void SetTypeName(const char* value) { m_typeNameHasBeenSet = true; m_typeName.assign(value); }
120 
121     /**
122      * <p>The data type name to use for viewing counts of OpsData.</p>
123      */
WithTypeName(const Aws::String & value)124     inline OpsAggregator& WithTypeName(const Aws::String& value) { SetTypeName(value); return *this;}
125 
126     /**
127      * <p>The data type name to use for viewing counts of OpsData.</p>
128      */
WithTypeName(Aws::String && value)129     inline OpsAggregator& WithTypeName(Aws::String&& value) { SetTypeName(std::move(value)); return *this;}
130 
131     /**
132      * <p>The data type name to use for viewing counts of OpsData.</p>
133      */
WithTypeName(const char * value)134     inline OpsAggregator& WithTypeName(const char* value) { SetTypeName(value); return *this;}
135 
136 
137     /**
138      * <p>The name of an OpsData attribute on which to limit the count of OpsData.</p>
139      */
GetAttributeName()140     inline const Aws::String& GetAttributeName() const{ return m_attributeName; }
141 
142     /**
143      * <p>The name of an OpsData attribute on which to limit the count of OpsData.</p>
144      */
AttributeNameHasBeenSet()145     inline bool AttributeNameHasBeenSet() const { return m_attributeNameHasBeenSet; }
146 
147     /**
148      * <p>The name of an OpsData attribute on which to limit the count of OpsData.</p>
149      */
SetAttributeName(const Aws::String & value)150     inline void SetAttributeName(const Aws::String& value) { m_attributeNameHasBeenSet = true; m_attributeName = value; }
151 
152     /**
153      * <p>The name of an OpsData attribute on which to limit the count of OpsData.</p>
154      */
SetAttributeName(Aws::String && value)155     inline void SetAttributeName(Aws::String&& value) { m_attributeNameHasBeenSet = true; m_attributeName = std::move(value); }
156 
157     /**
158      * <p>The name of an OpsData attribute on which to limit the count of OpsData.</p>
159      */
SetAttributeName(const char * value)160     inline void SetAttributeName(const char* value) { m_attributeNameHasBeenSet = true; m_attributeName.assign(value); }
161 
162     /**
163      * <p>The name of an OpsData attribute on which to limit the count of OpsData.</p>
164      */
WithAttributeName(const Aws::String & value)165     inline OpsAggregator& WithAttributeName(const Aws::String& value) { SetAttributeName(value); return *this;}
166 
167     /**
168      * <p>The name of an OpsData attribute on which to limit the count of OpsData.</p>
169      */
WithAttributeName(Aws::String && value)170     inline OpsAggregator& WithAttributeName(Aws::String&& value) { SetAttributeName(std::move(value)); return *this;}
171 
172     /**
173      * <p>The name of an OpsData attribute on which to limit the count of OpsData.</p>
174      */
WithAttributeName(const char * value)175     inline OpsAggregator& WithAttributeName(const char* value) { SetAttributeName(value); return *this;}
176 
177 
178     /**
179      * <p>The aggregator value.</p>
180      */
GetValues()181     inline const Aws::Map<Aws::String, Aws::String>& GetValues() const{ return m_values; }
182 
183     /**
184      * <p>The aggregator value.</p>
185      */
ValuesHasBeenSet()186     inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
187 
188     /**
189      * <p>The aggregator value.</p>
190      */
SetValues(const Aws::Map<Aws::String,Aws::String> & value)191     inline void SetValues(const Aws::Map<Aws::String, Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
192 
193     /**
194      * <p>The aggregator value.</p>
195      */
SetValues(Aws::Map<Aws::String,Aws::String> && value)196     inline void SetValues(Aws::Map<Aws::String, Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
197 
198     /**
199      * <p>The aggregator value.</p>
200      */
WithValues(const Aws::Map<Aws::String,Aws::String> & value)201     inline OpsAggregator& WithValues(const Aws::Map<Aws::String, Aws::String>& value) { SetValues(value); return *this;}
202 
203     /**
204      * <p>The aggregator value.</p>
205      */
WithValues(Aws::Map<Aws::String,Aws::String> && value)206     inline OpsAggregator& WithValues(Aws::Map<Aws::String, Aws::String>&& value) { SetValues(std::move(value)); return *this;}
207 
208     /**
209      * <p>The aggregator value.</p>
210      */
AddValues(const Aws::String & key,const Aws::String & value)211     inline OpsAggregator& AddValues(const Aws::String& key, const Aws::String& value) { m_valuesHasBeenSet = true; m_values.emplace(key, value); return *this; }
212 
213     /**
214      * <p>The aggregator value.</p>
215      */
AddValues(Aws::String && key,const Aws::String & value)216     inline OpsAggregator& AddValues(Aws::String&& key, const Aws::String& value) { m_valuesHasBeenSet = true; m_values.emplace(std::move(key), value); return *this; }
217 
218     /**
219      * <p>The aggregator value.</p>
220      */
AddValues(const Aws::String & key,Aws::String && value)221     inline OpsAggregator& AddValues(const Aws::String& key, Aws::String&& value) { m_valuesHasBeenSet = true; m_values.emplace(key, std::move(value)); return *this; }
222 
223     /**
224      * <p>The aggregator value.</p>
225      */
AddValues(Aws::String && key,Aws::String && value)226     inline OpsAggregator& AddValues(Aws::String&& key, Aws::String&& value) { m_valuesHasBeenSet = true; m_values.emplace(std::move(key), std::move(value)); return *this; }
227 
228     /**
229      * <p>The aggregator value.</p>
230      */
AddValues(const char * key,Aws::String && value)231     inline OpsAggregator& AddValues(const char* key, Aws::String&& value) { m_valuesHasBeenSet = true; m_values.emplace(key, std::move(value)); return *this; }
232 
233     /**
234      * <p>The aggregator value.</p>
235      */
AddValues(Aws::String && key,const char * value)236     inline OpsAggregator& AddValues(Aws::String&& key, const char* value) { m_valuesHasBeenSet = true; m_values.emplace(std::move(key), value); return *this; }
237 
238     /**
239      * <p>The aggregator value.</p>
240      */
AddValues(const char * key,const char * value)241     inline OpsAggregator& AddValues(const char* key, const char* value) { m_valuesHasBeenSet = true; m_values.emplace(key, value); return *this; }
242 
243 
244     /**
245      * <p>The aggregator filters.</p>
246      */
GetFilters()247     inline const Aws::Vector<OpsFilter>& GetFilters() const{ return m_filters; }
248 
249     /**
250      * <p>The aggregator filters.</p>
251      */
FiltersHasBeenSet()252     inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
253 
254     /**
255      * <p>The aggregator filters.</p>
256      */
SetFilters(const Aws::Vector<OpsFilter> & value)257     inline void SetFilters(const Aws::Vector<OpsFilter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
258 
259     /**
260      * <p>The aggregator filters.</p>
261      */
SetFilters(Aws::Vector<OpsFilter> && value)262     inline void SetFilters(Aws::Vector<OpsFilter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
263 
264     /**
265      * <p>The aggregator filters.</p>
266      */
WithFilters(const Aws::Vector<OpsFilter> & value)267     inline OpsAggregator& WithFilters(const Aws::Vector<OpsFilter>& value) { SetFilters(value); return *this;}
268 
269     /**
270      * <p>The aggregator filters.</p>
271      */
WithFilters(Aws::Vector<OpsFilter> && value)272     inline OpsAggregator& WithFilters(Aws::Vector<OpsFilter>&& value) { SetFilters(std::move(value)); return *this;}
273 
274     /**
275      * <p>The aggregator filters.</p>
276      */
AddFilters(const OpsFilter & value)277     inline OpsAggregator& AddFilters(const OpsFilter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
278 
279     /**
280      * <p>The aggregator filters.</p>
281      */
AddFilters(OpsFilter && value)282     inline OpsAggregator& AddFilters(OpsFilter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
283 
284 
285     /**
286      * <p>A nested aggregator for viewing counts of OpsData.</p>
287      */
GetAggregators()288     inline const Aws::Vector<OpsAggregator>& GetAggregators() const{ return m_aggregators; }
289 
290     /**
291      * <p>A nested aggregator for viewing counts of OpsData.</p>
292      */
AggregatorsHasBeenSet()293     inline bool AggregatorsHasBeenSet() const { return m_aggregatorsHasBeenSet; }
294 
295     /**
296      * <p>A nested aggregator for viewing counts of OpsData.</p>
297      */
SetAggregators(const Aws::Vector<OpsAggregator> & value)298     inline void SetAggregators(const Aws::Vector<OpsAggregator>& value) { m_aggregatorsHasBeenSet = true; m_aggregators = value; }
299 
300     /**
301      * <p>A nested aggregator for viewing counts of OpsData.</p>
302      */
SetAggregators(Aws::Vector<OpsAggregator> && value)303     inline void SetAggregators(Aws::Vector<OpsAggregator>&& value) { m_aggregatorsHasBeenSet = true; m_aggregators = std::move(value); }
304 
305     /**
306      * <p>A nested aggregator for viewing counts of OpsData.</p>
307      */
WithAggregators(const Aws::Vector<OpsAggregator> & value)308     inline OpsAggregator& WithAggregators(const Aws::Vector<OpsAggregator>& value) { SetAggregators(value); return *this;}
309 
310     /**
311      * <p>A nested aggregator for viewing counts of OpsData.</p>
312      */
WithAggregators(Aws::Vector<OpsAggregator> && value)313     inline OpsAggregator& WithAggregators(Aws::Vector<OpsAggregator>&& value) { SetAggregators(std::move(value)); return *this;}
314 
315     /**
316      * <p>A nested aggregator for viewing counts of OpsData.</p>
317      */
AddAggregators(const OpsAggregator & value)318     inline OpsAggregator& AddAggregators(const OpsAggregator& value) { m_aggregatorsHasBeenSet = true; m_aggregators.push_back(value); return *this; }
319 
320     /**
321      * <p>A nested aggregator for viewing counts of OpsData.</p>
322      */
AddAggregators(OpsAggregator && value)323     inline OpsAggregator& AddAggregators(OpsAggregator&& value) { m_aggregatorsHasBeenSet = true; m_aggregators.push_back(std::move(value)); return *this; }
324 
325   private:
326 
327     Aws::String m_aggregatorType;
328     bool m_aggregatorTypeHasBeenSet;
329 
330     Aws::String m_typeName;
331     bool m_typeNameHasBeenSet;
332 
333     Aws::String m_attributeName;
334     bool m_attributeNameHasBeenSet;
335 
336     Aws::Map<Aws::String, Aws::String> m_values;
337     bool m_valuesHasBeenSet;
338 
339     Aws::Vector<OpsFilter> m_filters;
340     bool m_filtersHasBeenSet;
341 
342     Aws::Vector<OpsAggregator> m_aggregators;
343     bool m_aggregatorsHasBeenSet;
344   };
345 
346 } // namespace Model
347 } // namespace SSM
348 } // namespace Aws
349