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

A dimension is a name/value pair that is part of the identity of a metric. * Because dimensions are part of the unique identifier for a metric, whenever you * add a unique name/value pair to one of your metrics, you are creating a new * variation of that metric. For example, many Amazon EC2 metrics publish * InstanceId as a dimension name, and the actual instance ID as the * value for that dimension.

You can assign up to 30 dimensions to a * metric.

See Also:

AWS * API Reference

*/ class Dimension { public: AWS_CLOUDWATCH_API Dimension(); AWS_CLOUDWATCH_API Dimension(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API Dimension& 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 name of the dimension. Dimension names must contain only ASCII * characters, must include at least one non-whitespace character, and cannot start * with a colon (:). ASCII control characters are not supported as * part of dimension names.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the dimension. Dimension names must contain only ASCII * characters, must include at least one non-whitespace character, and cannot start * with a colon (:). ASCII control characters are not supported as * part of dimension names.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the dimension. Dimension names must contain only ASCII * characters, must include at least one non-whitespace character, and cannot start * with a colon (:). ASCII control characters are not supported as * part of dimension names.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the dimension. Dimension names must contain only ASCII * characters, must include at least one non-whitespace character, and cannot start * with a colon (:). ASCII control characters are not supported as * part of dimension names.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the dimension. Dimension names must contain only ASCII * characters, must include at least one non-whitespace character, and cannot start * with a colon (:). ASCII control characters are not supported as * part of dimension names.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the dimension. Dimension names must contain only ASCII * characters, must include at least one non-whitespace character, and cannot start * with a colon (:). ASCII control characters are not supported as * part of dimension names.

*/ inline Dimension& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the dimension. Dimension names must contain only ASCII * characters, must include at least one non-whitespace character, and cannot start * with a colon (:). ASCII control characters are not supported as * part of dimension names.

*/ inline Dimension& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the dimension. Dimension names must contain only ASCII * characters, must include at least one non-whitespace character, and cannot start * with a colon (:). ASCII control characters are not supported as * part of dimension names.

*/ inline Dimension& WithName(const char* value) { SetName(value); return *this;} /** *

The value of the dimension. Dimension values must contain only ASCII * characters and must include at least one non-whitespace character. ASCII control * characters are not supported as part of dimension values.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

The value of the dimension. Dimension values must contain only ASCII * characters and must include at least one non-whitespace character. ASCII control * characters are not supported as part of dimension values.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The value of the dimension. Dimension values must contain only ASCII * characters and must include at least one non-whitespace character. ASCII control * characters are not supported as part of dimension values.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The value of the dimension. Dimension values must contain only ASCII * characters and must include at least one non-whitespace character. ASCII control * characters are not supported as part of dimension values.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The value of the dimension. Dimension values must contain only ASCII * characters and must include at least one non-whitespace character. ASCII control * characters are not supported as part of dimension values.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

The value of the dimension. Dimension values must contain only ASCII * characters and must include at least one non-whitespace character. ASCII control * characters are not supported as part of dimension values.

*/ inline Dimension& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

The value of the dimension. Dimension values must contain only ASCII * characters and must include at least one non-whitespace character. ASCII control * characters are not supported as part of dimension values.

*/ inline Dimension& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

The value of the dimension. Dimension values must contain only ASCII * characters and must include at least one non-whitespace character. ASCII control * characters are not supported as part of dimension values.

*/ inline Dimension& WithValue(const char* value) { SetValue(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_value; bool m_valueHasBeenSet = false; }; } // namespace Model } // namespace CloudWatch } // namespace Aws