/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Xml { class XmlDocument; } // namespace Xml } // namespace Utils namespace EC2 { namespace Model { /** *

Describes volume attachment details.

See Also:

AWS * API Reference

*/ class DetachVolumeResponse { public: AWS_EC2_API DetachVolumeResponse(); AWS_EC2_API DetachVolumeResponse(const Aws::AmazonWebServiceResult& result); AWS_EC2_API DetachVolumeResponse& operator=(const Aws::AmazonWebServiceResult& result); /** *

The time stamp when the attachment initiated.

*/ inline const Aws::Utils::DateTime& GetAttachTime() const{ return m_attachTime; } /** *

The time stamp when the attachment initiated.

*/ inline void SetAttachTime(const Aws::Utils::DateTime& value) { m_attachTime = value; } /** *

The time stamp when the attachment initiated.

*/ inline void SetAttachTime(Aws::Utils::DateTime&& value) { m_attachTime = std::move(value); } /** *

The time stamp when the attachment initiated.

*/ inline DetachVolumeResponse& WithAttachTime(const Aws::Utils::DateTime& value) { SetAttachTime(value); return *this;} /** *

The time stamp when the attachment initiated.

*/ inline DetachVolumeResponse& WithAttachTime(Aws::Utils::DateTime&& value) { SetAttachTime(std::move(value)); return *this;} /** *

The device name.

*/ inline const Aws::String& GetDevice() const{ return m_device; } /** *

The device name.

*/ inline void SetDevice(const Aws::String& value) { m_device = value; } /** *

The device name.

*/ inline void SetDevice(Aws::String&& value) { m_device = std::move(value); } /** *

The device name.

*/ inline void SetDevice(const char* value) { m_device.assign(value); } /** *

The device name.

*/ inline DetachVolumeResponse& WithDevice(const Aws::String& value) { SetDevice(value); return *this;} /** *

The device name.

*/ inline DetachVolumeResponse& WithDevice(Aws::String&& value) { SetDevice(std::move(value)); return *this;} /** *

The device name.

*/ inline DetachVolumeResponse& WithDevice(const char* value) { SetDevice(value); return *this;} /** *

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The ID of the instance.

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

The attachment state of the volume.

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

The attachment state of the volume.

*/ inline void SetState(const VolumeAttachmentState& value) { m_state = value; } /** *

The attachment state of the volume.

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

The attachment state of the volume.

*/ inline DetachVolumeResponse& WithState(const VolumeAttachmentState& value) { SetState(value); return *this;} /** *

The attachment state of the volume.

*/ inline DetachVolumeResponse& WithState(VolumeAttachmentState&& value) { SetState(std::move(value)); return *this;} /** *

The ID of the volume.

*/ inline const Aws::String& GetVolumeId() const{ return m_volumeId; } /** *

The ID of the volume.

*/ inline void SetVolumeId(const Aws::String& value) { m_volumeId = value; } /** *

The ID of the volume.

*/ inline void SetVolumeId(Aws::String&& value) { m_volumeId = std::move(value); } /** *

The ID of the volume.

*/ inline void SetVolumeId(const char* value) { m_volumeId.assign(value); } /** *

The ID of the volume.

*/ inline DetachVolumeResponse& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;} /** *

The ID of the volume.

*/ inline DetachVolumeResponse& WithVolumeId(Aws::String&& value) { SetVolumeId(std::move(value)); return *this;} /** *

The ID of the volume.

*/ inline DetachVolumeResponse& WithVolumeId(const char* value) { SetVolumeId(value); return *this;} /** *

Indicates whether the EBS volume is deleted on instance termination.

*/ inline bool GetDeleteOnTermination() const{ return m_deleteOnTermination; } /** *

Indicates whether the EBS volume is deleted on instance termination.

*/ inline void SetDeleteOnTermination(bool value) { m_deleteOnTermination = value; } /** *

Indicates whether the EBS volume is deleted on instance termination.

*/ inline DetachVolumeResponse& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;} inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } inline DetachVolumeResponse& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} inline DetachVolumeResponse& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} private: Aws::Utils::DateTime m_attachTime; Aws::String m_device; Aws::String m_instanceId; VolumeAttachmentState m_state; Aws::String m_volumeId; bool m_deleteOnTermination; ResponseMetadata m_responseMetadata; }; } // namespace Model } // namespace EC2 } // namespace Aws