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

Describes a parameter used to set up an EBS volume in a block device * mapping.

See Also:

AWS * API Reference

*/ class EbsInstanceBlockDevice { public: AWS_EC2_API EbsInstanceBlockDevice(); AWS_EC2_API EbsInstanceBlockDevice(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_EC2_API EbsInstanceBlockDevice& 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 time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

*/ inline bool AttachTimeHasBeenSet() const { return m_attachTimeHasBeenSet; } /** *

The time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

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

The time stamp when the attachment initiated.

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

Indicates whether the volume is deleted on instance termination.

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

Indicates whether the volume is deleted on instance termination.

*/ inline bool DeleteOnTerminationHasBeenSet() const { return m_deleteOnTerminationHasBeenSet; } /** *

Indicates whether the volume is deleted on instance termination.

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

Indicates whether the volume is deleted on instance termination.

*/ inline EbsInstanceBlockDevice& WithDeleteOnTermination(bool value) { SetDeleteOnTermination(value); return *this;} /** *

The attachment state.

*/ inline const AttachmentStatus& GetStatus() const{ return m_status; } /** *

The attachment state.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The attachment state.

*/ inline void SetStatus(const AttachmentStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The attachment state.

*/ inline void SetStatus(AttachmentStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The attachment state.

*/ inline EbsInstanceBlockDevice& WithStatus(const AttachmentStatus& value) { SetStatus(value); return *this;} /** *

The attachment state.

*/ inline EbsInstanceBlockDevice& WithStatus(AttachmentStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

The ID of the EBS volume.

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

The ID of the EBS volume.

*/ inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; } /** *

The ID of the EBS volume.

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

The ID of the EBS volume.

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

The ID of the EBS volume.

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

The ID of the EBS volume.

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

The ID of the EBS volume.

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

The ID of the EBS volume.

*/ inline EbsInstanceBlockDevice& WithVolumeId(const char* value) { SetVolumeId(value); return *this;} private: Aws::Utils::DateTime m_attachTime; bool m_attachTimeHasBeenSet = false; bool m_deleteOnTermination; bool m_deleteOnTerminationHasBeenSet = false; AttachmentStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_volumeId; bool m_volumeIdHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws