AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
Metric.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/rds/RDS_EXPORTS.h>
11#include <aws/rds/model/MetricQuery.h>
12#include <aws/rds/model/MetricReference.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace RDS {
23namespace Model {
24
30class Metric {
31 public:
32 AWS_RDS_API Metric() = default;
33 AWS_RDS_API Metric(const Aws::Utils::Xml::XmlNode& xmlNode);
34 AWS_RDS_API Metric& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_RDS_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
37 AWS_RDS_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
38
40
43 inline const Aws::String& GetName() const { return m_name; }
44 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
45 template <typename NameT = Aws::String>
46 void SetName(NameT&& value) {
47 m_nameHasBeenSet = true;
48 m_name = std::forward<NameT>(value);
49 }
50 template <typename NameT = Aws::String>
51 Metric& WithName(NameT&& value) {
52 SetName(std::forward<NameT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::Vector<MetricReference>& GetReferences() const { return m_references; }
62 inline bool ReferencesHasBeenSet() const { return m_referencesHasBeenSet; }
63 template <typename ReferencesT = Aws::Vector<MetricReference>>
64 void SetReferences(ReferencesT&& value) {
65 m_referencesHasBeenSet = true;
66 m_references = std::forward<ReferencesT>(value);
67 }
68 template <typename ReferencesT = Aws::Vector<MetricReference>>
69 Metric& WithReferences(ReferencesT&& value) {
70 SetReferences(std::forward<ReferencesT>(value));
71 return *this;
72 }
73 template <typename ReferencesT = MetricReference>
74 Metric& AddReferences(ReferencesT&& value) {
75 m_referencesHasBeenSet = true;
76 m_references.emplace_back(std::forward<ReferencesT>(value));
77 return *this;
78 }
80
82
86 inline const Aws::String& GetStatisticsDetails() const { return m_statisticsDetails; }
87 inline bool StatisticsDetailsHasBeenSet() const { return m_statisticsDetailsHasBeenSet; }
88 template <typename StatisticsDetailsT = Aws::String>
89 void SetStatisticsDetails(StatisticsDetailsT&& value) {
90 m_statisticsDetailsHasBeenSet = true;
91 m_statisticsDetails = std::forward<StatisticsDetailsT>(value);
92 }
93 template <typename StatisticsDetailsT = Aws::String>
94 Metric& WithStatisticsDetails(StatisticsDetailsT&& value) {
95 SetStatisticsDetails(std::forward<StatisticsDetailsT>(value));
96 return *this;
97 }
99
101
104 inline const MetricQuery& GetMetricQuery() const { return m_metricQuery; }
105 inline bool MetricQueryHasBeenSet() const { return m_metricQueryHasBeenSet; }
106 template <typename MetricQueryT = MetricQuery>
107 void SetMetricQuery(MetricQueryT&& value) {
108 m_metricQueryHasBeenSet = true;
109 m_metricQuery = std::forward<MetricQueryT>(value);
110 }
111 template <typename MetricQueryT = MetricQuery>
112 Metric& WithMetricQuery(MetricQueryT&& value) {
113 SetMetricQuery(std::forward<MetricQueryT>(value));
114 return *this;
115 }
117 private:
118 Aws::String m_name;
119
120 Aws::Vector<MetricReference> m_references;
121
122 Aws::String m_statisticsDetails;
123
124 MetricQuery m_metricQuery;
125 bool m_nameHasBeenSet = false;
126 bool m_referencesHasBeenSet = false;
127 bool m_statisticsDetailsHasBeenSet = false;
128 bool m_metricQueryHasBeenSet = false;
129};
130
131} // namespace Model
132} // namespace RDS
133} // namespace Aws
Metric & WithReferences(ReferencesT &&value)
Definition Metric.h:69
bool NameHasBeenSet() const
Definition Metric.h:44
Metric & WithMetricQuery(MetricQueryT &&value)
Definition Metric.h:112
Metric & WithStatisticsDetails(StatisticsDetailsT &&value)
Definition Metric.h:94
const Aws::String & GetStatisticsDetails() const
Definition Metric.h:86
const MetricQuery & GetMetricQuery() const
Definition Metric.h:104
const Aws::Vector< MetricReference > & GetReferences() const
Definition Metric.h:61
void SetStatisticsDetails(StatisticsDetailsT &&value)
Definition Metric.h:89
Metric & AddReferences(ReferencesT &&value)
Definition Metric.h:74
const Aws::String & GetName() const
Definition Metric.h:43
void SetName(NameT &&value)
Definition Metric.h:46
bool StatisticsDetailsHasBeenSet() const
Definition Metric.h:87
AWS_RDS_API Metric & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_RDS_API Metric()=default
AWS_RDS_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
bool MetricQueryHasBeenSet() const
Definition Metric.h:105
AWS_RDS_API Metric(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_RDS_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetReferences(ReferencesT &&value)
Definition Metric.h:64
Metric & WithName(NameT &&value)
Definition Metric.h:51
bool ReferencesHasBeenSet() const
Definition Metric.h:62
void SetMetricQuery(MetricQueryT &&value)
Definition Metric.h:107
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream