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

Describes a layer's load-based auto scaling configuration.

See * Also:

AWS * API Reference

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

The layer ID.

*/ inline const Aws::String& GetLayerId() const{ return m_layerId; } /** *

The layer ID.

*/ inline bool LayerIdHasBeenSet() const { return m_layerIdHasBeenSet; } /** *

The layer ID.

*/ inline void SetLayerId(const Aws::String& value) { m_layerIdHasBeenSet = true; m_layerId = value; } /** *

The layer ID.

*/ inline void SetLayerId(Aws::String&& value) { m_layerIdHasBeenSet = true; m_layerId = std::move(value); } /** *

The layer ID.

*/ inline void SetLayerId(const char* value) { m_layerIdHasBeenSet = true; m_layerId.assign(value); } /** *

The layer ID.

*/ inline LoadBasedAutoScalingConfiguration& WithLayerId(const Aws::String& value) { SetLayerId(value); return *this;} /** *

The layer ID.

*/ inline LoadBasedAutoScalingConfiguration& WithLayerId(Aws::String&& value) { SetLayerId(std::move(value)); return *this;} /** *

The layer ID.

*/ inline LoadBasedAutoScalingConfiguration& WithLayerId(const char* value) { SetLayerId(value); return *this;} /** *

Whether load-based auto scaling is enabled for the layer.

*/ inline bool GetEnable() const{ return m_enable; } /** *

Whether load-based auto scaling is enabled for the layer.

*/ inline bool EnableHasBeenSet() const { return m_enableHasBeenSet; } /** *

Whether load-based auto scaling is enabled for the layer.

*/ inline void SetEnable(bool value) { m_enableHasBeenSet = true; m_enable = value; } /** *

Whether load-based auto scaling is enabled for the layer.

*/ inline LoadBasedAutoScalingConfiguration& WithEnable(bool value) { SetEnable(value); return *this;} /** *

An AutoScalingThresholds object that describes the upscaling * configuration, which defines how and when AWS OpsWorks Stacks increases the * number of instances.

*/ inline const AutoScalingThresholds& GetUpScaling() const{ return m_upScaling; } /** *

An AutoScalingThresholds object that describes the upscaling * configuration, which defines how and when AWS OpsWorks Stacks increases the * number of instances.

*/ inline bool UpScalingHasBeenSet() const { return m_upScalingHasBeenSet; } /** *

An AutoScalingThresholds object that describes the upscaling * configuration, which defines how and when AWS OpsWorks Stacks increases the * number of instances.

*/ inline void SetUpScaling(const AutoScalingThresholds& value) { m_upScalingHasBeenSet = true; m_upScaling = value; } /** *

An AutoScalingThresholds object that describes the upscaling * configuration, which defines how and when AWS OpsWorks Stacks increases the * number of instances.

*/ inline void SetUpScaling(AutoScalingThresholds&& value) { m_upScalingHasBeenSet = true; m_upScaling = std::move(value); } /** *

An AutoScalingThresholds object that describes the upscaling * configuration, which defines how and when AWS OpsWorks Stacks increases the * number of instances.

*/ inline LoadBasedAutoScalingConfiguration& WithUpScaling(const AutoScalingThresholds& value) { SetUpScaling(value); return *this;} /** *

An AutoScalingThresholds object that describes the upscaling * configuration, which defines how and when AWS OpsWorks Stacks increases the * number of instances.

*/ inline LoadBasedAutoScalingConfiguration& WithUpScaling(AutoScalingThresholds&& value) { SetUpScaling(std::move(value)); return *this;} /** *

An AutoScalingThresholds object that describes the downscaling * configuration, which defines how and when AWS OpsWorks Stacks reduces the number * of instances.

*/ inline const AutoScalingThresholds& GetDownScaling() const{ return m_downScaling; } /** *

An AutoScalingThresholds object that describes the downscaling * configuration, which defines how and when AWS OpsWorks Stacks reduces the number * of instances.

*/ inline bool DownScalingHasBeenSet() const { return m_downScalingHasBeenSet; } /** *

An AutoScalingThresholds object that describes the downscaling * configuration, which defines how and when AWS OpsWorks Stacks reduces the number * of instances.

*/ inline void SetDownScaling(const AutoScalingThresholds& value) { m_downScalingHasBeenSet = true; m_downScaling = value; } /** *

An AutoScalingThresholds object that describes the downscaling * configuration, which defines how and when AWS OpsWorks Stacks reduces the number * of instances.

*/ inline void SetDownScaling(AutoScalingThresholds&& value) { m_downScalingHasBeenSet = true; m_downScaling = std::move(value); } /** *

An AutoScalingThresholds object that describes the downscaling * configuration, which defines how and when AWS OpsWorks Stacks reduces the number * of instances.

*/ inline LoadBasedAutoScalingConfiguration& WithDownScaling(const AutoScalingThresholds& value) { SetDownScaling(value); return *this;} /** *

An AutoScalingThresholds object that describes the downscaling * configuration, which defines how and when AWS OpsWorks Stacks reduces the number * of instances.

*/ inline LoadBasedAutoScalingConfiguration& WithDownScaling(AutoScalingThresholds&& value) { SetDownScaling(std::move(value)); return *this;} private: Aws::String m_layerId; bool m_layerIdHasBeenSet = false; bool m_enable; bool m_enableHasBeenSet = false; AutoScalingThresholds m_upScaling; bool m_upScalingHasBeenSet = false; AutoScalingThresholds m_downScaling; bool m_downScalingHasBeenSet = false; }; } // namespace Model } // namespace OpsWorks } // namespace Aws