AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
DataPoint.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/pi/PI_EXPORTS.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace PI {
20namespace Model {
21
28class DataPoint {
29 public:
30 AWS_PI_API DataPoint() = default;
34
36
40 inline const Aws::Utils::DateTime& GetTimestamp() const { return m_timestamp; }
41 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
42 template <typename TimestampT = Aws::Utils::DateTime>
43 void SetTimestamp(TimestampT&& value) {
44 m_timestampHasBeenSet = true;
45 m_timestamp = std::forward<TimestampT>(value);
46 }
47 template <typename TimestampT = Aws::Utils::DateTime>
48 DataPoint& WithTimestamp(TimestampT&& value) {
49 SetTimestamp(std::forward<TimestampT>(value));
50 return *this;
51 }
53
55
58 inline double GetValue() const { return m_value; }
59 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
60 inline void SetValue(double value) {
61 m_valueHasBeenSet = true;
62 m_value = value;
63 }
64 inline DataPoint& WithValue(double value) {
65 SetValue(value);
66 return *this;
67 }
69 private:
70 Aws::Utils::DateTime m_timestamp{};
71
72 double m_value{0.0};
73 bool m_timestampHasBeenSet = false;
74 bool m_valueHasBeenSet = false;
75};
76
77} // namespace Model
78} // namespace PI
79} // namespace Aws
AWS_PI_API DataPoint()=default
AWS_PI_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_PI_API DataPoint(Aws::Utils::Json::JsonView jsonValue)
void SetTimestamp(TimestampT &&value)
Definition DataPoint.h:43
AWS_PI_API DataPoint & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetValue(double value)
Definition DataPoint.h:60
bool ValueHasBeenSet() const
Definition DataPoint.h:59
const Aws::Utils::DateTime & GetTimestamp() const
Definition DataPoint.h:40
bool TimestampHasBeenSet() const
Definition DataPoint.h:41
DataPoint & WithValue(double value)
Definition DataPoint.h:64
double GetValue() const
Definition DataPoint.h:58
DataPoint & WithTimestamp(TimestampT &&value)
Definition DataPoint.h:48
Aws::Utils::Json::JsonValue JsonValue