AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
RefreshPreferences.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/autoscaling/model/AlarmSpecification.h>
9#include <aws/autoscaling/model/ScaleInProtectedInstances.h>
10#include <aws/autoscaling/model/StandbyInstances.h>
11#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace AutoScaling {
23namespace Model {
24
32 public:
33 AWS_AUTOSCALING_API RefreshPreferences() = default;
34 AWS_AUTOSCALING_API RefreshPreferences(const Aws::Utils::Xml::XmlNode& xmlNode);
35 AWS_AUTOSCALING_API RefreshPreferences& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
36
37 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
38 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
39
41
49 inline int GetMinHealthyPercentage() const { return m_minHealthyPercentage; }
50 inline bool MinHealthyPercentageHasBeenSet() const { return m_minHealthyPercentageHasBeenSet; }
51 inline void SetMinHealthyPercentage(int value) {
52 m_minHealthyPercentageHasBeenSet = true;
53 m_minHealthyPercentage = value;
54 }
57 return *this;
58 }
60
62
75 inline int GetInstanceWarmup() const { return m_instanceWarmup; }
76 inline bool InstanceWarmupHasBeenSet() const { return m_instanceWarmupHasBeenSet; }
77 inline void SetInstanceWarmup(int value) {
78 m_instanceWarmupHasBeenSet = true;
79 m_instanceWarmup = value;
80 }
82 SetInstanceWarmup(value);
83 return *this;
84 }
86
88
97 inline const Aws::Vector<int>& GetCheckpointPercentages() const { return m_checkpointPercentages; }
98 inline bool CheckpointPercentagesHasBeenSet() const { return m_checkpointPercentagesHasBeenSet; }
99 template <typename CheckpointPercentagesT = Aws::Vector<int>>
100 void SetCheckpointPercentages(CheckpointPercentagesT&& value) {
101 m_checkpointPercentagesHasBeenSet = true;
102 m_checkpointPercentages = std::forward<CheckpointPercentagesT>(value);
103 }
104 template <typename CheckpointPercentagesT = Aws::Vector<int>>
105 RefreshPreferences& WithCheckpointPercentages(CheckpointPercentagesT&& value) {
106 SetCheckpointPercentages(std::forward<CheckpointPercentagesT>(value));
107 return *this;
108 }
110 m_checkpointPercentagesHasBeenSet = true;
111 m_checkpointPercentages.push_back(value);
112 return *this;
113 }
115
117
125 inline int GetCheckpointDelay() const { return m_checkpointDelay; }
126 inline bool CheckpointDelayHasBeenSet() const { return m_checkpointDelayHasBeenSet; }
127 inline void SetCheckpointDelay(int value) {
128 m_checkpointDelayHasBeenSet = true;
129 m_checkpointDelay = value;
130 }
132 SetCheckpointDelay(value);
133 return *this;
134 }
136
138
149 inline bool GetSkipMatching() const { return m_skipMatching; }
150 inline bool SkipMatchingHasBeenSet() const { return m_skipMatchingHasBeenSet; }
151 inline void SetSkipMatching(bool value) {
152 m_skipMatchingHasBeenSet = true;
153 m_skipMatching = value;
154 }
156 SetSkipMatching(value);
157 return *this;
158 }
160
162
177 inline bool GetAutoRollback() const { return m_autoRollback; }
178 inline bool AutoRollbackHasBeenSet() const { return m_autoRollbackHasBeenSet; }
179 inline void SetAutoRollback(bool value) {
180 m_autoRollbackHasBeenSet = true;
181 m_autoRollback = value;
182 }
184 SetAutoRollback(value);
185 return *this;
186 }
188
190
200 inline ScaleInProtectedInstances GetScaleInProtectedInstances() const { return m_scaleInProtectedInstances; }
201 inline bool ScaleInProtectedInstancesHasBeenSet() const { return m_scaleInProtectedInstancesHasBeenSet; }
203 m_scaleInProtectedInstancesHasBeenSet = true;
204 m_scaleInProtectedInstances = value;
205 }
208 return *this;
209 }
211
213
224 inline StandbyInstances GetStandbyInstances() const { return m_standbyInstances; }
225 inline bool StandbyInstancesHasBeenSet() const { return m_standbyInstancesHasBeenSet; }
227 m_standbyInstancesHasBeenSet = true;
228 m_standbyInstances = value;
229 }
231 SetStandbyInstances(value);
232 return *this;
233 }
235
237
241 inline const AlarmSpecification& GetAlarmSpecification() const { return m_alarmSpecification; }
242 inline bool AlarmSpecificationHasBeenSet() const { return m_alarmSpecificationHasBeenSet; }
243 template <typename AlarmSpecificationT = AlarmSpecification>
244 void SetAlarmSpecification(AlarmSpecificationT&& value) {
245 m_alarmSpecificationHasBeenSet = true;
246 m_alarmSpecification = std::forward<AlarmSpecificationT>(value);
247 }
248 template <typename AlarmSpecificationT = AlarmSpecification>
249 RefreshPreferences& WithAlarmSpecification(AlarmSpecificationT&& value) {
250 SetAlarmSpecification(std::forward<AlarmSpecificationT>(value));
251 return *this;
252 }
254
256
268 inline int GetMaxHealthyPercentage() const { return m_maxHealthyPercentage; }
269 inline bool MaxHealthyPercentageHasBeenSet() const { return m_maxHealthyPercentageHasBeenSet; }
270 inline void SetMaxHealthyPercentage(int value) {
271 m_maxHealthyPercentageHasBeenSet = true;
272 m_maxHealthyPercentage = value;
273 }
276 return *this;
277 }
279
281
285 inline int GetBakeTime() const { return m_bakeTime; }
286 inline bool BakeTimeHasBeenSet() const { return m_bakeTimeHasBeenSet; }
287 inline void SetBakeTime(int value) {
288 m_bakeTimeHasBeenSet = true;
289 m_bakeTime = value;
290 }
291 inline RefreshPreferences& WithBakeTime(int value) {
292 SetBakeTime(value);
293 return *this;
294 }
296 private:
297 int m_minHealthyPercentage{0};
298
299 int m_instanceWarmup{0};
300
301 Aws::Vector<int> m_checkpointPercentages;
302
303 int m_checkpointDelay{0};
304
305 bool m_skipMatching{false};
306
307 bool m_autoRollback{false};
308
310
312
313 AlarmSpecification m_alarmSpecification;
314
315 int m_maxHealthyPercentage{0};
316
317 int m_bakeTime{0};
318 bool m_minHealthyPercentageHasBeenSet = false;
319 bool m_instanceWarmupHasBeenSet = false;
320 bool m_checkpointPercentagesHasBeenSet = false;
321 bool m_checkpointDelayHasBeenSet = false;
322 bool m_skipMatchingHasBeenSet = false;
323 bool m_autoRollbackHasBeenSet = false;
324 bool m_scaleInProtectedInstancesHasBeenSet = false;
325 bool m_standbyInstancesHasBeenSet = false;
326 bool m_alarmSpecificationHasBeenSet = false;
327 bool m_maxHealthyPercentageHasBeenSet = false;
328 bool m_bakeTimeHasBeenSet = false;
329};
330
331} // namespace Model
332} // namespace AutoScaling
333} // namespace Aws
RefreshPreferences & WithMinHealthyPercentage(int value)
ScaleInProtectedInstances GetScaleInProtectedInstances() const
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
RefreshPreferences & WithMaxHealthyPercentage(int value)
AWS_AUTOSCALING_API RefreshPreferences & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
RefreshPreferences & WithAutoRollback(bool value)
RefreshPreferences & WithCheckpointPercentages(CheckpointPercentagesT &&value)
RefreshPreferences & WithAlarmSpecification(AlarmSpecificationT &&value)
RefreshPreferences & WithBakeTime(int value)
void SetScaleInProtectedInstances(ScaleInProtectedInstances value)
const AlarmSpecification & GetAlarmSpecification() const
RefreshPreferences & WithInstanceWarmup(int value)
void SetAlarmSpecification(AlarmSpecificationT &&value)
RefreshPreferences & AddCheckpointPercentages(int value)
RefreshPreferences & WithScaleInProtectedInstances(ScaleInProtectedInstances value)
const Aws::Vector< int > & GetCheckpointPercentages() const
AWS_AUTOSCALING_API RefreshPreferences()=default
void SetCheckpointPercentages(CheckpointPercentagesT &&value)
RefreshPreferences & WithStandbyInstances(StandbyInstances value)
RefreshPreferences & WithSkipMatching(bool value)
RefreshPreferences & WithCheckpointDelay(int value)
AWS_AUTOSCALING_API RefreshPreferences(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetStandbyInstances(StandbyInstances value)
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream