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

A scale-in or scale-out rule that defines scaling activity, including the * CloudWatch metric alarm that triggers activity, how Amazon EC2 instances are * added or removed, and the periodicity of adjustments. The automatic scaling * policy for an instance group can comprise one or more automatic scaling * rules.

See Also:

AWS * API Reference

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

The name used to identify an automatic scaling rule. Rule names must be * unique within a scaling policy.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name used to identify an automatic scaling rule. Rule names must be * unique within a scaling policy.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name used to identify an automatic scaling rule. Rule names must be * unique within a scaling policy.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name used to identify an automatic scaling rule. Rule names must be * unique within a scaling policy.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name used to identify an automatic scaling rule. Rule names must be * unique within a scaling policy.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name used to identify an automatic scaling rule. Rule names must be * unique within a scaling policy.

*/ inline ScalingRule& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name used to identify an automatic scaling rule. Rule names must be * unique within a scaling policy.

*/ inline ScalingRule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name used to identify an automatic scaling rule. Rule names must be * unique within a scaling policy.

*/ inline ScalingRule& WithName(const char* value) { SetName(value); return *this;} /** *

A friendly, more verbose description of the automatic scaling rule.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A friendly, more verbose description of the automatic scaling rule.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A friendly, more verbose description of the automatic scaling rule.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A friendly, more verbose description of the automatic scaling rule.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A friendly, more verbose description of the automatic scaling rule.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A friendly, more verbose description of the automatic scaling rule.

*/ inline ScalingRule& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A friendly, more verbose description of the automatic scaling rule.

*/ inline ScalingRule& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A friendly, more verbose description of the automatic scaling rule.

*/ inline ScalingRule& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The conditions that trigger an automatic scaling activity.

*/ inline const ScalingAction& GetAction() const{ return m_action; } /** *

The conditions that trigger an automatic scaling activity.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The conditions that trigger an automatic scaling activity.

*/ inline void SetAction(const ScalingAction& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The conditions that trigger an automatic scaling activity.

*/ inline void SetAction(ScalingAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The conditions that trigger an automatic scaling activity.

*/ inline ScalingRule& WithAction(const ScalingAction& value) { SetAction(value); return *this;} /** *

The conditions that trigger an automatic scaling activity.

*/ inline ScalingRule& WithAction(ScalingAction&& value) { SetAction(std::move(value)); return *this;} /** *

The CloudWatch alarm definition that determines when automatic scaling * activity is triggered.

*/ inline const ScalingTrigger& GetTrigger() const{ return m_trigger; } /** *

The CloudWatch alarm definition that determines when automatic scaling * activity is triggered.

*/ inline bool TriggerHasBeenSet() const { return m_triggerHasBeenSet; } /** *

The CloudWatch alarm definition that determines when automatic scaling * activity is triggered.

*/ inline void SetTrigger(const ScalingTrigger& value) { m_triggerHasBeenSet = true; m_trigger = value; } /** *

The CloudWatch alarm definition that determines when automatic scaling * activity is triggered.

*/ inline void SetTrigger(ScalingTrigger&& value) { m_triggerHasBeenSet = true; m_trigger = std::move(value); } /** *

The CloudWatch alarm definition that determines when automatic scaling * activity is triggered.

*/ inline ScalingRule& WithTrigger(const ScalingTrigger& value) { SetTrigger(value); return *this;} /** *

The CloudWatch alarm definition that determines when automatic scaling * activity is triggered.

*/ inline ScalingRule& WithTrigger(ScalingTrigger&& value) { SetTrigger(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; ScalingAction m_action; bool m_actionHasBeenSet = false; ScalingTrigger m_trigger; bool m_triggerHasBeenSet = false; }; } // namespace Model } // namespace EMR } // namespace Aws