AWS SDK for C++  0.14.3
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 
57  inline const Aws::String& GetMetric() const{ return m_metric; }
58 
69  inline void SetMetric(const Aws::String& value) { m_metricHasBeenSet = true; m_metric = value; }
70 
81  inline void SetMetric(Aws::String&& value) { m_metricHasBeenSet = true; m_metric = value; }
82 
93  inline void SetMetric(const char* value) { m_metricHasBeenSet = true; m_metric.assign(value); }
94 
105  inline EnabledMetric& WithMetric(const Aws::String& value) { SetMetric(value); return *this;}
106 
117  inline EnabledMetric& WithMetric(Aws::String&& value) { SetMetric(value); return *this;}
118 
129  inline EnabledMetric& WithMetric(const char* value) { SetMetric(value); return *this;}
130 
135  inline const Aws::String& GetGranularity() const{ return m_granularity; }
136 
141  inline void SetGranularity(const Aws::String& value) { m_granularityHasBeenSet = true; m_granularity = value; }
142 
147  inline void SetGranularity(Aws::String&& value) { m_granularityHasBeenSet = true; m_granularity = value; }
148 
153  inline void SetGranularity(const char* value) { m_granularityHasBeenSet = true; m_granularity.assign(value); }
154 
159  inline EnabledMetric& WithGranularity(const Aws::String& value) { SetGranularity(value); return *this;}
160 
165  inline EnabledMetric& WithGranularity(Aws::String&& value) { SetGranularity(value); return *this;}
166 
171  inline EnabledMetric& WithGranularity(const char* value) { SetGranularity(value); return *this;}
172 
173  private:
174  Aws::String m_metric;
175  bool m_metricHasBeenSet;
176  Aws::String m_granularity;
177  bool m_granularityHasBeenSet;
178  };
179 
180 } // namespace Model
181 } // namespace AutoScaling
182 } // 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:81
EnabledMetric & WithGranularity(const char *value)
const Aws::String & GetMetric() const
Definition: EnabledMetric.h:57
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:93
JSON (JavaScript Object Notation).
void SetMetric(const Aws::String &value)
Definition: EnabledMetric.h:69