AWS SDK for C++  0.12.9
AWS SDK for C++
AutoScalingThresholds.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 Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace OpsWorks
30 {
31 namespace Model
32 {
33 
40  {
41  public:
44  AutoScalingThresholds& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
45  Aws::Utils::Json::JsonValue Jsonize() const;
46 
51  inline long GetInstanceCount() const{ return m_instanceCount; }
52 
57  inline void SetInstanceCount(long value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
58 
63  inline AutoScalingThresholds& WithInstanceCount(long value) { SetInstanceCount(value); return *this;}
64 
69  inline long GetThresholdsWaitTime() const{ return m_thresholdsWaitTime; }
70 
75  inline void SetThresholdsWaitTime(long value) { m_thresholdsWaitTimeHasBeenSet = true; m_thresholdsWaitTime = value; }
76 
81  inline AutoScalingThresholds& WithThresholdsWaitTime(long value) { SetThresholdsWaitTime(value); return *this;}
82 
93  inline long GetIgnoreMetricsTime() const{ return m_ignoreMetricsTime; }
94 
105  inline void SetIgnoreMetricsTime(long value) { m_ignoreMetricsTimeHasBeenSet = true; m_ignoreMetricsTime = value; }
106 
117  inline AutoScalingThresholds& WithIgnoreMetricsTime(long value) { SetIgnoreMetricsTime(value); return *this;}
118 
123  inline double GetCpuThreshold() const{ return m_cpuThreshold; }
124 
129  inline void SetCpuThreshold(double value) { m_cpuThresholdHasBeenSet = true; m_cpuThreshold = value; }
130 
135  inline AutoScalingThresholds& WithCpuThreshold(double value) { SetCpuThreshold(value); return *this;}
136 
141  inline double GetMemoryThreshold() const{ return m_memoryThreshold; }
142 
147  inline void SetMemoryThreshold(double value) { m_memoryThresholdHasBeenSet = true; m_memoryThreshold = value; }
148 
153  inline AutoScalingThresholds& WithMemoryThreshold(double value) { SetMemoryThreshold(value); return *this;}
154 
161  inline double GetLoadThreshold() const{ return m_loadThreshold; }
162 
169  inline void SetLoadThreshold(double value) { m_loadThresholdHasBeenSet = true; m_loadThreshold = value; }
170 
177  inline AutoScalingThresholds& WithLoadThreshold(double value) { SetLoadThreshold(value); return *this;}
178 
189  inline const Aws::Vector<Aws::String>& GetAlarms() const{ return m_alarms; }
190 
201  inline void SetAlarms(const Aws::Vector<Aws::String>& value) { m_alarmsHasBeenSet = true; m_alarms = value; }
202 
213  inline void SetAlarms(Aws::Vector<Aws::String>&& value) { m_alarmsHasBeenSet = true; m_alarms = value; }
214 
225  inline AutoScalingThresholds& WithAlarms(const Aws::Vector<Aws::String>& value) { SetAlarms(value); return *this;}
226 
237  inline AutoScalingThresholds& WithAlarms(Aws::Vector<Aws::String>&& value) { SetAlarms(value); return *this;}
238 
249  inline AutoScalingThresholds& AddAlarms(const Aws::String& value) { m_alarmsHasBeenSet = true; m_alarms.push_back(value); return *this; }
250 
261  inline AutoScalingThresholds& AddAlarms(Aws::String&& value) { m_alarmsHasBeenSet = true; m_alarms.push_back(value); return *this; }
262 
273  inline AutoScalingThresholds& AddAlarms(const char* value) { m_alarmsHasBeenSet = true; m_alarms.push_back(value); return *this; }
274 
275  private:
276  long m_instanceCount;
277  bool m_instanceCountHasBeenSet;
278  long m_thresholdsWaitTime;
279  bool m_thresholdsWaitTimeHasBeenSet;
280  long m_ignoreMetricsTime;
281  bool m_ignoreMetricsTimeHasBeenSet;
282  double m_cpuThreshold;
283  bool m_cpuThresholdHasBeenSet;
284  double m_memoryThreshold;
285  bool m_memoryThresholdHasBeenSet;
286  double m_loadThreshold;
287  bool m_loadThresholdHasBeenSet;
288  Aws::Vector<Aws::String> m_alarms;
289  bool m_alarmsHasBeenSet;
290  };
291 
292 } // namespace Model
293 } // namespace OpsWorks
294 } // namespace Aws
AutoScalingThresholds & AddAlarms(Aws::String &&value)
AutoScalingThresholds & WithAlarms(const Aws::Vector< Aws::String > &value)
void SetAlarms(const Aws::Vector< Aws::String > &value)
AutoScalingThresholds & WithCpuThreshold(double value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
AutoScalingThresholds & WithAlarms(Aws::Vector< Aws::String > &&value)
AutoScalingThresholds & WithThresholdsWaitTime(long value)
AutoScalingThresholds & WithMemoryThreshold(double value)
AutoScalingThresholds & WithInstanceCount(long value)
AutoScalingThresholds & AddAlarms(const Aws::String &value)
AutoScalingThresholds & AddAlarms(const char *value)
void SetAlarms(Aws::Vector< Aws::String > &&value)
AutoScalingThresholds & WithLoadThreshold(double value)
AutoScalingThresholds & WithIgnoreMetricsTime(long value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_OPSWORKS_API
const Aws::Vector< Aws::String > & GetAlarms() const
JSON (JavaScript Object Notation).