/** * 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 Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes a request to cancel a Spot Instance.

See Also:

AWS * API Reference

*/ class CancelledSpotInstanceRequest { public: AWS_EC2_API CancelledSpotInstanceRequest(); AWS_EC2_API CancelledSpotInstanceRequest(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API CancelledSpotInstanceRequest& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The ID of the Spot Instance request.

*/ inline const Aws::String& GetSpotInstanceRequestId() const{ return m_spotInstanceRequestId; } /** *

The ID of the Spot Instance request.

*/ inline bool SpotInstanceRequestIdHasBeenSet() const { return m_spotInstanceRequestIdHasBeenSet; } /** *

The ID of the Spot Instance request.

*/ inline void SetSpotInstanceRequestId(const Aws::String& value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId = value; } /** *

The ID of the Spot Instance request.

*/ inline void SetSpotInstanceRequestId(Aws::String&& value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId = std::move(value); } /** *

The ID of the Spot Instance request.

*/ inline void SetSpotInstanceRequestId(const char* value) { m_spotInstanceRequestIdHasBeenSet = true; m_spotInstanceRequestId.assign(value); } /** *

The ID of the Spot Instance request.

*/ inline CancelledSpotInstanceRequest& WithSpotInstanceRequestId(const Aws::String& value) { SetSpotInstanceRequestId(value); return *this;} /** *

The ID of the Spot Instance request.

*/ inline CancelledSpotInstanceRequest& WithSpotInstanceRequestId(Aws::String&& value) { SetSpotInstanceRequestId(std::move(value)); return *this;} /** *

The ID of the Spot Instance request.

*/ inline CancelledSpotInstanceRequest& WithSpotInstanceRequestId(const char* value) { SetSpotInstanceRequestId(value); return *this;} /** *

The state of the Spot Instance request.

*/ inline const CancelSpotInstanceRequestState& GetState() const{ return m_state; } /** *

The state of the Spot Instance request.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The state of the Spot Instance request.

*/ inline void SetState(const CancelSpotInstanceRequestState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The state of the Spot Instance request.

*/ inline void SetState(CancelSpotInstanceRequestState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The state of the Spot Instance request.

*/ inline CancelledSpotInstanceRequest& WithState(const CancelSpotInstanceRequestState& value) { SetState(value); return *this;} /** *

The state of the Spot Instance request.

*/ inline CancelledSpotInstanceRequest& WithState(CancelSpotInstanceRequestState&& value) { SetState(std::move(value)); return *this;} private: Aws::String m_spotInstanceRequestId; bool m_spotInstanceRequestIdHasBeenSet = false; CancelSpotInstanceRequestState m_state; bool m_stateHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws