AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
MetricDataResult.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/StatusCode.h>
12#include <aws/core/utils/DateTime.h>
13#include <aws/monitoring/model/MessageData.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Xml
21{
22 class XmlNode;
23} // namespace Xml
24} // namespace Utils
25namespace CloudWatch
26{
27namespace Model
28{
29
39 {
40 public:
41 AWS_CLOUDWATCH_API MetricDataResult() = default;
42 AWS_CLOUDWATCH_API MetricDataResult(const Aws::Utils::Xml::XmlNode& xmlNode);
43 AWS_CLOUDWATCH_API MetricDataResult& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44
45 AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46 AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
47
48
50
53 inline const Aws::String& GetId() const { return m_id; }
54 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
55 template<typename IdT = Aws::String>
56 void SetId(IdT&& value) { m_idHasBeenSet = true; m_id = std::forward<IdT>(value); }
57 template<typename IdT = Aws::String>
58 MetricDataResult& WithId(IdT&& value) { SetId(std::forward<IdT>(value)); return *this;}
60
62
65 inline const Aws::String& GetLabel() const { return m_label; }
66 inline bool LabelHasBeenSet() const { return m_labelHasBeenSet; }
67 template<typename LabelT = Aws::String>
68 void SetLabel(LabelT&& value) { m_labelHasBeenSet = true; m_label = std::forward<LabelT>(value); }
69 template<typename LabelT = Aws::String>
70 MetricDataResult& WithLabel(LabelT&& value) { SetLabel(std::forward<LabelT>(value)); return *this;}
72
74
79 inline const Aws::Vector<Aws::Utils::DateTime>& GetTimestamps() const { return m_timestamps; }
80 inline bool TimestampsHasBeenSet() const { return m_timestampsHasBeenSet; }
81 template<typename TimestampsT = Aws::Vector<Aws::Utils::DateTime>>
82 void SetTimestamps(TimestampsT&& value) { m_timestampsHasBeenSet = true; m_timestamps = std::forward<TimestampsT>(value); }
83 template<typename TimestampsT = Aws::Vector<Aws::Utils::DateTime>>
84 MetricDataResult& WithTimestamps(TimestampsT&& value) { SetTimestamps(std::forward<TimestampsT>(value)); return *this;}
85 template<typename TimestampsT = Aws::Utils::DateTime>
86 MetricDataResult& AddTimestamps(TimestampsT&& value) { m_timestampsHasBeenSet = true; m_timestamps.emplace_back(std::forward<TimestampsT>(value)); return *this; }
88
90
95 inline const Aws::Vector<double>& GetValues() const { return m_values; }
96 inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
97 template<typename ValuesT = Aws::Vector<double>>
98 void SetValues(ValuesT&& value) { m_valuesHasBeenSet = true; m_values = std::forward<ValuesT>(value); }
99 template<typename ValuesT = Aws::Vector<double>>
100 MetricDataResult& WithValues(ValuesT&& value) { SetValues(std::forward<ValuesT>(value)); return *this;}
101 inline MetricDataResult& AddValues(double value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
103
105
114 inline StatusCode GetStatusCode() const { return m_statusCode; }
115 inline bool StatusCodeHasBeenSet() const { return m_statusCodeHasBeenSet; }
116 inline void SetStatusCode(StatusCode value) { m_statusCodeHasBeenSet = true; m_statusCode = value; }
117 inline MetricDataResult& WithStatusCode(StatusCode value) { SetStatusCode(value); return *this;}
119
121
124 inline const Aws::Vector<MessageData>& GetMessages() const { return m_messages; }
125 inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; }
126 template<typename MessagesT = Aws::Vector<MessageData>>
127 void SetMessages(MessagesT&& value) { m_messagesHasBeenSet = true; m_messages = std::forward<MessagesT>(value); }
128 template<typename MessagesT = Aws::Vector<MessageData>>
129 MetricDataResult& WithMessages(MessagesT&& value) { SetMessages(std::forward<MessagesT>(value)); return *this;}
130 template<typename MessagesT = MessageData>
131 MetricDataResult& AddMessages(MessagesT&& value) { m_messagesHasBeenSet = true; m_messages.emplace_back(std::forward<MessagesT>(value)); return *this; }
133 private:
134
135 Aws::String m_id;
136 bool m_idHasBeenSet = false;
137
138 Aws::String m_label;
139 bool m_labelHasBeenSet = false;
140
142 bool m_timestampsHasBeenSet = false;
143
144 Aws::Vector<double> m_values;
145 bool m_valuesHasBeenSet = false;
146
147 StatusCode m_statusCode{StatusCode::NOT_SET};
148 bool m_statusCodeHasBeenSet = false;
149
150 Aws::Vector<MessageData> m_messages;
151 bool m_messagesHasBeenSet = false;
152 };
153
154} // namespace Model
155} // namespace CloudWatch
156} // namespace Aws
MetricDataResult & AddValues(double value)
const Aws::Vector< double > & GetValues() const
AWS_CLOUDWATCH_API MetricDataResult()=default
MetricDataResult & WithMessages(MessagesT &&value)
MetricDataResult & WithValues(ValuesT &&value)
MetricDataResult & WithStatusCode(StatusCode value)
MetricDataResult & WithTimestamps(TimestampsT &&value)
MetricDataResult & WithId(IdT &&value)
const Aws::Vector< MessageData > & GetMessages() const
AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_CLOUDWATCH_API MetricDataResult & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
MetricDataResult & WithLabel(LabelT &&value)
AWS_CLOUDWATCH_API MetricDataResult(const Aws::Utils::Xml::XmlNode &xmlNode)
MetricDataResult & AddMessages(MessagesT &&value)
MetricDataResult & AddTimestamps(TimestampsT &&value)
const Aws::Vector< Aws::Utils::DateTime > & GetTimestamps() const
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