com.amazonaws.services.guardduty.model.EbsVolumeDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-guardduty Show documentation
/*
* Copyright 2019-2024 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.guardduty.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Contains list of scanned and skipped EBS volumes with details.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EbsVolumeDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* List of EBS volumes that were scanned.
*
*/
private java.util.List scannedVolumeDetails;
/**
*
* List of EBS volumes that were skipped from the malware scan.
*
*/
private java.util.List skippedVolumeDetails;
/**
*
* List of EBS volumes that were scanned.
*
*
* @return List of EBS volumes that were scanned.
*/
public java.util.List getScannedVolumeDetails() {
return scannedVolumeDetails;
}
/**
*
* List of EBS volumes that were scanned.
*
*
* @param scannedVolumeDetails
* List of EBS volumes that were scanned.
*/
public void setScannedVolumeDetails(java.util.Collection scannedVolumeDetails) {
if (scannedVolumeDetails == null) {
this.scannedVolumeDetails = null;
return;
}
this.scannedVolumeDetails = new java.util.ArrayList(scannedVolumeDetails);
}
/**
*
* List of EBS volumes that were scanned.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setScannedVolumeDetails(java.util.Collection)} or {@link #withScannedVolumeDetails(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param scannedVolumeDetails
* List of EBS volumes that were scanned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EbsVolumeDetails withScannedVolumeDetails(VolumeDetail... scannedVolumeDetails) {
if (this.scannedVolumeDetails == null) {
setScannedVolumeDetails(new java.util.ArrayList(scannedVolumeDetails.length));
}
for (VolumeDetail ele : scannedVolumeDetails) {
this.scannedVolumeDetails.add(ele);
}
return this;
}
/**
*
* List of EBS volumes that were scanned.
*
*
* @param scannedVolumeDetails
* List of EBS volumes that were scanned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EbsVolumeDetails withScannedVolumeDetails(java.util.Collection scannedVolumeDetails) {
setScannedVolumeDetails(scannedVolumeDetails);
return this;
}
/**
*
* List of EBS volumes that were skipped from the malware scan.
*
*
* @return List of EBS volumes that were skipped from the malware scan.
*/
public java.util.List getSkippedVolumeDetails() {
return skippedVolumeDetails;
}
/**
*
* List of EBS volumes that were skipped from the malware scan.
*
*
* @param skippedVolumeDetails
* List of EBS volumes that were skipped from the malware scan.
*/
public void setSkippedVolumeDetails(java.util.Collection skippedVolumeDetails) {
if (skippedVolumeDetails == null) {
this.skippedVolumeDetails = null;
return;
}
this.skippedVolumeDetails = new java.util.ArrayList(skippedVolumeDetails);
}
/**
*
* List of EBS volumes that were skipped from the malware scan.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSkippedVolumeDetails(java.util.Collection)} or {@link #withSkippedVolumeDetails(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param skippedVolumeDetails
* List of EBS volumes that were skipped from the malware scan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EbsVolumeDetails withSkippedVolumeDetails(VolumeDetail... skippedVolumeDetails) {
if (this.skippedVolumeDetails == null) {
setSkippedVolumeDetails(new java.util.ArrayList(skippedVolumeDetails.length));
}
for (VolumeDetail ele : skippedVolumeDetails) {
this.skippedVolumeDetails.add(ele);
}
return this;
}
/**
*
* List of EBS volumes that were skipped from the malware scan.
*
*
* @param skippedVolumeDetails
* List of EBS volumes that were skipped from the malware scan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EbsVolumeDetails withSkippedVolumeDetails(java.util.Collection skippedVolumeDetails) {
setSkippedVolumeDetails(skippedVolumeDetails);
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 (getScannedVolumeDetails() != null)
sb.append("ScannedVolumeDetails: ").append(getScannedVolumeDetails()).append(",");
if (getSkippedVolumeDetails() != null)
sb.append("SkippedVolumeDetails: ").append(getSkippedVolumeDetails());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof EbsVolumeDetails == false)
return false;
EbsVolumeDetails other = (EbsVolumeDetails) obj;
if (other.getScannedVolumeDetails() == null ^ this.getScannedVolumeDetails() == null)
return false;
if (other.getScannedVolumeDetails() != null && other.getScannedVolumeDetails().equals(this.getScannedVolumeDetails()) == false)
return false;
if (other.getSkippedVolumeDetails() == null ^ this.getSkippedVolumeDetails() == null)
return false;
if (other.getSkippedVolumeDetails() != null && other.getSkippedVolumeDetails().equals(this.getSkippedVolumeDetails()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getScannedVolumeDetails() == null) ? 0 : getScannedVolumeDetails().hashCode());
hashCode = prime * hashCode + ((getSkippedVolumeDetails() == null) ? 0 : getSkippedVolumeDetails().hashCode());
return hashCode;
}
@Override
public EbsVolumeDetails clone() {
try {
return (EbsVolumeDetails) 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.guardduty.model.transform.EbsVolumeDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}