All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.securityhub.model.AwsEc2VolumeDetails Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS SecurityHub module holds the client classes that are used for communicating with AWS SecurityHub Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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;

/**
 * 

* Details about an EC2 volume. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsEc2VolumeDetails implements Serializable, Cloneable, StructuredPojo { /** *

* 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. *

*/ private String createTime; /** *

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

*/ private String deviceName; /** *

* Specifies whether the volume is encrypted. *

*/ private Boolean encrypted; /** *

* The size of the volume, in GiBs. *

*/ private Integer size; /** *

* The snapshot from which the volume was created. *

*/ private String snapshotId; /** *

* The volume state. Valid values are as follows: *

*
    *
  • *

    * available *

    *
  • *
  • *

    * creating *

    *
  • *
  • *

    * deleted *

    *
  • *
  • *

    * deleting *

    *
  • *
  • *

    * error *

    *
  • *
  • *

    * in-use *

    *
  • *
*/ private String status; /** *

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

*/ private String kmsKeyId; /** *

* The volume attachments. *

*/ private java.util.List attachments; /** *

* The ID of the volume. *

*/ private String volumeId; /** *

* The volume type. *

*/ private String volumeType; /** *

* Indicates whether the volume was scanned or skipped. *

*/ private String volumeScanStatus; /** *

* 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. *

* * @param 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. */ public void setCreateTime(String createTime) { this.createTime = 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. *

* * @return 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. */ public String getCreateTime() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withCreateTime(String createTime) { setCreateTime(createTime); return this; } /** *

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

* * @param deviceName * The device name for the volume that is attached to the instance. */ public void setDeviceName(String deviceName) { this.deviceName = deviceName; } /** *

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

* * @return The device name for the volume that is attached to the instance. */ public String getDeviceName() { return this.deviceName; } /** *

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

* * @param deviceName * The device name for the volume that is attached to the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withDeviceName(String deviceName) { setDeviceName(deviceName); return this; } /** *

* Specifies whether the volume is encrypted. *

* * @param encrypted * Specifies whether the volume is encrypted. */ public void setEncrypted(Boolean encrypted) { this.encrypted = encrypted; } /** *

* Specifies whether the volume is encrypted. *

* * @return Specifies whether the volume is encrypted. */ public Boolean getEncrypted() { return this.encrypted; } /** *

* Specifies whether the volume is encrypted. *

* * @param encrypted * Specifies whether the volume is encrypted. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withEncrypted(Boolean encrypted) { setEncrypted(encrypted); return this; } /** *

* Specifies whether the volume is encrypted. *

* * @return Specifies whether the volume is encrypted. */ public Boolean isEncrypted() { return this.encrypted; } /** *

* The size of the volume, in GiBs. *

* * @param size * The size of the volume, in GiBs. */ public void setSize(Integer size) { this.size = size; } /** *

* The size of the volume, in GiBs. *

* * @return The size of the volume, in GiBs. */ public Integer getSize() { return this.size; } /** *

* The size of the volume, in GiBs. *

* * @param size * The size of the volume, in GiBs. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withSize(Integer size) { setSize(size); return this; } /** *

* The snapshot from which the volume was created. *

* * @param snapshotId * The snapshot from which the volume was created. */ public void setSnapshotId(String snapshotId) { this.snapshotId = snapshotId; } /** *

* The snapshot from which the volume was created. *

* * @return The snapshot from which the volume was created. */ public String getSnapshotId() { return this.snapshotId; } /** *

* The snapshot from which the volume was created. *

* * @param snapshotId * The snapshot from which the volume was created. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withSnapshotId(String snapshotId) { setSnapshotId(snapshotId); return this; } /** *

* The volume state. Valid values are as follows: *

*
    *
  • *

    * available *

    *
  • *
  • *

    * creating *

    *
  • *
  • *

    * deleted *

    *
  • *
  • *

    * deleting *

    *
  • *
  • *

    * error *

    *
  • *
  • *

    * in-use *

    *
  • *
* * @param status * The volume state. Valid values are as follows:

*
    *
  • *

    * available *

    *
  • *
  • *

    * creating *

    *
  • *
  • *

    * deleted *

    *
  • *
  • *

    * deleting *

    *
  • *
  • *

    * error *

    *
  • *
  • *

    * in-use *

    *
  • */ public void setStatus(String status) { this.status = status; } /** *

    * The volume state. Valid values are as follows: *

    *
      *
    • *

      * available *

      *
    • *
    • *

      * creating *

      *
    • *
    • *

      * deleted *

      *
    • *
    • *

      * deleting *

      *
    • *
    • *

      * error *

      *
    • *
    • *

      * in-use *

      *
    • *
    * * @return The volume state. Valid values are as follows:

    *
      *
    • *

      * available *

      *
    • *
    • *

      * creating *

      *
    • *
    • *

      * deleted *

      *
    • *
    • *

      * deleting *

      *
    • *
    • *

      * error *

      *
    • *
    • *

      * in-use *

      *
    • */ public String getStatus() { return this.status; } /** *

      * The volume state. Valid values are as follows: *

      *
        *
      • *

        * available *

        *
      • *
      • *

        * creating *

        *
      • *
      • *

        * deleted *

        *
      • *
      • *

        * deleting *

        *
      • *
      • *

        * error *

        *
      • *
      • *

        * in-use *

        *
      • *
      * * @param status * The volume state. Valid values are as follows:

      *
        *
      • *

        * available *

        *
      • *
      • *

        * creating *

        *
      • *
      • *

        * deleted *

        *
      • *
      • *

        * deleting *

        *
      • *
      • *

        * error *

        *
      • *
      • *

        * in-use *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withStatus(String status) { setStatus(status); return this; } /** *

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

        * * @param kmsKeyId * The ARN of the KMS key that was used to protect the volume encryption key for the volume. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

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

        * * @return The ARN of the KMS key that was used to protect the volume encryption key for the volume. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

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

        * * @param kmsKeyId * The ARN of the KMS key that was used to protect the volume encryption key for the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

        * The volume attachments. *

        * * @return The volume attachments. */ public java.util.List getAttachments() { return attachments; } /** *

        * The volume attachments. *

        * * @param attachments * The volume attachments. */ public void setAttachments(java.util.Collection attachments) { if (attachments == null) { this.attachments = null; return; } this.attachments = new java.util.ArrayList(attachments); } /** *

        * The volume attachments. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setAttachments(java.util.Collection)} or {@link #withAttachments(java.util.Collection)} if you want to * override the existing values. *

        * * @param attachments * The volume attachments. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withAttachments(AwsEc2VolumeAttachment... attachments) { if (this.attachments == null) { setAttachments(new java.util.ArrayList(attachments.length)); } for (AwsEc2VolumeAttachment ele : attachments) { this.attachments.add(ele); } return this; } /** *

        * The volume attachments. *

        * * @param attachments * The volume attachments. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withAttachments(java.util.Collection attachments) { setAttachments(attachments); return this; } /** *

        * The ID of the volume. *

        * * @param volumeId * The ID of the volume. */ public void setVolumeId(String volumeId) { this.volumeId = volumeId; } /** *

        * The ID of the volume. *

        * * @return The ID of the volume. */ public String getVolumeId() { return this.volumeId; } /** *

        * The ID of the volume. *

        * * @param volumeId * The ID of the volume. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withVolumeId(String volumeId) { setVolumeId(volumeId); return this; } /** *

        * The volume type. *

        * * @param volumeType * The volume type. */ public void setVolumeType(String volumeType) { this.volumeType = volumeType; } /** *

        * The volume type. *

        * * @return The volume type. */ public String getVolumeType() { return this.volumeType; } /** *

        * The volume type. *

        * * @param volumeType * The volume type. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withVolumeType(String volumeType) { setVolumeType(volumeType); return this; } /** *

        * Indicates whether the volume was scanned or skipped. *

        * * @param volumeScanStatus * Indicates whether the volume was scanned or skipped. */ public void setVolumeScanStatus(String volumeScanStatus) { this.volumeScanStatus = volumeScanStatus; } /** *

        * Indicates whether the volume was scanned or skipped. *

        * * @return Indicates whether the volume was scanned or skipped. */ public String getVolumeScanStatus() { return this.volumeScanStatus; } /** *

        * Indicates whether the volume was scanned or skipped. *

        * * @param volumeScanStatus * Indicates whether the volume was scanned or skipped. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEc2VolumeDetails withVolumeScanStatus(String volumeScanStatus) { setVolumeScanStatus(volumeScanStatus); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCreateTime() != null) sb.append("CreateTime: ").append(getCreateTime()).append(","); if (getDeviceName() != null) sb.append("DeviceName: ").append(getDeviceName()).append(","); if (getEncrypted() != null) sb.append("Encrypted: ").append(getEncrypted()).append(","); if (getSize() != null) sb.append("Size: ").append(getSize()).append(","); if (getSnapshotId() != null) sb.append("SnapshotId: ").append(getSnapshotId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getAttachments() != null) sb.append("Attachments: ").append(getAttachments()).append(","); if (getVolumeId() != null) sb.append("VolumeId: ").append(getVolumeId()).append(","); if (getVolumeType() != null) sb.append("VolumeType: ").append(getVolumeType()).append(","); if (getVolumeScanStatus() != null) sb.append("VolumeScanStatus: ").append(getVolumeScanStatus()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsEc2VolumeDetails == false) return false; AwsEc2VolumeDetails other = (AwsEc2VolumeDetails) obj; if (other.getCreateTime() == null ^ this.getCreateTime() == null) return false; if (other.getCreateTime() != null && other.getCreateTime().equals(this.getCreateTime()) == false) return false; if (other.getDeviceName() == null ^ this.getDeviceName() == null) return false; if (other.getDeviceName() != null && other.getDeviceName().equals(this.getDeviceName()) == false) return false; if (other.getEncrypted() == null ^ this.getEncrypted() == null) return false; if (other.getEncrypted() != null && other.getEncrypted().equals(this.getEncrypted()) == false) return false; if (other.getSize() == null ^ this.getSize() == null) return false; if (other.getSize() != null && other.getSize().equals(this.getSize()) == false) return false; if (other.getSnapshotId() == null ^ this.getSnapshotId() == null) return false; if (other.getSnapshotId() != null && other.getSnapshotId().equals(this.getSnapshotId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getAttachments() == null ^ this.getAttachments() == null) return false; if (other.getAttachments() != null && other.getAttachments().equals(this.getAttachments()) == false) return false; if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false; if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; if (other.getVolumeType() == null ^ this.getVolumeType() == null) return false; if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == false) return false; if (other.getVolumeScanStatus() == null ^ this.getVolumeScanStatus() == null) return false; if (other.getVolumeScanStatus() != null && other.getVolumeScanStatus().equals(this.getVolumeScanStatus()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); hashCode = prime * hashCode + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode()); hashCode = prime * hashCode + ((getEncrypted() == null) ? 0 : getEncrypted().hashCode()); hashCode = prime * hashCode + ((getSize() == null) ? 0 : getSize().hashCode()); hashCode = prime * hashCode + ((getSnapshotId() == null) ? 0 : getSnapshotId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getAttachments() == null) ? 0 : getAttachments().hashCode()); hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); hashCode = prime * hashCode + ((getVolumeScanStatus() == null) ? 0 : getVolumeScanStatus().hashCode()); return hashCode; } @Override public AwsEc2VolumeDetails clone() { try { return (AwsEc2VolumeDetails) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.securityhub.model.transform.AwsEc2VolumeDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy