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/monitoring/CloudWatch_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/DateTime.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Xml
17 {
18   class XmlNode;
19 } // namespace Xml
20 } // namespace Utils
21 namespace CloudWatch
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>One data point from the metric time series returned in a Contributor Insights
28    * rule report.</p> <p>For more information, see <a
29    * href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetInsightRuleReport.html">GetInsightRuleReport</a>.</p><p><h3>See
30    * Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/InsightRuleMetricDatapoint">AWS
32    * API Reference</a></p>
33    */
34   class AWS_CLOUDWATCH_API InsightRuleMetricDatapoint
35   {
36   public:
37     InsightRuleMetricDatapoint();
38     InsightRuleMetricDatapoint(const Aws::Utils::Xml::XmlNode& xmlNode);
39     InsightRuleMetricDatapoint& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40 
41     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
42     void OutputToStream(Aws::OStream& oStream, const char* location) const;
43 
44 
45     /**
46      * <p>The timestamp of the data point.</p>
47      */
GetTimestamp()48     inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; }
49 
50     /**
51      * <p>The timestamp of the data point.</p>
52      */
TimestampHasBeenSet()53     inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
54 
55     /**
56      * <p>The timestamp of the data point.</p>
57      */
SetTimestamp(const Aws::Utils::DateTime & value)58     inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
59 
60     /**
61      * <p>The timestamp of the data point.</p>
62      */
SetTimestamp(Aws::Utils::DateTime && value)63     inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); }
64 
65     /**
66      * <p>The timestamp of the data point.</p>
67      */
WithTimestamp(const Aws::Utils::DateTime & value)68     inline InsightRuleMetricDatapoint& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;}
69 
70     /**
71      * <p>The timestamp of the data point.</p>
72      */
WithTimestamp(Aws::Utils::DateTime && value)73     inline InsightRuleMetricDatapoint& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;}
74 
75 
76     /**
77      * <p>The number of unique contributors who published data during this
78      * timestamp.</p> <p>This statistic is returned only if you included it in the
79      * <code>Metrics</code> array in your request.</p>
80      */
GetUniqueContributors()81     inline double GetUniqueContributors() const{ return m_uniqueContributors; }
82 
83     /**
84      * <p>The number of unique contributors who published data during this
85      * timestamp.</p> <p>This statistic is returned only if you included it in the
86      * <code>Metrics</code> array in your request.</p>
87      */
UniqueContributorsHasBeenSet()88     inline bool UniqueContributorsHasBeenSet() const { return m_uniqueContributorsHasBeenSet; }
89 
90     /**
91      * <p>The number of unique contributors who published data during this
92      * timestamp.</p> <p>This statistic is returned only if you included it in the
93      * <code>Metrics</code> array in your request.</p>
94      */
SetUniqueContributors(double value)95     inline void SetUniqueContributors(double value) { m_uniqueContributorsHasBeenSet = true; m_uniqueContributors = value; }
96 
97     /**
98      * <p>The number of unique contributors who published data during this
99      * timestamp.</p> <p>This statistic is returned only if you included it in the
100      * <code>Metrics</code> array in your request.</p>
101      */
WithUniqueContributors(double value)102     inline InsightRuleMetricDatapoint& WithUniqueContributors(double value) { SetUniqueContributors(value); return *this;}
103 
104 
105     /**
106      * <p>The maximum value provided by one contributor during this timestamp. Each
107      * timestamp is evaluated separately, so the identity of the max contributor could
108      * be different for each timestamp.</p> <p>This statistic is returned only if you
109      * included it in the <code>Metrics</code> array in your request.</p>
110      */
GetMaxContributorValue()111     inline double GetMaxContributorValue() const{ return m_maxContributorValue; }
112 
113     /**
114      * <p>The maximum value provided by one contributor during this timestamp. Each
115      * timestamp is evaluated separately, so the identity of the max contributor could
116      * be different for each timestamp.</p> <p>This statistic is returned only if you
117      * included it in the <code>Metrics</code> array in your request.</p>
118      */
MaxContributorValueHasBeenSet()119     inline bool MaxContributorValueHasBeenSet() const { return m_maxContributorValueHasBeenSet; }
120 
121     /**
122      * <p>The maximum value provided by one contributor during this timestamp. Each
123      * timestamp is evaluated separately, so the identity of the max contributor could
124      * be different for each timestamp.</p> <p>This statistic is returned only if you
125      * included it in the <code>Metrics</code> array in your request.</p>
126      */
SetMaxContributorValue(double value)127     inline void SetMaxContributorValue(double value) { m_maxContributorValueHasBeenSet = true; m_maxContributorValue = value; }
128 
129     /**
130      * <p>The maximum value provided by one contributor during this timestamp. Each
131      * timestamp is evaluated separately, so the identity of the max contributor could
132      * be different for each timestamp.</p> <p>This statistic is returned only if you
133      * included it in the <code>Metrics</code> array in your request.</p>
134      */
WithMaxContributorValue(double value)135     inline InsightRuleMetricDatapoint& WithMaxContributorValue(double value) { SetMaxContributorValue(value); return *this;}
136 
137 
138     /**
139      * <p>The number of occurrences that matched the rule during this data point.</p>
140      * <p>This statistic is returned only if you included it in the
141      * <code>Metrics</code> array in your request.</p>
142      */
GetSampleCount()143     inline double GetSampleCount() const{ return m_sampleCount; }
144 
145     /**
146      * <p>The number of occurrences that matched the rule during this data point.</p>
147      * <p>This statistic is returned only if you included it in the
148      * <code>Metrics</code> array in your request.</p>
149      */
SampleCountHasBeenSet()150     inline bool SampleCountHasBeenSet() const { return m_sampleCountHasBeenSet; }
151 
152     /**
153      * <p>The number of occurrences that matched the rule during this data point.</p>
154      * <p>This statistic is returned only if you included it in the
155      * <code>Metrics</code> array in your request.</p>
156      */
SetSampleCount(double value)157     inline void SetSampleCount(double value) { m_sampleCountHasBeenSet = true; m_sampleCount = value; }
158 
159     /**
160      * <p>The number of occurrences that matched the rule during this data point.</p>
161      * <p>This statistic is returned only if you included it in the
162      * <code>Metrics</code> array in your request.</p>
163      */
WithSampleCount(double value)164     inline InsightRuleMetricDatapoint& WithSampleCount(double value) { SetSampleCount(value); return *this;}
165 
166 
167     /**
168      * <p>The average value from all contributors during the time period represented by
169      * that data point.</p> <p>This statistic is returned only if you included it in
170      * the <code>Metrics</code> array in your request.</p>
171      */
GetAverage()172     inline double GetAverage() const{ return m_average; }
173 
174     /**
175      * <p>The average value from all contributors during the time period represented by
176      * that data point.</p> <p>This statistic is returned only if you included it in
177      * the <code>Metrics</code> array in your request.</p>
178      */
AverageHasBeenSet()179     inline bool AverageHasBeenSet() const { return m_averageHasBeenSet; }
180 
181     /**
182      * <p>The average value from all contributors during the time period represented by
183      * that data point.</p> <p>This statistic is returned only if you included it in
184      * the <code>Metrics</code> array in your request.</p>
185      */
SetAverage(double value)186     inline void SetAverage(double value) { m_averageHasBeenSet = true; m_average = value; }
187 
188     /**
189      * <p>The average value from all contributors during the time period represented by
190      * that data point.</p> <p>This statistic is returned only if you included it in
191      * the <code>Metrics</code> array in your request.</p>
192      */
WithAverage(double value)193     inline InsightRuleMetricDatapoint& WithAverage(double value) { SetAverage(value); return *this;}
194 
195 
196     /**
197      * <p>The sum of the values from all contributors during the time period
198      * represented by that data point.</p> <p>This statistic is returned only if you
199      * included it in the <code>Metrics</code> array in your request.</p>
200      */
GetSum()201     inline double GetSum() const{ return m_sum; }
202 
203     /**
204      * <p>The sum of the values from all contributors during the time period
205      * represented by that data point.</p> <p>This statistic is returned only if you
206      * included it in the <code>Metrics</code> array in your request.</p>
207      */
SumHasBeenSet()208     inline bool SumHasBeenSet() const { return m_sumHasBeenSet; }
209 
210     /**
211      * <p>The sum of the values from all contributors during the time period
212      * represented by that data point.</p> <p>This statistic is returned only if you
213      * included it in the <code>Metrics</code> array in your request.</p>
214      */
SetSum(double value)215     inline void SetSum(double value) { m_sumHasBeenSet = true; m_sum = value; }
216 
217     /**
218      * <p>The sum of the values from all contributors during the time period
219      * represented by that data point.</p> <p>This statistic is returned only if you
220      * included it in the <code>Metrics</code> array in your request.</p>
221      */
WithSum(double value)222     inline InsightRuleMetricDatapoint& WithSum(double value) { SetSum(value); return *this;}
223 
224 
225     /**
226      * <p>The minimum value from a single contributor during the time period
227      * represented by that data point.</p> <p>This statistic is returned only if you
228      * included it in the <code>Metrics</code> array in your request.</p>
229      */
GetMinimum()230     inline double GetMinimum() const{ return m_minimum; }
231 
232     /**
233      * <p>The minimum value from a single contributor during the time period
234      * represented by that data point.</p> <p>This statistic is returned only if you
235      * included it in the <code>Metrics</code> array in your request.</p>
236      */
MinimumHasBeenSet()237     inline bool MinimumHasBeenSet() const { return m_minimumHasBeenSet; }
238 
239     /**
240      * <p>The minimum value from a single contributor during the time period
241      * represented by that data point.</p> <p>This statistic is returned only if you
242      * included it in the <code>Metrics</code> array in your request.</p>
243      */
SetMinimum(double value)244     inline void SetMinimum(double value) { m_minimumHasBeenSet = true; m_minimum = value; }
245 
246     /**
247      * <p>The minimum value from a single contributor during the time period
248      * represented by that data point.</p> <p>This statistic is returned only if you
249      * included it in the <code>Metrics</code> array in your request.</p>
250      */
WithMinimum(double value)251     inline InsightRuleMetricDatapoint& WithMinimum(double value) { SetMinimum(value); return *this;}
252 
253 
254     /**
255      * <p>The maximum value from a single occurence from a single contributor during
256      * the time period represented by that data point.</p> <p>This statistic is
257      * returned only if you included it in the <code>Metrics</code> array in your
258      * request.</p>
259      */
GetMaximum()260     inline double GetMaximum() const{ return m_maximum; }
261 
262     /**
263      * <p>The maximum value from a single occurence from a single contributor during
264      * the time period represented by that data point.</p> <p>This statistic is
265      * returned only if you included it in the <code>Metrics</code> array in your
266      * request.</p>
267      */
MaximumHasBeenSet()268     inline bool MaximumHasBeenSet() const { return m_maximumHasBeenSet; }
269 
270     /**
271      * <p>The maximum value from a single occurence from a single contributor during
272      * the time period represented by that data point.</p> <p>This statistic is
273      * returned only if you included it in the <code>Metrics</code> array in your
274      * request.</p>
275      */
SetMaximum(double value)276     inline void SetMaximum(double value) { m_maximumHasBeenSet = true; m_maximum = value; }
277 
278     /**
279      * <p>The maximum value from a single occurence from a single contributor during
280      * the time period represented by that data point.</p> <p>This statistic is
281      * returned only if you included it in the <code>Metrics</code> array in your
282      * request.</p>
283      */
WithMaximum(double value)284     inline InsightRuleMetricDatapoint& WithMaximum(double value) { SetMaximum(value); return *this;}
285 
286   private:
287 
288     Aws::Utils::DateTime m_timestamp;
289     bool m_timestampHasBeenSet;
290 
291     double m_uniqueContributors;
292     bool m_uniqueContributorsHasBeenSet;
293 
294     double m_maxContributorValue;
295     bool m_maxContributorValueHasBeenSet;
296 
297     double m_sampleCount;
298     bool m_sampleCountHasBeenSet;
299 
300     double m_average;
301     bool m_averageHasBeenSet;
302 
303     double m_sum;
304     bool m_sumHasBeenSet;
305 
306     double m_minimum;
307     bool m_minimumHasBeenSet;
308 
309     double m_maximum;
310     bool m_maximumHasBeenSet;
311   };
312 
313 } // namespace Model
314 } // namespace CloudWatch
315 } // namespace Aws
316