/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #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 a volume.

See Also:

AWS API * Reference

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

Information about the volume attachments.

*/ inline const Aws::Vector& GetAttachments() const{ return m_attachments; } /** *

Information about the volume attachments.

*/ inline void SetAttachments(const Aws::Vector& value) { m_attachments = value; } /** *

Information about the volume attachments.

*/ inline void SetAttachments(Aws::Vector&& value) { m_attachments = std::move(value); } /** *

Information about the volume attachments.

*/ inline CreateVolumeResponse& WithAttachments(const Aws::Vector& value) { SetAttachments(value); return *this;} /** *

Information about the volume attachments.

*/ inline CreateVolumeResponse& WithAttachments(Aws::Vector&& value) { SetAttachments(std::move(value)); return *this;} /** *

Information about the volume attachments.

*/ inline CreateVolumeResponse& AddAttachments(const VolumeAttachment& value) { m_attachments.push_back(value); return *this; } /** *

Information about the volume attachments.

*/ inline CreateVolumeResponse& AddAttachments(VolumeAttachment&& value) { m_attachments.push_back(std::move(value)); return *this; } /** *

The Availability Zone for the volume.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone for the volume.

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

The Availability Zone for the volume.

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

The Availability Zone for the volume.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZone.assign(value); } /** *

The Availability Zone for the volume.

*/ inline CreateVolumeResponse& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone for the volume.

*/ inline CreateVolumeResponse& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone for the volume.

*/ inline CreateVolumeResponse& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

The time stamp when volume creation was initiated.

