AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
Metric.h
1
6#pragma once
7#include <aws/monitoring/CloudWatch_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/monitoring/model/Dimension.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Xml
19{
20 class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace CloudWatch
24{
25namespace Model
26{
27
33 class Metric
34 {
35 public:
36 AWS_CLOUDWATCH_API Metric();
37 AWS_CLOUDWATCH_API Metric(const Aws::Utils::Xml::XmlNode& xmlNode);
38 AWS_CLOUDWATCH_API Metric& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39
40 AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
41 AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
42
43
45
48 inline const Aws::String& GetNamespace() const{ return m_namespace; }
49 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; }
50 inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; }
51 inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); }
52 inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); }
53 inline Metric& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;}
54 inline Metric& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;}
55 inline Metric& WithNamespace(const char* value) { SetNamespace(value); return *this;}
57
59
62 inline const Aws::String& GetMetricName() const{ return m_metricName; }
63 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
64 inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
65 inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
66 inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
67 inline Metric& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
68 inline Metric& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
69 inline Metric& WithMetricName(const char* value) { SetMetricName(value); return *this;}
71
73
76 inline const Aws::Vector<Dimension>& GetDimensions() const{ return m_dimensions; }
77 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
78 inline void SetDimensions(const Aws::Vector<Dimension>& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; }
79 inline void SetDimensions(Aws::Vector<Dimension>&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::move(value); }
80 inline Metric& WithDimensions(const Aws::Vector<Dimension>& value) { SetDimensions(value); return *this;}
81 inline Metric& WithDimensions(Aws::Vector<Dimension>&& value) { SetDimensions(std::move(value)); return *this;}
82 inline Metric& AddDimensions(const Dimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; }
83 inline Metric& AddDimensions(Dimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(std::move(value)); return *this; }
85 private:
86
87 Aws::String m_namespace;
88 bool m_namespaceHasBeenSet = false;
89
90 Aws::String m_metricName;
91 bool m_metricNameHasBeenSet = false;
92
93 Aws::Vector<Dimension> m_dimensions;
94 bool m_dimensionsHasBeenSet = false;
95 };
96
97} // namespace Model
98} // namespace CloudWatch
99} // namespace Aws
AWS_CLOUDWATCH_API Metric(const Aws::Utils::Xml::XmlNode &xmlNode)
bool MetricNameHasBeenSet() const
Definition Metric.h:63
AWS_CLOUDWATCH_API Metric & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Metric & WithMetricName(const char *value)
Definition Metric.h:69
void SetNamespace(const char *value)
Definition Metric.h:52
const Aws::Vector< Dimension > & GetDimensions() const
Definition Metric.h:76
bool NamespaceHasBeenSet() const
Definition Metric.h:49
const Aws::String & GetNamespace() const
Definition Metric.h:48
Metric & AddDimensions(Dimension &&value)
Definition Metric.h:83
Metric & WithNamespace(const Aws::String &value)
Definition Metric.h:53
Metric & WithDimensions(Aws::Vector< Dimension > &&value)
Definition Metric.h:81
void SetDimensions(const Aws::Vector< Dimension > &value)
Definition Metric.h:78
void SetMetricName(const Aws::String &value)
Definition Metric.h:64
void SetNamespace(const Aws::String &value)
Definition Metric.h:50
Metric & WithNamespace(Aws::String &&value)
Definition Metric.h:54
void SetNamespace(Aws::String &&value)
Definition Metric.h:51
AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream &oStream, const char *location) const
Metric & WithMetricName(Aws::String &&value)
Definition Metric.h:68
void SetMetricName(const char *value)
Definition Metric.h:66
Metric & WithMetricName(const Aws::String &value)
Definition Metric.h:67
Metric & WithNamespace(const char *value)
Definition Metric.h:55
Metric & WithDimensions(const Aws::Vector< Dimension > &value)
Definition Metric.h:80
AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
bool DimensionsHasBeenSet() const
Definition Metric.h:77
const Aws::String & GetMetricName() const
Definition Metric.h:62
AWS_CLOUDWATCH_API Metric()
void SetDimensions(Aws::Vector< Dimension > &&value)
Definition Metric.h:79
Metric & AddDimensions(const Dimension &value)
Definition Metric.h:82
void SetMetricName(Aws::String &&value)
Definition Metric.h:65
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