/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

An attachment to an Amazon EC2 volume.

See Also:

AWS * API Reference

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

The datetime when the attachment initiated.

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

The datetime when the attachment initiated.

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

The datetime when the attachment initiated.

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

The datetime when the attachment initiated.

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

The datetime when the attachment initiated.

*/ inline void SetAttachTime(const char* value) { m_attachTimeHasBeenSet = true; m_attachTime.assign(value); } /** *

The datetime when the attachment initiated.

*/ inline AwsEc2VolumeAttachment& WithAttachTime(const Aws::String& value) { SetAttachTime(value); return *this;} /** *

The datetime when the attachment initiated.

*/ inline AwsEc2VolumeAttachment& WithAttachTime(Aws::String&& value) { SetAttachTime(std::move(value)); return *this;} /** *

The datetime when the attachment initiated.

*/ inline AwsEc2VolumeAttachment& WithAttachTime(const char* value) { SetAttachTime(value); return *this;} /** *

Whether the EBS volume is deleted when the EC2 instance is terminated.

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

Whether the EBS volume is deleted when the EC2 instance is terminated.

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

Whether the EBS volume is deleted when the EC2 instance is terminated.

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

Whether the EBS volume is deleted when the EC2 instance is terminated.

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

The identifier of the EC2 instance.

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

The identifier of the EC2 instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The identifier of the EC2 instance.

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

The identifier of the EC2 instance.

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

The identifier of the EC2 instance.

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

The identifier of the EC2 instance.

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

The identifier of the EC2 instance.

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

The identifier of the EC2 instance.

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

The attachment state of the volume. Valid values are as follows:

    *
  • attaching

  • attached

    *
  • busy

  • detaching

    *
  • detached

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

The attachment state of the volume. Valid values are as follows:

    *
  • attaching

  • attached

    *
  • busy

  • detaching

    *
  • detached

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

The attachment state of the volume. Valid values are as follows:

    *
  • attaching

  • attached

    *
  • busy

  • detaching

    *
  • detached

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

The attachment state of the volume. Valid values are as follows:

    *
  • attaching

  • attached

    *
  • busy

  • detaching

    *
  • detached

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

The attachment state of the volume. Valid values are as follows:

    *
  • attaching

  • attached

    *
  • busy

  • detaching

    *
  • detached

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

The attachment state of the volume. Valid values are as follows:

    *
  • attaching

  • attached

    *
  • busy

  • detaching

    *
  • detached

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

The attachment state of the volume. Valid values are as follows:

    *
  • attaching

  • attached

    *
  • busy

  • detaching

    *
  • detached

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

The attachment state of the volume. Valid values are as follows:

    *
  • attaching

  • attached

    *
  • busy

  • detaching

    *
  • detached

*/ inline AwsEc2VolumeAttachment& WithStatus(const char* value) { SetStatus(value); return *this;} private: Aws::String m_attachTime; bool m_attachTimeHasBeenSet = false; bool m_deleteOnTermination; bool m_deleteOnTerminationHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws