/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace EMR { namespace Model { /** *

An automatic scaling policy for a core instance group or task instance group * in an Amazon EMR cluster. The automatic scaling policy defines how an instance * group dynamically adds and terminates Amazon EC2 instances in response to the * value of a CloudWatch metric. See PutAutoScalingPolicy.

See * Also:

AWS * API Reference

*/ class AutoScalingPolicyDescription { public: AWS_EMR_API AutoScalingPolicyDescription(); AWS_EMR_API AutoScalingPolicyDescription(Aws::Utils::Json::JsonView jsonValue); AWS_EMR_API AutoScalingPolicyDescription& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_EMR_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The status of an automatic scaling policy.

*/ inline const AutoScalingPolicyStatus& GetStatus() const{ return m_status; } /** *

The status of an automatic scaling policy.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of an automatic scaling policy.

*/ inline void SetStatus(const AutoScalingPolicyStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of an automatic scaling policy.

*/ inline void SetStatus(AutoScalingPolicyStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of an automatic scaling policy.

*/ inline AutoScalingPolicyDescription& WithStatus(const AutoScalingPolicyStatus& value) { SetStatus(value); return *this;} /** *

The status of an automatic scaling policy.

*/ inline AutoScalingPolicyDescription& WithStatus(AutoScalingPolicyStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline const ScalingConstraints& GetConstraints() const{ return m_constraints; } /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; } /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline void SetConstraints(const ScalingConstraints& value) { m_constraintsHasBeenSet = true; m_constraints = value; } /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline void SetConstraints(ScalingConstraints&& value) { m_constraintsHasBeenSet = true; m_constraints = std::move(value); } /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline AutoScalingPolicyDescription& WithConstraints(const ScalingConstraints& value) { SetConstraints(value); return *this;} /** *

The upper and lower Amazon EC2 instance limits for an automatic scaling * policy. Automatic scaling activity will not cause an instance group to grow * above or below these limits.

*/ inline AutoScalingPolicyDescription& WithConstraints(ScalingConstraints&& value) { SetConstraints(std::move(value)); return *this;} /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline const Aws::Vector& GetRules() const{ return m_rules; } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline void SetRules(const Aws::Vector& value) { m_rulesHasBeenSet = true; m_rules = value; } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline void SetRules(Aws::Vector&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline AutoScalingPolicyDescription& WithRules(const Aws::Vector& value) { SetRules(value); return *this;} /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline AutoScalingPolicyDescription& WithRules(Aws::Vector&& value) { SetRules(std::move(value)); return *this;} /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline AutoScalingPolicyDescription& AddRules(const ScalingRule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; } /** *

The scale-in and scale-out rules that comprise the automatic scaling * policy.

*/ inline AutoScalingPolicyDescription& AddRules(ScalingRule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; } private: AutoScalingPolicyStatus m_status; bool m_statusHasBeenSet = false; ScalingConstraints m_constraints; bool m_constraintsHasBeenSet = false; Aws::Vector m_rules; bool m_rulesHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws