AWS SDK for C++  0.12.9
AWS SDK for C++
EnabledMetric.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Xml
25 {
26  class XmlNode;
27 } // namespace Xml
28 } // namespace Utils
29 namespace AutoScaling
30 {
31 namespace Model
32 {
33 
38  {
39  public:
40  EnabledMetric();
42  EnabledMetric& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43 
44  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
45  void OutputToStream(Aws::OStream& oStream, const char* location) const;
46 
58  inline const Aws::String& GetMetric() const{ return m_metric; }
59 
71  inline void SetMetric(const Aws::String& value) { m_metricHasBeenSet = true; m_metric = value; }
72 
84  inline void SetMetric(Aws::String&& value) { m_metricHasBeenSet = true; m_metric = value; }
85 
97  inline void SetMetric(const char* value) { m_metricHasBeenSet = true; m_metric.assign(value); }
98 
110  inline EnabledMetric& WithMetric(const Aws::String& value) { SetMetric(value); return *this;}
111 
123  inline EnabledMetric& WithMetric(Aws::String&& value) { SetMetric(value); return *this;}
124 
136  inline EnabledMetric& WithMetric(const char* value) { SetMetric(value); return *this;}
137 
142  inline const Aws::String& GetGranularity() const{ return m_granularity; }
143 
148  inline void SetGranularity(const Aws::String& value) { m_granularityHasBeenSet = true; m_granularity = value; }
149 
154  inline void SetGranularity(Aws::String&& value) { m_granularityHasBeenSet = true; m_granularity = value; }
155 
160  inline void SetGranularity(const char* value) { m_granularityHasBeenSet = true; m_granularity.assign(value); }
161 
166  inline EnabledMetric& WithGranularity(const Aws::String& value) { SetGranularity(value); return *this;}
167 
172  inline EnabledMetric& WithGranularity(Aws::String&& value) { SetGranularity(value); return *this;}
173 
178  inline EnabledMetric& WithGranularity(const char* value) { SetGranularity(value); return *this;}
179 
180  private:
181  Aws::String m_metric;
182  bool m_metricHasBeenSet;
183  Aws::String m_granularity;
184  bool m_granularityHasBeenSet;
185  };
186 
187 } // namespace Model
188 } // namespace AutoScaling
189 } // namespace Aws
void SetGranularity(Aws::String &&value)
void SetGranularity(const Aws::String &value)
const Aws::String & GetGranularity() const
void SetMetric(Aws::String &&value)
Definition: EnabledMetric.h:84
EnabledMetric & WithGranularity(const char *value)
const Aws::String & GetMetric() const
Definition: EnabledMetric.h:58
EnabledMetric & WithGranularity(Aws::String &&value)
EnabledMetric & WithMetric(Aws::String &&value)
EnabledMetric & WithMetric(const Aws::String &value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetGranularity(const char *value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
EnabledMetric & WithGranularity(const Aws::String &value)
#define AWS_AUTOSCALING_API
EnabledMetric & WithMetric(const char *value)
void SetMetric(const char *value)
Definition: EnabledMetric.h:97
JSON (JavaScript Object Notation).
void SetMetric(const Aws::String &value)
Definition: EnabledMetric.h:71