AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
AutoScalingThresholds.h
1
6#pragma once
7#include <aws/opsworks/OpsWorks_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace OpsWorks
23{
24namespace Model
25{
26
35 {
36 public:
37 AWS_OPSWORKS_API AutoScalingThresholds() = default;
40 AWS_OPSWORKS_API Aws::Utils::Json::JsonValue Jsonize() const;
41
42
44
48 inline int GetInstanceCount() const { return m_instanceCount; }
49 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
50 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
51 inline AutoScalingThresholds& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
53
55
59 inline int GetThresholdsWaitTime() const { return m_thresholdsWaitTime; }
60 inline bool ThresholdsWaitTimeHasBeenSet() const { return m_thresholdsWaitTimeHasBeenSet; }
61 inline void SetThresholdsWaitTime(int value) { m_thresholdsWaitTimeHasBeenSet = true; m_thresholdsWaitTime = value; }
62 inline AutoScalingThresholds& WithThresholdsWaitTime(int value) { SetThresholdsWaitTime(value); return *this;}
64
66
76 inline int GetIgnoreMetricsTime() const { return m_ignoreMetricsTime; }
77 inline bool IgnoreMetricsTimeHasBeenSet() const { return m_ignoreMetricsTimeHasBeenSet; }
78 inline void SetIgnoreMetricsTime(int value) { m_ignoreMetricsTimeHasBeenSet = true; m_ignoreMetricsTime = value; }
79 inline AutoScalingThresholds& WithIgnoreMetricsTime(int value) { SetIgnoreMetricsTime(value); return *this;}
81
83
87 inline double GetCpuThreshold() const { return m_cpuThreshold; }
88 inline bool CpuThresholdHasBeenSet() const { return m_cpuThresholdHasBeenSet; }
89 inline void SetCpuThreshold(double value) { m_cpuThresholdHasBeenSet = true; m_cpuThreshold = value; }
90 inline AutoScalingThresholds& WithCpuThreshold(double value) { SetCpuThreshold(value); return *this;}
92
94
98 inline double GetMemoryThreshold() const { return m_memoryThreshold; }
99 inline bool MemoryThresholdHasBeenSet() const { return m_memoryThresholdHasBeenSet; }
100 inline void SetMemoryThreshold(double value) { m_memoryThresholdHasBeenSet = true; m_memoryThreshold = value; }
101 inline AutoScalingThresholds& WithMemoryThreshold(double value) { SetMemoryThreshold(value); return *this;}
103
105
111 inline double GetLoadThreshold() const { return m_loadThreshold; }
112 inline bool LoadThresholdHasBeenSet() const { return m_loadThresholdHasBeenSet; }
113 inline void SetLoadThreshold(double value) { m_loadThresholdHasBeenSet = true; m_loadThreshold = value; }
114 inline AutoScalingThresholds& WithLoadThreshold(double value) { SetLoadThreshold(value); return *this;}
116
118
128 inline const Aws::Vector<Aws::String>& GetAlarms() const { return m_alarms; }
129 inline bool AlarmsHasBeenSet() const { return m_alarmsHasBeenSet; }
130 template<typename AlarmsT = Aws::Vector<Aws::String>>
131 void SetAlarms(AlarmsT&& value) { m_alarmsHasBeenSet = true; m_alarms = std::forward<AlarmsT>(value); }
132 template<typename AlarmsT = Aws::Vector<Aws::String>>
133 AutoScalingThresholds& WithAlarms(AlarmsT&& value) { SetAlarms(std::forward<AlarmsT>(value)); return *this;}
134 template<typename AlarmsT = Aws::String>
135 AutoScalingThresholds& AddAlarms(AlarmsT&& value) { m_alarmsHasBeenSet = true; m_alarms.emplace_back(std::forward<AlarmsT>(value)); return *this; }
137 private:
138
139 int m_instanceCount{0};
140 bool m_instanceCountHasBeenSet = false;
141
142 int m_thresholdsWaitTime{0};
143 bool m_thresholdsWaitTimeHasBeenSet = false;
144
145 int m_ignoreMetricsTime{0};
146 bool m_ignoreMetricsTimeHasBeenSet = false;
147
148 double m_cpuThreshold{0.0};
149 bool m_cpuThresholdHasBeenSet = false;
150
151 double m_memoryThreshold{0.0};
152 bool m_memoryThresholdHasBeenSet = false;
153
154 double m_loadThreshold{0.0};
155 bool m_loadThresholdHasBeenSet = false;
156
158 bool m_alarmsHasBeenSet = false;
159 };
160
161} // namespace Model
162} // namespace OpsWorks
163} // namespace Aws
AutoScalingThresholds & WithCpuThreshold(double value)
AutoScalingThresholds & AddAlarms(AlarmsT &&value)
AWS_OPSWORKS_API AutoScalingThresholds(Aws::Utils::Json::JsonView jsonValue)
AutoScalingThresholds & WithIgnoreMetricsTime(int value)
AWS_OPSWORKS_API AutoScalingThresholds & operator=(Aws::Utils::Json::JsonView jsonValue)
AutoScalingThresholds & WithAlarms(AlarmsT &&value)
AWS_OPSWORKS_API Aws::Utils::Json::JsonValue Jsonize() const
AutoScalingThresholds & WithMemoryThreshold(double value)
AutoScalingThresholds & WithInstanceCount(int value)
const Aws::Vector< Aws::String > & GetAlarms() const
AWS_OPSWORKS_API AutoScalingThresholds()=default
AutoScalingThresholds & WithThresholdsWaitTime(int value)
AutoScalingThresholds & WithLoadThreshold(double value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue