/** * 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 AutoScaling { namespace Model { /** */ class TerminateInstanceInAutoScalingGroupRequest : public AutoScalingRequest { public: AWS_AUTOSCALING_API TerminateInstanceInAutoScalingGroupRequest(); // 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 "TerminateInstanceInAutoScalingGroup"; } AWS_AUTOSCALING_API Aws::String SerializePayload() const override; protected: AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ID of the instance.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance.

*/ inline TerminateInstanceInAutoScalingGroupRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance.

*/ inline TerminateInstanceInAutoScalingGroupRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance.

*/ inline TerminateInstanceInAutoScalingGroupRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

Indicates whether terminating the instance also decrements the size of the * Auto Scaling group.

*/ inline bool GetShouldDecrementDesiredCapacity() const{ return m_shouldDecrementDesiredCapacity; } /** *

Indicates whether terminating the instance also decrements the size of the * Auto Scaling group.

*/ inline bool ShouldDecrementDesiredCapacityHasBeenSet() const { return m_shouldDecrementDesiredCapacityHasBeenSet; } /** *

Indicates whether terminating the instance also decrements the size of the * Auto Scaling group.

*/ inline void SetShouldDecrementDesiredCapacity(bool value) { m_shouldDecrementDesiredCapacityHasBeenSet = true; m_shouldDecrementDesiredCapacity = value; } /** *

Indicates whether terminating the instance also decrements the size of the * Auto Scaling group.

*/ inline TerminateInstanceInAutoScalingGroupRequest& WithShouldDecrementDesiredCapacity(bool value) { SetShouldDecrementDesiredCapacity(value); return *this;} private: Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; bool m_shouldDecrementDesiredCapacity; bool m_shouldDecrementDesiredCapacityHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws