AWS SDK for C++  0.12.9
AWS SDK for C++
Datapoint.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace CloudWatch
31 {
32 namespace Model
33 {
34 
40  {
41  public:
42  Datapoint();
43  Datapoint(const Aws::Utils::Xml::XmlNode& xmlNode);
44  Datapoint& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
45 
46  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
47  void OutputToStream(Aws::OStream& oStream, const char* location) const;
48 
52  inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; }
53 
57  inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
58 
62  inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
63 
67  inline Datapoint& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;}
68 
72  inline Datapoint& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(value); return *this;}
73 
78  inline double GetSampleCount() const{ return m_sampleCount; }
79 
84  inline void SetSampleCount(double value) { m_sampleCountHasBeenSet = true; m_sampleCount = value; }
85 
90  inline Datapoint& WithSampleCount(double value) { SetSampleCount(value); return *this;}
91 
95  inline double GetAverage() const{ return m_average; }
96 
100  inline void SetAverage(double value) { m_averageHasBeenSet = true; m_average = value; }
101 
105  inline Datapoint& WithAverage(double value) { SetAverage(value); return *this;}
106 
110  inline double GetSum() const{ return m_sum; }
111 
115  inline void SetSum(double value) { m_sumHasBeenSet = true; m_sum = value; }
116 
120  inline Datapoint& WithSum(double value) { SetSum(value); return *this;}
121 
125  inline double GetMinimum() const{ return m_minimum; }
126 
130  inline void SetMinimum(double value) { m_minimumHasBeenSet = true; m_minimum = value; }
131 
135  inline Datapoint& WithMinimum(double value) { SetMinimum(value); return *this;}
136 
140  inline double GetMaximum() const{ return m_maximum; }
141 
145  inline void SetMaximum(double value) { m_maximumHasBeenSet = true; m_maximum = value; }
146 
150  inline Datapoint& WithMaximum(double value) { SetMaximum(value); return *this;}
151 
155  inline const StandardUnit& GetUnit() const{ return m_unit; }
156 
160  inline void SetUnit(const StandardUnit& value) { m_unitHasBeenSet = true; m_unit = value; }
161 
165  inline void SetUnit(StandardUnit&& value) { m_unitHasBeenSet = true; m_unit = value; }
166 
170  inline Datapoint& WithUnit(const StandardUnit& value) { SetUnit(value); return *this;}
171 
175  inline Datapoint& WithUnit(StandardUnit&& value) { SetUnit(value); return *this;}
176 
177  private:
178  Aws::Utils::DateTime m_timestamp;
179  bool m_timestampHasBeenSet;
180  double m_sampleCount;
181  bool m_sampleCountHasBeenSet;
182  double m_average;
183  bool m_averageHasBeenSet;
184  double m_sum;
185  bool m_sumHasBeenSet;
186  double m_minimum;
187  bool m_minimumHasBeenSet;
188  double m_maximum;
189  bool m_maximumHasBeenSet;
190  StandardUnit m_unit;
191  bool m_unitHasBeenSet;
192  };
193 
194 } // namespace Model
195 } // namespace CloudWatch
196 } // namespace Aws
const StandardUnit & GetUnit() const
Definition: Datapoint.h:155
void SetMaximum(double value)
Definition: Datapoint.h:145
void SetMinimum(double value)
Definition: Datapoint.h:130
Datapoint & WithAverage(double value)
Definition: Datapoint.h:105
Datapoint & WithMinimum(double value)
Definition: Datapoint.h:135
#define AWS_CLOUDWATCH_API
Datapoint & WithSampleCount(double value)
Definition: Datapoint.h:90
void SetUnit(StandardUnit &&value)
Definition: Datapoint.h:165
Datapoint & WithTimestamp(Aws::Utils::DateTime &&value)
Definition: Datapoint.h:72
Datapoint & WithTimestamp(const Aws::Utils::DateTime &value)
Definition: Datapoint.h:67
const Aws::Utils::DateTime & GetTimestamp() const
Definition: Datapoint.h:52
void SetTimestamp(const Aws::Utils::DateTime &value)
Definition: Datapoint.h:57
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
Datapoint & WithSum(double value)
Definition: Datapoint.h:120
void SetUnit(const StandardUnit &value)
Definition: Datapoint.h:160
void SetSampleCount(double value)
Definition: Datapoint.h:84
double GetSampleCount() const
Definition: Datapoint.h:78
Datapoint & WithUnit(StandardUnit &&value)
Definition: Datapoint.h:175
void SetAverage(double value)
Definition: Datapoint.h:100
void SetTimestamp(Aws::Utils::DateTime &&value)
Definition: Datapoint.h:62
Datapoint & WithUnit(const StandardUnit &value)
Definition: Datapoint.h:170
Datapoint & WithMaximum(double value)
Definition: Datapoint.h:150
JSON (JavaScript Object Notation).