/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace CloudWatch { namespace Model { /** *

A GetMetricData call returns an array of * MetricDataResult structures. Each of these structures includes the * data points for that metric, along with the timestamps of those data points and * other identifying information.

See Also:

AWS * API Reference

*/ class MetricDataResult { public: AWS_CLOUDWATCH_API MetricDataResult(); AWS_CLOUDWATCH_API MetricDataResult(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API MetricDataResult& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The short name you specified to represent this metric.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The short name you specified to represent this metric.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The short name you specified to represent this metric.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The short name you specified to represent this metric.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The short name you specified to represent this metric.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The short name you specified to represent this metric.

*/ inline MetricDataResult& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The short name you specified to represent this metric.

*/ inline MetricDataResult& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The short name you specified to represent this metric.

*/ inline MetricDataResult& WithId(const char* value) { SetId(value); return *this;} /** *

The human-readable label associated with the data.

*/ inline const Aws::String& GetLabel() const{ return m_label; } /** *

The human-readable label associated with the data.

*/ inline bool LabelHasBeenSet() const { return m_labelHasBeenSet; } /** *

The human-readable label associated with the data.

*/ inline void SetLabel(const Aws::String& value) { m_labelHasBeenSet = true; m_label = value; } /** *

The human-readable label associated with the data.

*/ inline void SetLabel(Aws::String&& value) { m_labelHasBeenSet = true; m_label = std::move(value); } /** *

The human-readable label associated with the data.

*/ inline void SetLabel(const char* value) { m_labelHasBeenSet = true; m_label.assign(value); } /** *

The human-readable label associated with the data.

*/ inline MetricDataResult& WithLabel(const Aws::String& value) { SetLabel(value); return *this;} /** *

The human-readable label associated with the data.

*/ inline MetricDataResult& WithLabel(Aws::String&& value) { SetLabel(std::move(value)); return *this;} /** *

The human-readable label associated with the data.

*/ inline MetricDataResult& WithLabel(const char* value) { SetLabel(value); return *this;} /** *

The timestamps for the data points, formatted in Unix timestamp format. The * number of timestamps always matches the number of values and the value for * Timestamps[x] is Values[x].

*/ inline const Aws::Vector& GetTimestamps() const{ return m_timestamps; } /** *

The timestamps for the data points, formatted in Unix timestamp format. The * number of timestamps always matches the number of values and the value for * Timestamps[x] is Values[x].

*/ inline bool TimestampsHasBeenSet() const { return m_timestampsHasBeenSet; } /** *

The timestamps for the data points, formatted in Unix timestamp format. The * number of timestamps always matches the number of values and the value for * Timestamps[x] is Values[x].

*/ inline void SetTimestamps(const Aws::Vector& value) { m_timestampsHasBeenSet = true; m_timestamps = value; } /** *

The timestamps for the data points, formatted in Unix timestamp format. The * number of timestamps always matches the number of values and the value for * Timestamps[x] is Values[x].

*/ inline void SetTimestamps(Aws::Vector&& value) { m_timestampsHasBeenSet = true; m_timestamps = std::move(value); } /** *

The timestamps for the data points, formatted in Unix timestamp format. The * number of timestamps always matches the number of values and the value for * Timestamps[x] is Values[x].

*/ inline MetricDataResult& WithTimestamps(const Aws::Vector& value) { SetTimestamps(value); return *this;} /** *

The timestamps for the data points, formatted in Unix timestamp format. The * number of timestamps always matches the number of values and the value for * Timestamps[x] is Values[x].

*/ inline MetricDataResult& WithTimestamps(Aws::Vector&& value) { SetTimestamps(std::move(value)); return *this;} /** *

The timestamps for the data points, formatted in Unix timestamp format. The * number of timestamps always matches the number of values and the value for * Timestamps[x] is Values[x].

*/ inline MetricDataResult& AddTimestamps(const Aws::Utils::DateTime& value) { m_timestampsHasBeenSet = true; m_timestamps.push_back(value); return *this; } /** *

The timestamps for the data points, formatted in Unix timestamp format. The * number of timestamps always matches the number of values and the value for * Timestamps[x] is Values[x].

*/ inline MetricDataResult& AddTimestamps(Aws::Utils::DateTime&& value) { m_timestampsHasBeenSet = true; m_timestamps.push_back(std::move(value)); return *this; } /** *

The data points for the metric corresponding to Timestamps. The * number of values always matches the number of timestamps and the timestamp for * Values[x] is Timestamps[x].

*/ inline const Aws::Vector& GetValues() const{ return m_values; } /** *

The data points for the metric corresponding to Timestamps. The * number of values always matches the number of timestamps and the timestamp for * Values[x] is Timestamps[x].

*/ inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; } /** *

The data points for the metric corresponding to Timestamps. The * number of values always matches the number of timestamps and the timestamp for * Values[x] is Timestamps[x].

*/ inline void SetValues(const Aws::Vector& value) { m_valuesHasBeenSet = true; m_values = value; } /** *

The data points for the metric corresponding to Timestamps. The * number of values always matches the number of timestamps and the timestamp for * Values[x] is Timestamps[x].

*/ inline void SetValues(Aws::Vector&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); } /** *

The data points for the metric corresponding to Timestamps. The * number of values always matches the number of timestamps and the timestamp for * Values[x] is Timestamps[x].

*/ inline MetricDataResult& WithValues(const Aws::Vector& value) { SetValues(value); return *this;} /** *

The data points for the metric corresponding to Timestamps. The * number of values always matches the number of timestamps and the timestamp for * Values[x] is Timestamps[x].

*/ inline MetricDataResult& WithValues(Aws::Vector&& value) { SetValues(std::move(value)); return *this;} /** *

The data points for the metric corresponding to Timestamps. The * number of values always matches the number of timestamps and the timestamp for * Values[x] is Timestamps[x].

*/ inline MetricDataResult& AddValues(double value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; } /** *

The status of the returned data. Complete indicates that all * data points in the requested time range were returned. PartialData * means that an incomplete set of data points were returned. You can use the * NextToken value that was returned and repeat your request to get * more data points. NextToken is not returned if you are performing a * math expression. InternalError indicates that an error occurred. * Retry your request using NextToken, if present.

*/ inline const StatusCode& GetStatusCode() const{ return m_statusCode; } /** *

The status of the returned data. Complete indicates that all * data points in the requested time range were returned. PartialData * means that an incomplete set of data points were returned. You can use the * NextToken value that was returned and repeat your request to get * more data points. NextToken is not returned if you are performing a * math expression. InternalError indicates that an error occurred. * Retry your request using NextToken, if present.

*/ inline bool StatusCodeHasBeenSet() const { return m_statusCodeHasBeenSet; } /** *

The status of the returned data. Complete indicates that all * data points in the requested time range were returned. PartialData * means that an incomplete set of data points were returned. You can use the * NextToken value that was returned and repeat your request to get * more data points. NextToken is not returned if you are performing a * math expression. InternalError indicates that an error occurred. * Retry your request using NextToken, if present.

*/ inline void SetStatusCode(const StatusCode& value) { m_statusCodeHasBeenSet = true; m_statusCode = value; } /** *

The status of the returned data. Complete indicates that all * data points in the requested time range were returned. PartialData * means that an incomplete set of data points were returned. You can use the * NextToken value that was returned and repeat your request to get * more data points. NextToken is not returned if you are performing a * math expression. InternalError indicates that an error occurred. * Retry your request using NextToken, if present.

*/ inline void SetStatusCode(StatusCode&& value) { m_statusCodeHasBeenSet = true; m_statusCode = std::move(value); } /** *

The status of the returned data. Complete indicates that all * data points in the requested time range were returned. PartialData * means that an incomplete set of data points were returned. You can use the * NextToken value that was returned and repeat your request to get * more data points. NextToken is not returned if you are performing a * math expression. InternalError indicates that an error occurred. * Retry your request using NextToken, if present.

*/ inline MetricDataResult& WithStatusCode(const StatusCode& value) { SetStatusCode(value); return *this;} /** *

The status of the returned data. Complete indicates that all * data points in the requested time range were returned. PartialData * means that an incomplete set of data points were returned. You can use the * NextToken value that was returned and repeat your request to get * more data points. NextToken is not returned if you are performing a * math expression. InternalError indicates that an error occurred. * Retry your request using NextToken, if present.

*/ inline MetricDataResult& WithStatusCode(StatusCode&& value) { SetStatusCode(std::move(value)); return *this;} /** *

A list of messages with additional information about the data returned.

*/ inline const Aws::Vector& GetMessages() const{ return m_messages; } /** *

A list of messages with additional information about the data returned.

*/ inline bool MessagesHasBeenSet() const { return m_messagesHasBeenSet; } /** *

A list of messages with additional information about the data returned.

*/ inline void SetMessages(const Aws::Vector& value) { m_messagesHasBeenSet = true; m_messages = value; } /** *

A list of messages with additional information about the data returned.

*/ inline void SetMessages(Aws::Vector&& value) { m_messagesHasBeenSet = true; m_messages = std::move(value); } /** *

A list of messages with additional information about the data returned.

*/ inline MetricDataResult& WithMessages(const Aws::Vector& value) { SetMessages(value); return *this;} /** *

A list of messages with additional information about the data returned.

*/ inline MetricDataResult& WithMessages(Aws::Vector&& value) { SetMessages(std::move(value)); return *this;} /** *

A list of messages with additional information about the data returned.

*/ inline MetricDataResult& AddMessages(const MessageData& value) { m_messagesHasBeenSet = true; m_messages.push_back(value); return *this; } /** *

A list of messages with additional information about the data returned.

*/ inline MetricDataResult& AddMessages(MessageData&& value) { m_messagesHasBeenSet = true; m_messages.push_back(std::move(value)); return *this; } private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_label; bool m_labelHasBeenSet = false; Aws::Vector m_timestamps; bool m_timestampsHasBeenSet = false; Aws::Vector m_values; bool m_valuesHasBeenSet = false; StatusCode m_statusCode; bool m_statusCodeHasBeenSet = false; Aws::Vector m_messages; bool m_messagesHasBeenSet = false; }; } // namespace Model } // namespace CloudWatch } // namespace Aws