AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
MetricValue.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/ec2/EC2_EXPORTS.h>
9#include <aws/ec2/model/Metric.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Xml {
16class XmlNode;
17} // namespace Xml
18} // namespace Utils
19namespace EC2 {
20namespace Model {
21
29 public:
30 AWS_EC2_API MetricValue() = default;
31 AWS_EC2_API MetricValue(const Aws::Utils::Xml::XmlNode& xmlNode);
32 AWS_EC2_API MetricValue& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
33
34 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
35 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
36
38
41 inline Metric GetMetric() const { return m_metric; }
42 inline bool MetricHasBeenSet() const { return m_metricHasBeenSet; }
43 inline void SetMetric(Metric value) {
44 m_metricHasBeenSet = true;
45 m_metric = value;
46 }
47 inline MetricValue& WithMetric(Metric value) {
48 SetMetric(value);
49 return *this;
50 }
52
54
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 MetricValue& WithValue(double value) {
65 SetValue(value);
66 return *this;
67 }
69 private:
70 Metric m_metric{Metric::NOT_SET};
71
72 double m_value{0.0};
73 bool m_metricHasBeenSet = false;
74 bool m_valueHasBeenSet = false;
75};
76
77} // namespace Model
78} // namespace EC2
79} // namespace Aws
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_EC2_API MetricValue()=default
MetricValue & WithMetric(Metric value)
Definition MetricValue.h:47
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
MetricValue & WithValue(double value)
Definition MetricValue.h:64
AWS_EC2_API MetricValue(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API MetricValue & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetMetric(Metric value)
Definition MetricValue.h:43
void SetValue(double value)
Definition MetricValue.h:60
std::basic_ostream< char, std::char_traits< char > > OStream