7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/autoscaling/model/TargetTrackingConfiguration.h>
12#include <aws/autoscaling/model/PredictiveScalingConfiguration.h>
13#include <aws/autoscaling/model/StepAdjustment.h>
14#include <aws/autoscaling/model/Alarm.h>
53 template<
typename AutoScalingGroupNameT = Aws::String>
54 void SetAutoScalingGroupName(AutoScalingGroupNameT&& value) { m_autoScalingGroupNameHasBeenSet =
true; m_autoScalingGroupName = std::forward<AutoScalingGroupNameT>(value); }
55 template<
typename AutoScalingGroupNameT = Aws::String>
65 template<
typename PolicyNameT = Aws::String>
66 void SetPolicyName(PolicyNameT&& value) { m_policyNameHasBeenSet =
true; m_policyName = std::forward<PolicyNameT>(value); }
67 template<
typename PolicyNameT = Aws::String>
77 template<
typename PolicyARNT = Aws::String>
78 void SetPolicyARN(PolicyARNT&& value) { m_policyARNHasBeenSet =
true; m_policyARN = std::forward<PolicyARNT>(value); }
79 template<
typename PolicyARNT = Aws::String>
97 template<
typename PolicyTypeT = Aws::String>
98 void SetPolicyType(PolicyTypeT&& value) { m_policyTypeHasBeenSet =
true; m_policyType = std::forward<PolicyTypeT>(value); }
99 template<
typename PolicyTypeT = Aws::String>
111 template<
typename AdjustmentTypeT = Aws::String>
112 void SetAdjustmentType(AdjustmentTypeT&& value) { m_adjustmentTypeHasBeenSet =
true; m_adjustmentType = std::forward<AdjustmentTypeT>(value); }
113 template<
typename AdjustmentTypeT = Aws::String>
124 inline void SetMinAdjustmentStep(
int value) { m_minAdjustmentStepHasBeenSet =
true; m_minAdjustmentStep = value; }
147 inline void SetScalingAdjustment(
int value) { m_scalingAdjustmentHasBeenSet =
true; m_scalingAdjustment = value; }
157 inline void SetCooldown(
int value) { m_cooldownHasBeenSet =
true; m_cooldown = value; }
168 template<
typename StepAdjustmentsT = Aws::Vector<StepAdjustment>>
169 void SetStepAdjustments(StepAdjustmentsT&& value) { m_stepAdjustmentsHasBeenSet =
true; m_stepAdjustments = std::forward<StepAdjustmentsT>(value); }
170 template<
typename StepAdjustmentsT = Aws::Vector<StepAdjustment>>
172 template<
typename StepAdjustmentsT = StepAdjustment>
173 ScalingPolicy&
AddStepAdjustments(StepAdjustmentsT&& value) { m_stepAdjustmentsHasBeenSet =
true; m_stepAdjustments.emplace_back(std::forward<StepAdjustmentsT>(value));
return *
this; }
183 template<
typename MetricAggregationTypeT = Aws::String>
184 void SetMetricAggregationType(MetricAggregationTypeT&& value) { m_metricAggregationTypeHasBeenSet =
true; m_metricAggregationType = std::forward<MetricAggregationTypeT>(value); }
185 template<
typename MetricAggregationTypeT = Aws::String>
206 template<
typename AlarmsT = Aws::Vector<Alarm>>
207 void SetAlarms(AlarmsT&& value) { m_alarmsHasBeenSet =
true; m_alarms = std::forward<AlarmsT>(value); }
208 template<
typename AlarmsT = Aws::Vector<Alarm>>
210 template<
typename AlarmsT = Alarm>
211 ScalingPolicy&
AddAlarms(AlarmsT&& value) { m_alarmsHasBeenSet =
true; m_alarms.emplace_back(std::forward<AlarmsT>(value));
return *
this; }
220 template<
typename TargetTrackingConfigurationT = TargetTrackingConfiguration>
221 void SetTargetTrackingConfiguration(TargetTrackingConfigurationT&& value) { m_targetTrackingConfigurationHasBeenSet =
true; m_targetTrackingConfiguration = std::forward<TargetTrackingConfigurationT>(value); }
222 template<
typename TargetTrackingConfigurationT = TargetTrackingConfiguration>
233 inline void SetEnabled(
bool value) { m_enabledHasBeenSet =
true; m_enabled = value; }
243 template<
typename PredictiveScalingConfigurationT = PredictiveScalingConfiguration>
244 void SetPredictiveScalingConfiguration(PredictiveScalingConfigurationT&& value) { m_predictiveScalingConfigurationHasBeenSet =
true; m_predictiveScalingConfiguration = std::forward<PredictiveScalingConfigurationT>(value); }
245 template<
typename PredictiveScalingConfigurationT = PredictiveScalingConfiguration>
251 bool m_autoScalingGroupNameHasBeenSet =
false;
254 bool m_policyNameHasBeenSet =
false;
257 bool m_policyARNHasBeenSet =
false;
260 bool m_policyTypeHasBeenSet =
false;
263 bool m_adjustmentTypeHasBeenSet =
false;
265 int m_minAdjustmentStep{0};
266 bool m_minAdjustmentStepHasBeenSet =
false;
268 int m_minAdjustmentMagnitude{0};
269 bool m_minAdjustmentMagnitudeHasBeenSet =
false;
271 int m_scalingAdjustment{0};
272 bool m_scalingAdjustmentHasBeenSet =
false;
275 bool m_cooldownHasBeenSet =
false;
278 bool m_stepAdjustmentsHasBeenSet =
false;
281 bool m_metricAggregationTypeHasBeenSet =
false;
283 int m_estimatedInstanceWarmup{0};
284 bool m_estimatedInstanceWarmupHasBeenSet =
false;
287 bool m_alarmsHasBeenSet =
false;
289 TargetTrackingConfiguration m_targetTrackingConfiguration;
290 bool m_targetTrackingConfigurationHasBeenSet =
false;
292 bool m_enabled{
false};
293 bool m_enabledHasBeenSet =
false;
295 PredictiveScalingConfiguration m_predictiveScalingConfiguration;
296 bool m_predictiveScalingConfigurationHasBeenSet =
false;
const Aws::Vector< Alarm > & GetAlarms() const
void SetMinAdjustmentStep(int value)
void SetScalingAdjustment(int value)
void SetAdjustmentType(AdjustmentTypeT &&value)
void SetEnabled(bool value)
bool ScalingAdjustmentHasBeenSet() const
ScalingPolicy & WithEnabled(bool value)
void SetStepAdjustments(StepAdjustmentsT &&value)
void SetPolicyType(PolicyTypeT &&value)
bool MinAdjustmentMagnitudeHasBeenSet() const
const PredictiveScalingConfiguration & GetPredictiveScalingConfiguration() const
const Aws::String & GetPolicyName() const
bool StepAdjustmentsHasBeenSet() const
AWS_AUTOSCALING_API ScalingPolicy()=default
bool PolicyARNHasBeenSet() const
ScalingPolicy & WithScalingAdjustment(int value)
ScalingPolicy & WithEstimatedInstanceWarmup(int value)
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
bool AutoScalingGroupNameHasBeenSet() const
void SetMinAdjustmentMagnitude(int value)
int GetMinAdjustmentStep() const
bool AlarmsHasBeenSet() const
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_AUTOSCALING_API ScalingPolicy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
bool CooldownHasBeenSet() const
ScalingPolicy & WithMinAdjustmentStep(int value)
void SetAutoScalingGroupName(AutoScalingGroupNameT &&value)
bool EstimatedInstanceWarmupHasBeenSet() const
const Aws::String & GetPolicyARN() const
const Aws::Vector< StepAdjustment > & GetStepAdjustments() const
ScalingPolicy & WithPredictiveScalingConfiguration(PredictiveScalingConfigurationT &&value)
ScalingPolicy & WithAdjustmentType(AdjustmentTypeT &&value)
ScalingPolicy & AddAlarms(AlarmsT &&value)
ScalingPolicy & WithPolicyType(PolicyTypeT &&value)
ScalingPolicy & WithPolicyARN(PolicyARNT &&value)
void SetPolicyARN(PolicyARNT &&value)
void SetEstimatedInstanceWarmup(int value)
ScalingPolicy & WithMetricAggregationType(MetricAggregationTypeT &&value)
ScalingPolicy & WithMinAdjustmentMagnitude(int value)
int GetEstimatedInstanceWarmup() const
const Aws::String & GetPolicyType() const
bool MetricAggregationTypeHasBeenSet() const
ScalingPolicy & WithCooldown(int value)
bool PredictiveScalingConfigurationHasBeenSet() const
bool TargetTrackingConfigurationHasBeenSet() const
const Aws::String & GetMetricAggregationType() const
ScalingPolicy & WithAlarms(AlarmsT &&value)
AWS_AUTOSCALING_API ScalingPolicy(const Aws::Utils::Xml::XmlNode &xmlNode)
int GetScalingAdjustment() const
void SetPredictiveScalingConfiguration(PredictiveScalingConfigurationT &&value)
ScalingPolicy & AddStepAdjustments(StepAdjustmentsT &&value)
ScalingPolicy & WithTargetTrackingConfiguration(TargetTrackingConfigurationT &&value)
const Aws::String & GetAutoScalingGroupName() const
ScalingPolicy & WithPolicyName(PolicyNameT &&value)
void SetPolicyName(PolicyNameT &&value)
bool MinAdjustmentStepHasBeenSet() const
void SetCooldown(int value)
void SetMetricAggregationType(MetricAggregationTypeT &&value)
bool EnabledHasBeenSet() const
bool AdjustmentTypeHasBeenSet() const
bool PolicyTypeHasBeenSet() const
int GetMinAdjustmentMagnitude() const
const Aws::String & GetAdjustmentType() const
void SetAlarms(AlarmsT &&value)
ScalingPolicy & WithStepAdjustments(StepAdjustmentsT &&value)
void SetTargetTrackingConfiguration(TargetTrackingConfigurationT &&value)
bool PolicyNameHasBeenSet() const
const TargetTrackingConfiguration & GetTargetTrackingConfiguration() const
ScalingPolicy & WithAutoScalingGroupName(AutoScalingGroupNameT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream