1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
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 <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Xml
17 {
18   class XmlNode;
19 } // namespace Xml
20 } // namespace Utils
21 namespace CloudWatch
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>A dimension is a name/value pair that is part of the identity of a metric.
28    * You can assign up to 10 dimensions to a metric. Because dimensions are part of
29    * the unique identifier for a metric, whenever you add a unique name/value pair to
30    * one of your metrics, you are creating a new variation of that metric.
31    * </p><p><h3>See Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/Dimension">AWS
33    * API Reference</a></p>
34    */
35   class AWS_CLOUDWATCH_API Dimension
36   {
37   public:
38     Dimension();
39     Dimension(const Aws::Utils::Xml::XmlNode& xmlNode);
40     Dimension& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
41 
42     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
43     void OutputToStream(Aws::OStream& oStream, const char* location) const;
44 
45 
46     /**
47      * <p>The name of the dimension. Dimension names must contain only ASCII characters
48      * and must include at least one non-whitespace character.</p>
49      */
GetName()50     inline const Aws::String& GetName() const{ return m_name; }
51 
52     /**
53      * <p>The name of the dimension. Dimension names must contain only ASCII characters
54      * and must include at least one non-whitespace character.</p>
55      */
NameHasBeenSet()56     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
57 
58     /**
59      * <p>The name of the dimension. Dimension names must contain only ASCII characters
60      * and must include at least one non-whitespace character.</p>
61      */
SetName(const Aws::String & value)62     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
63 
64     /**
65      * <p>The name of the dimension. Dimension names must contain only ASCII characters
66      * and must include at least one non-whitespace character.</p>
67      */
SetName(Aws::String && value)68     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
69 
70     /**
71      * <p>The name of the dimension. Dimension names must contain only ASCII characters
72      * and must include at least one non-whitespace character.</p>
73      */
SetName(const char * value)74     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
75 
76     /**
77      * <p>The name of the dimension. Dimension names must contain only ASCII characters
78      * and must include at least one non-whitespace character.</p>
79      */
WithName(const Aws::String & value)80     inline Dimension& WithName(const Aws::String& value) { SetName(value); return *this;}
81 
82     /**
83      * <p>The name of the dimension. Dimension names must contain only ASCII characters
84      * and must include at least one non-whitespace character.</p>
85      */
WithName(Aws::String && value)86     inline Dimension& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
87 
88     /**
89      * <p>The name of the dimension. Dimension names must contain only ASCII characters
90      * and must include at least one non-whitespace character.</p>
91      */
WithName(const char * value)92     inline Dimension& WithName(const char* value) { SetName(value); return *this;}
93 
94 
95     /**
96      * <p>The value of the dimension. Dimension values must contain only ASCII
97      * characters and must include at least one non-whitespace character.</p>
98      */
GetValue()99     inline const Aws::String& GetValue() const{ return m_value; }
100 
101     /**
102      * <p>The value of the dimension. Dimension values must contain only ASCII
103      * characters and must include at least one non-whitespace character.</p>
104      */
ValueHasBeenSet()105     inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
106 
107     /**
108      * <p>The value of the dimension. Dimension values must contain only ASCII
109      * characters and must include at least one non-whitespace character.</p>
110      */
SetValue(const Aws::String & value)111     inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
112 
113     /**
114      * <p>The value of the dimension. Dimension values must contain only ASCII
115      * characters and must include at least one non-whitespace character.</p>
116      */
SetValue(Aws::String && value)117     inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
118 
119     /**
120      * <p>The value of the dimension. Dimension values must contain only ASCII
121      * characters and must include at least one non-whitespace character.</p>
122      */
SetValue(const char * value)123     inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
124 
125     /**
126      * <p>The value of the dimension. Dimension values must contain only ASCII
127      * characters and must include at least one non-whitespace character.</p>
128      */
WithValue(const Aws::String & value)129     inline Dimension& WithValue(const Aws::String& value) { SetValue(value); return *this;}
130 
131     /**
132      * <p>The value of the dimension. Dimension values must contain only ASCII
133      * characters and must include at least one non-whitespace character.</p>
134      */
WithValue(Aws::String && value)135     inline Dimension& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
136 
137     /**
138      * <p>The value of the dimension. Dimension values must contain only ASCII
139      * characters and must include at least one non-whitespace character.</p>
140      */
WithValue(const char * value)141     inline Dimension& WithValue(const char* value) { SetValue(value); return *this;}
142 
143   private:
144 
145     Aws::String m_name;
146     bool m_nameHasBeenSet;
147 
148     Aws::String m_value;
149     bool m_valueHasBeenSet;
150   };
151 
152 } // namespace Model
153 } // namespace CloudWatch
154 } // namespace Aws
155