/** * 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 Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

Details about an EC2 volume.

See Also:

AWS * API Reference

*/ class AwsEc2VolumeDetails { public: AWS_SECURITYHUB_API AwsEc2VolumeDetails(); AWS_SECURITYHUB_API AwsEc2VolumeDetails(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API AwsEc2VolumeDetails& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Indicates when the volume was created.

Uses the date-time * format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

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

Indicates when the volume was created.

Uses the date-time * format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline bool CreateTimeHasBeenSet() const { return m_createTimeHasBeenSet; } /** *

Indicates when the volume was created.

Uses the date-time * format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreateTime(const Aws::String& value) { m_createTimeHasBeenSet = true; m_createTime = value; } /** *

Indicates when the volume was created.

Uses the date-time * format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreateTime(Aws::String&& value) { m_createTimeHasBeenSet = true; m_createTime = std::move(value); } /** *

Indicates when the volume was created.

Uses the date-time * format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline void SetCreateTime(const char* value) { m_createTimeHasBeenSet = true; m_createTime.assign(value); } /** *

Indicates when the volume was created.

Uses the date-time * format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsEc2VolumeDetails& WithCreateTime(const Aws::String& value) { SetCreateTime(value); return *this;} /** *

Indicates when the volume was created.

Uses the date-time * format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsEc2VolumeDetails& WithCreateTime(Aws::String&& value) { SetCreateTime(std::move(value)); return *this;} /** *

Indicates when the volume was created.

Uses the date-time * format specified in RFC 3339 section 5.6, * Internet Date/Time Format. The value cannot contain spaces, and date and * time should be separated by T. For example, * 2020-03-22T13:22:13.933Z.

*/ inline AwsEc2VolumeDetails& WithCreateTime(const char* value) { SetCreateTime(value); return *this;} /** *

The device name for the volume that is attached to the instance.

*/ inline const Aws::String& GetDeviceName() const{ return m_deviceName; } /** *

The device name for the volume that is attached to the instance.

*/ inline bool DeviceNameHasBeenSet() const { return m_deviceNameHasBeenSet; } /** *

The device name for the volume that is attached to the instance.

*/ inline void SetDeviceName(const Aws::String& value) { m_deviceNameHasBeenSet = true; m_deviceName = value; } /** *

The device name for the volume that is attached to the instance.

*/ inline void SetDeviceName(Aws::String&& value) { m_deviceNameHasBeenSet = true; m_deviceName = std::move(value); } /** *

The device name for the volume that is attached to the instance.

*/ inline void SetDeviceName(const char* value) { m_deviceNameHasBeenSet = true; m_deviceName.assign(value); } /** *

The device name for the volume that is attached to the instance.

*/ inline AwsEc2VolumeDetails& WithDeviceName(const Aws::String& value) { SetDeviceName(value); return *this;} /** *

The device name for the volume that is attached to the instance.

*/ inline AwsEc2VolumeDetails& WithDeviceName(Aws::String&& value) { SetDeviceName(std::move(value)); return *this;} /** *

The device name for the volume that is attached to the instance.

*/ inline AwsEc2VolumeDetails& WithDeviceName(const char* value) { SetDeviceName(value); return *this;} /** *

Specifies whether the volume is encrypted.

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

Specifies whether the volume is encrypted.

*/ inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; } /** *

Specifies whether the volume is encrypted.

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

Specifies whether the volume is encrypted.

*/ inline AwsEc2VolumeDetails& WithEncrypted(bool value) { SetEncrypted(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 bool SizeHasBeenSet() const { return m_sizeHasBeenSet; } /** *

The size of the volume, in GiBs.

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

The size of the volume, in GiBs.

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

The snapshot from which the volume was created.

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

The snapshot from which the volume was created.

*/ inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; } /** *

The snapshot from which the volume was created.

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

The snapshot from which the volume was created.

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

The snapshot from which the volume was created.

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

The snapshot from which the volume was created.

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

The snapshot from which the volume was created.

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

The snapshot from which the volume was created.

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

The volume state. Valid values are as follows:

  • * available

  • creating

  • *

    deleted

  • deleting

  • *
  • error

  • in-use

  • *
*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The volume state. Valid values are as follows:

  • * available

  • creating

  • *

    deleted

  • deleting

  • *
  • error

  • in-use

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

The volume state. Valid values are as follows:

  • * available

  • creating

  • *

    deleted

  • deleting

  • *
  • error

  • in-use

  • *
*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The volume state. Valid values are as follows:

  • * available

  • creating

  • *

    deleted

  • deleting

  • *
  • error

  • in-use

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

The volume state. Valid values are as follows:

  • * available

  • creating

  • *

    deleted

  • deleting

  • *
  • error

  • in-use

  • *
*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The volume state. Valid values are as follows:

  • * available

  • creating

  • *

    deleted

  • deleting

  • *
  • error

  • in-use

  • *
*/ inline AwsEc2VolumeDetails& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The volume state. Valid values are as follows:

  • * available

  • creating

  • *

    deleted

  • deleting

  • *
  • error

  • in-use

  • *
*/ inline AwsEc2VolumeDetails& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The volume state. Valid values are as follows:

  • * available

  • creating

  • *

    deleted

  • deleting

  • *
  • error

  • in-use

  • *
*/ inline AwsEc2VolumeDetails& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The ARN of the KMS key that was used to protect the volume encryption key for * the volume.

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

The ARN of the KMS key that was used to protect the volume encryption key for * the volume.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

The ARN of the KMS key that was used to protect the volume encryption key for * the volume.

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

The ARN of the KMS key that was used to protect the volume encryption key for * the volume.

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

The ARN of the KMS key that was used to protect the volume encryption key for * the volume.

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

The ARN of the KMS key that was used to protect the volume encryption key for * the volume.

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

The ARN of the KMS key that was used to protect the volume encryption key for * the volume.

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

The ARN of the KMS key that was used to protect the volume encryption key for * the volume.

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

The volume attachments.

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

The volume attachments.

*/ inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; } /** *

The volume attachments.

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

The volume attachments.

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

The volume attachments.

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

The volume attachments.

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

The volume attachments.

*/ inline AwsEc2VolumeDetails& AddAttachments(const AwsEc2VolumeAttachment& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(value); return *this; } /** *

The volume attachments.

*/ inline AwsEc2VolumeDetails& AddAttachments(AwsEc2VolumeAttachment&& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(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 bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; } /** *

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The ID of the volume.

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

The volume type.

*/ inline const Aws::String& GetVolumeType() const{ return m_volumeType; } /** *

The volume type.

*/ inline bool VolumeTypeHasBeenSet() const { return m_volumeTypeHasBeenSet; } /** *

The volume type.

*/ inline void SetVolumeType(const Aws::String& value) { m_volumeTypeHasBeenSet = true; m_volumeType = value; } /** *

The volume type.

*/ inline void SetVolumeType(Aws::String&& value) { m_volumeTypeHasBeenSet = true; m_volumeType = std::move(value); } /** *

The volume type.

*/ inline void SetVolumeType(const char* value) { m_volumeTypeHasBeenSet = true; m_volumeType.assign(value); } /** *

The volume type.

*/ inline AwsEc2VolumeDetails& WithVolumeType(const Aws::String& value) { SetVolumeType(value); return *this;} /** *

The volume type.

*/ inline AwsEc2VolumeDetails& WithVolumeType(Aws::String&& value) { SetVolumeType(std::move(value)); return *this;} /** *

The volume type.

*/ inline AwsEc2VolumeDetails& WithVolumeType(const char* value) { SetVolumeType(value); return *this;} /** *

Indicates whether the volume was scanned or skipped.

*/ inline const Aws::String& GetVolumeScanStatus() const{ return m_volumeScanStatus; } /** *

Indicates whether the volume was scanned or skipped.

*/ inline bool VolumeScanStatusHasBeenSet() const { return m_volumeScanStatusHasBeenSet; } /** *

Indicates whether the volume was scanned or skipped.

*/ inline void SetVolumeScanStatus(const Aws::String& value) { m_volumeScanStatusHasBeenSet = true; m_volumeScanStatus = value; } /** *

Indicates whether the volume was scanned or skipped.

*/ inline void SetVolumeScanStatus(Aws::String&& value) { m_volumeScanStatusHasBeenSet = true; m_volumeScanStatus = std::move(value); } /** *

Indicates whether the volume was scanned or skipped.

*/ inline void SetVolumeScanStatus(const char* value) { m_volumeScanStatusHasBeenSet = true; m_volumeScanStatus.assign(value); } /** *

Indicates whether the volume was scanned or skipped.

*/ inline AwsEc2VolumeDetails& WithVolumeScanStatus(const Aws::String& value) { SetVolumeScanStatus(value); return *this;} /** *

Indicates whether the volume was scanned or skipped.

*/ inline AwsEc2VolumeDetails& WithVolumeScanStatus(Aws::String&& value) { SetVolumeScanStatus(std::move(value)); return *this;} /** *

Indicates whether the volume was scanned or skipped.

*/ inline AwsEc2VolumeDetails& WithVolumeScanStatus(const char* value) { SetVolumeScanStatus(value); return *this;} private: Aws::String m_createTime; bool m_createTimeHasBeenSet = false; Aws::String m_deviceName; bool m_deviceNameHasBeenSet = false; bool m_encrypted; bool m_encryptedHasBeenSet = false; int m_size; bool m_sizeHasBeenSet = false; Aws::String m_snapshotId; bool m_snapshotIdHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::Vector m_attachments; bool m_attachmentsHasBeenSet = false; Aws::String m_volumeId; bool m_volumeIdHasBeenSet = false; Aws::String m_volumeType; bool m_volumeTypeHasBeenSet = false; Aws::String m_volumeScanStatus; bool m_volumeScanStatusHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws