AWS SDK for C++

AWS SDK for C++ Version 1.11.763

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