/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* An attachment to an Amazon EC2 volume. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsEc2VolumeAttachment implements Serializable, Cloneable, StructuredPojo { /** ** The datetime when the attachment initiated. *
*/ private String attachTime; /** ** Whether the EBS volume is deleted when the EC2 instance is terminated. *
*/ private Boolean deleteOnTermination; /** ** The identifier of the EC2 instance. *
*/ private String instanceId; /** ** The attachment state of the volume. Valid values are as follows: *
*
* attaching
*
* attached
*
* busy
*
* detaching
*
* detached
*
* The datetime when the attachment initiated. *
* * @param attachTime * The datetime when the attachment initiated. */ public void setAttachTime(String attachTime) { this.attachTime = attachTime; } /** ** The datetime when the attachment initiated. *
* * @return The datetime when the attachment initiated. */ public String getAttachTime() { return this.attachTime; } /** ** The datetime when the attachment initiated. *
* * @param attachTime * The datetime when the attachment initiated. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeAttachment withAttachTime(String attachTime) { setAttachTime(attachTime); return this; } /** ** Whether the EBS volume is deleted when the EC2 instance is terminated. *
* * @param deleteOnTermination * Whether the EBS volume is deleted when the EC2 instance is terminated. */ public void setDeleteOnTermination(Boolean deleteOnTermination) { this.deleteOnTermination = deleteOnTermination; } /** ** Whether the EBS volume is deleted when the EC2 instance is terminated. *
* * @return Whether the EBS volume is deleted when the EC2 instance is terminated. */ public Boolean getDeleteOnTermination() { return this.deleteOnTermination; } /** ** Whether the EBS volume is deleted when the EC2 instance is terminated. *
* * @param deleteOnTermination * Whether the EBS volume is deleted when the EC2 instance is terminated. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeAttachment withDeleteOnTermination(Boolean deleteOnTermination) { setDeleteOnTermination(deleteOnTermination); return this; } /** ** Whether the EBS volume is deleted when the EC2 instance is terminated. *
* * @return Whether the EBS volume is deleted when the EC2 instance is terminated. */ public Boolean isDeleteOnTermination() { return this.deleteOnTermination; } /** ** The identifier of the EC2 instance. *
* * @param instanceId * The identifier of the EC2 instance. */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; } /** ** The identifier of the EC2 instance. *
* * @return The identifier of the EC2 instance. */ public String getInstanceId() { return this.instanceId; } /** ** The identifier of the EC2 instance. *
* * @param instanceId * The identifier of the EC2 instance. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeAttachment withInstanceId(String instanceId) { setInstanceId(instanceId); return this; } /** ** The attachment state of the volume. Valid values are as follows: *
*
* attaching
*
* attached
*
* busy
*
* detaching
*
* detached
*
* attaching
*
* attached
*
* busy
*
* detaching
*
* detached
*
* The attachment state of the volume. Valid values are as follows: *
*
* attaching
*
* attached
*
* busy
*
* detaching
*
* detached
*
* attaching
*
* attached
*
* busy
*
* detaching
*
* detached
*
* The attachment state of the volume. Valid values are as follows: *
*
* attaching
*
* attached
*
* busy
*
* detaching
*
* detached
*
* attaching
*
* attached
*
* busy
*
* detaching
*
* detached
*