*/ inline const Aws::Utils::DateTime& GetCreateTime() const{ return m_createTime; } /** *

The time stamp when volume creation was initiated.

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

The time stamp when volume creation was initiated.

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

The time stamp when volume creation was initiated.

*/ inline CreateVolumeResponse& WithCreateTime(const Aws::Utils::DateTime& value) { SetCreateTime(value); return *this;} /** *

The time stamp when volume creation was initiated.

*/ inline CreateVolumeResponse& WithCreateTime(Aws::Utils::DateTime&& value) { SetCreateTime(std::move(value)); return *this;} /** *

Indicates whether the volume is encrypted.

*/ inline bool GetEncrypted() const{ return m_encrypted; } /** *

Indicates whether the volume is encrypted.

*/ inline void SetEncrypted(bool value) { m_encrypted = value; } /** *

Indicates whether the volume is encrypted.

*/ inline CreateVolumeResponse& WithEncrypted(bool value) { SetEncrypted(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key * that was used to protect the volume encryption key for the volume.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key * that was used to protect the volume encryption key for the volume.

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

The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key * that was used to protect the volume encryption key for the volume.

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

The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key * that was used to protect the volume encryption key for the volume.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyId.assign(value); } /** *

The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key * that was used to protect the volume encryption key for the volume.

*/ inline CreateVolumeResponse& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key * that was used to protect the volume encryption key for the volume.

*/ inline CreateVolumeResponse& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key * that was used to protect the volume encryption key for the volume.

*/ inline CreateVolumeResponse& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline const Aws::String& GetOutpostArn() const{ return m_outpostArn; } /** *

The Amazon Resource Name (ARN) of the Outpost.

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

The Amazon Resource Name (ARN) of the Outpost.

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

The Amazon Resource Name (ARN) of the Outpost.

*/ inline void SetOutpostArn(const char* value) { m_outpostArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline CreateVolumeResponse& WithOutpostArn(const Aws::String& value) { SetOutpostArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline CreateVolumeResponse& WithOutpostArn(Aws::String&& value) { SetOutpostArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Outpost.

*/ inline CreateVolumeResponse& WithOutpostArn(const char* value) { SetOutpostArn(value); return *this;} /** *

The size of the volume, in GiBs.

*/ inline int GetSize() const{ return m_size; } /** *

The size of the volume, in GiBs.

*/ inline void SetSize(int value) { m_size = value; } /** *

The size of the volume, in GiBs.

*/ inline CreateVolumeResponse& WithSize(int value) { SetSize(value); return *this;} /** *

The snapshot from which the volume was created, if applicable.

*/ inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; } /** *

The snapshot from which the volume was created, if applicable.

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

The snapshot from which the volume was created, if applicable.

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

The snapshot from which the volume was created, if applicable.

*/ inline void SetSnapshotId(const char* value) { m_snapshotId.assign(value); } /** *

The snapshot from which the volume was created, if applicable.

*/ inline CreateVolumeResponse& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;} /** *

The snapshot from which the volume was created, if applicable.

*/ inline CreateVolumeResponse& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;} /** *

The snapshot from which the volume was created, if applicable.

*/ inline CreateVolumeResponse& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;} /** *

The volume state.

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

The volume state.

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

The volume state.

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

The volume state.

*/ inline CreateVolumeResponse& WithState(const VolumeState& value) { SetState(value); return *this;} /** *

The volume state.

*/ inline CreateVolumeResponse& WithState(VolumeState&& 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 CreateVolumeResponse& WithVolumeId(const Aws::String& value) { SetVolumeId(value); return *this;} /** *

The ID of the volume.

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

The ID of the volume.

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

The number of I/O operations per second (IOPS). For gp3, * io1, and io2 volumes, this represents the number of * IOPS that are provisioned for the volume. For gp2 volumes, this * represents the baseline performance of the volume and the rate at which the * volume accumulates I/O credits for bursting.

*/ inline int GetIops() const{ return m_iops; } /** *

The number of I/O operations per second (IOPS). For gp3, * io1, and io2 volumes, this represents the number of * IOPS that are provisioned for the volume. For gp2 volumes, this * represents the baseline performance of the volume and the rate at which the * volume accumulates I/O credits for bursting.

*/ inline void SetIops(int value) { m_iops = value; } /** *

The number of I/O operations per second (IOPS). For gp3, * io1, and io2 volumes, this represents the number of * IOPS that are provisioned for the volume. For gp2 volumes, this * represents the baseline performance of the volume and the rate at which the * volume accumulates I/O credits for bursting.

*/ inline CreateVolumeResponse& WithIops(int value) { SetIops(value); return *this;} /** *

Any tags assigned to the volume.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

Any tags assigned to the volume.

*/ inline void SetTags(const Aws::Vector& value) { m_tags = value; } /** *

Any tags assigned to the volume.

*/ inline void SetTags(Aws::Vector&& value) { m_tags = std::move(value); } /** *

Any tags assigned to the volume.

*/ inline CreateVolumeResponse& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

Any tags assigned to the volume.

*/ inline CreateVolumeResponse& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

Any tags assigned to the volume.

*/ inline CreateVolumeResponse& AddTags(const Tag& value) { m_tags.push_back(value); return *this; } /** *

Any tags assigned to the volume.

*/ inline CreateVolumeResponse& AddTags(Tag&& value) { m_tags.push_back(std::move(value)); return *this; } /** *

The volume type.

*/ inline const VolumeType& GetVolumeType() const{ return m_volumeType; } /** *

The volume type.

*/ inline void SetVolumeType(const VolumeType& value) { m_volumeType = value; } /** *

The volume type.

*/ inline void SetVolumeType(VolumeType&& value) { m_volumeType = std::move(value); } /** *

The volume type.

*/ inline CreateVolumeResponse& WithVolumeType(const VolumeType& value) { SetVolumeType(value); return *this;} /** *

The volume type.

*/ inline CreateVolumeResponse& WithVolumeType(VolumeType&& value) { SetVolumeType(std::move(value)); return *this;} /** *

Indicates whether the volume was created using fast snapshot restore.

*/ inline bool GetFastRestored() const{ return m_fastRestored; } /** *

Indicates whether the volume was created using fast snapshot restore.

*/ inline void SetFastRestored(bool value) { m_fastRestored = value; } /** *

Indicates whether the volume was created using fast snapshot restore.

*/ inline CreateVolumeResponse& WithFastRestored(bool value) { SetFastRestored(value); return *this;} /** *

Indicates whether Amazon EBS Multi-Attach is enabled.

*/ inline bool GetMultiAttachEnabled() const{ return m_multiAttachEnabled; } /** *

Indicates whether Amazon EBS Multi-Attach is enabled.

*/ inline void SetMultiAttachEnabled(bool value) { m_multiAttachEnabled = value; } /** *

Indicates whether Amazon EBS Multi-Attach is enabled.

*/ inline CreateVolumeResponse& WithMultiAttachEnabled(bool value) { SetMultiAttachEnabled(value); return *this;} /** *

The throughput that the volume supports, in MiB/s.

*/ inline int GetThroughput() const{ return m_throughput; } /** *

The throughput that the volume supports, in MiB/s.

*/ inline void SetThroughput(int value) { m_throughput = value; } /** *

The throughput that the volume supports, in MiB/s.

*/ inline CreateVolumeResponse& WithThroughput(int value) { SetThroughput(value); return *this;} /** *

Reserved for future use.

*/ inline const SSEType& GetSseType() const{ return m_sseType; } /** *

Reserved for future use.

*/ inline void SetSseType(const SSEType& value) { m_sseType = value; } /** *

Reserved for future use.

*/ inline void SetSseType(SSEType&& value) { m_sseType = std::move(value); } /** *

Reserved for future use.

*/ inline CreateVolumeResponse& WithSseType(const SSEType& value) { SetSseType(value); return *this;} /** *

Reserved for future use.

*/ inline CreateVolumeResponse& WithSseType(SSEType&& value) { SetSseType(std::move(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 CreateVolumeResponse& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} inline CreateVolumeResponse& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} private: Aws::Vector m_attachments; Aws::String m_availabilityZone; Aws::Utils::DateTime m_createTime; bool m_encrypted; Aws::String m_kmsKeyId; Aws::String m_outpostArn; int m_size; Aws::String m_snapshotId; VolumeState m_state; Aws::String m_volumeId; int m_iops; Aws::Vector m_tags; VolumeType m_volumeType; bool m_fastRestored; bool m_multiAttachEnabled; int m_throughput; SSEType m_sseType; ResponseMetadata m_responseMetadata; }; } // namespace Model } // namespace EC2 } // namespace Aws