/** * 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 OpsWorks { namespace Model { /** */ class SetLoadBasedAutoScalingRequest : public OpsWorksRequest { public: AWS_OPSWORKS_API SetLoadBasedAutoScalingRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "SetLoadBasedAutoScaling"; } AWS_OPSWORKS_API Aws::String SerializePayload() const override; AWS_OPSWORKS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

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 SetLoadBasedAutoScalingRequest& WithLayerId(const Aws::String& value) { SetLayerId(value); return *this;} /** *

The layer ID.

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

The layer ID.

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

Enables load-based auto scaling for the layer.

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

Enables load-based auto scaling for the layer.

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

Enables load-based auto scaling for the layer.

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

Enables load-based auto scaling for the layer.

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

An AutoScalingThresholds object with the upscaling threshold * configuration. If the load exceeds these thresholds for a specified amount of * time, AWS OpsWorks Stacks starts a specified number of instances.

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

An AutoScalingThresholds object with the upscaling threshold * configuration. If the load exceeds these thresholds for a specified amount of * time, AWS OpsWorks Stacks starts a specified number of instances.

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

An AutoScalingThresholds object with the upscaling threshold * configuration. If the load exceeds these thresholds for a specified amount of * time, AWS OpsWorks Stacks starts a specified number of instances.

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

An AutoScalingThresholds object with the upscaling threshold * configuration. If the load exceeds these thresholds for a specified amount of * time, AWS OpsWorks Stacks starts a specified number of instances.

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

An AutoScalingThresholds object with the upscaling threshold * configuration. If the load exceeds these thresholds for a specified amount of * time, AWS OpsWorks Stacks starts a specified number of instances.

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

An AutoScalingThresholds object with the upscaling threshold * configuration. If the load exceeds these thresholds for a specified amount of * time, AWS OpsWorks Stacks starts a specified number of instances.

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

An AutoScalingThresholds object with the downscaling threshold * configuration. If the load falls below these thresholds for a specified amount * of time, AWS OpsWorks Stacks stops a specified number of instances.

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

An AutoScalingThresholds object with the downscaling threshold * configuration. If the load falls below these thresholds for a specified amount * of time, AWS OpsWorks Stacks stops a specified number of instances.

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

An AutoScalingThresholds object with the downscaling threshold * configuration. If the load falls below these thresholds for a specified amount * of time, AWS OpsWorks Stacks stops a specified number of instances.

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

An AutoScalingThresholds object with the downscaling threshold * configuration. If the load falls below these thresholds for a specified amount * of time, AWS OpsWorks Stacks stops a specified number of instances.

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

An AutoScalingThresholds object with the downscaling threshold * configuration. If the load falls below these thresholds for a specified amount * of time, AWS OpsWorks Stacks stops a specified number of instances.

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

An AutoScalingThresholds object with the downscaling threshold * configuration. If the load falls below these thresholds for a specified amount * of time, AWS OpsWorks Stacks stops a specified number of instances.

*/ inline SetLoadBasedAutoScalingRequest& 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