com.amazonaws.services.macie2.model.ClassificationDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-macie2 Show documentation
/*
* 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.macie2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides information about a sensitive data finding and the details of the finding.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ClassificationDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The path to the folder or file in Amazon S3 that contains the corresponding sensitive data discovery result for
* the finding. If a finding applies to a large archive or compressed file, this value is the path to a folder.
* Otherwise, this value is the path to a file.
*
*/
private String detailedResultsLocation;
/**
*
* The Amazon Resource Name (ARN) of the classification job that produced the finding. This value is null if the
* origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*
*/
private String jobArn;
/**
*
* The unique identifier for the classification job that produced the finding. This value is null if the origin of
* the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*
*/
private String jobId;
/**
*
* Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for automated
* sensitive data discovery.
*
*/
private String originType;
/**
*
* The status and other details of the finding.
*
*/
private ClassificationResult result;
/**
*
* The path to the folder or file in Amazon S3 that contains the corresponding sensitive data discovery result for
* the finding. If a finding applies to a large archive or compressed file, this value is the path to a folder.
* Otherwise, this value is the path to a file.
*
*
* @param detailedResultsLocation
* The path to the folder or file in Amazon S3 that contains the corresponding sensitive data discovery
* result for the finding. If a finding applies to a large archive or compressed file, this value is the path
* to a folder. Otherwise, this value is the path to a file.
*/
public void setDetailedResultsLocation(String detailedResultsLocation) {
this.detailedResultsLocation = detailedResultsLocation;
}
/**
*
* The path to the folder or file in Amazon S3 that contains the corresponding sensitive data discovery result for
* the finding. If a finding applies to a large archive or compressed file, this value is the path to a folder.
* Otherwise, this value is the path to a file.
*
*
* @return The path to the folder or file in Amazon S3 that contains the corresponding sensitive data discovery
* result for the finding. If a finding applies to a large archive or compressed file, this value is the
* path to a folder. Otherwise, this value is the path to a file.
*/
public String getDetailedResultsLocation() {
return this.detailedResultsLocation;
}
/**
*
* The path to the folder or file in Amazon S3 that contains the corresponding sensitive data discovery result for
* the finding. If a finding applies to a large archive or compressed file, this value is the path to a folder.
* Otherwise, this value is the path to a file.
*
*
* @param detailedResultsLocation
* The path to the folder or file in Amazon S3 that contains the corresponding sensitive data discovery
* result for the finding. If a finding applies to a large archive or compressed file, this value is the path
* to a folder. Otherwise, this value is the path to a file.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClassificationDetails withDetailedResultsLocation(String detailedResultsLocation) {
setDetailedResultsLocation(detailedResultsLocation);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the classification job that produced the finding. This value is null if the
* origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*
*
* @param jobArn
* The Amazon Resource Name (ARN) of the classification job that produced the finding. This value is null if
* the origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*/
public void setJobArn(String jobArn) {
this.jobArn = jobArn;
}
/**
*
* The Amazon Resource Name (ARN) of the classification job that produced the finding. This value is null if the
* origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*
*
* @return The Amazon Resource Name (ARN) of the classification job that produced the finding. This value is null if
* the origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*/
public String getJobArn() {
return this.jobArn;
}
/**
*
* The Amazon Resource Name (ARN) of the classification job that produced the finding. This value is null if the
* origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*
*
* @param jobArn
* The Amazon Resource Name (ARN) of the classification job that produced the finding. This value is null if
* the origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClassificationDetails withJobArn(String jobArn) {
setJobArn(jobArn);
return this;
}
/**
*
* The unique identifier for the classification job that produced the finding. This value is null if the origin of
* the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*
*
* @param jobId
* The unique identifier for the classification job that produced the finding. This value is null if the
* origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*/
public void setJobId(String jobId) {
this.jobId = jobId;
}
/**
*
* The unique identifier for the classification job that produced the finding. This value is null if the origin of
* the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*
*
* @return The unique identifier for the classification job that produced the finding. This value is null if the
* origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*/
public String getJobId() {
return this.jobId;
}
/**
*
* The unique identifier for the classification job that produced the finding. This value is null if the origin of
* the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
*
*
* @param jobId
* The unique identifier for the classification job that produced the finding. This value is null if the
* origin of the finding (originType) is AUTOMATED_SENSITIVE_DATA_DISCOVERY.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClassificationDetails withJobId(String jobId) {
setJobId(jobId);
return this;
}
/**
*
* Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for automated
* sensitive data discovery.
*
*
* @param originType
* Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for
* automated sensitive data discovery.
* @see OriginType
*/
public void setOriginType(String originType) {
this.originType = originType;
}
/**
*
* Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for automated
* sensitive data discovery.
*
*
* @return Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for
* automated sensitive data discovery.
* @see OriginType
*/
public String getOriginType() {
return this.originType;
}
/**
*
* Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for automated
* sensitive data discovery.
*
*
* @param originType
* Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for
* automated sensitive data discovery.
* @return Returns a reference to this object so that method calls can be chained together.
* @see OriginType
*/
public ClassificationDetails withOriginType(String originType) {
setOriginType(originType);
return this;
}
/**
*
* Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for automated
* sensitive data discovery.
*
*
* @param originType
* Specifies how Amazon Macie found the sensitive data that produced the finding. Possible values are:
* SENSITIVE_DATA_DISCOVERY_JOB, for a classification job; and, AUTOMATED_SENSITIVE_DATA_DISCOVERY, for
* automated sensitive data discovery.
* @return Returns a reference to this object so that method calls can be chained together.
* @see OriginType
*/
public ClassificationDetails withOriginType(OriginType originType) {
this.originType = originType.toString();
return this;
}
/**
*
* The status and other details of the finding.
*
*
* @param result
* The status and other details of the finding.
*/
public void setResult(ClassificationResult result) {
this.result = result;
}
/**
*
* The status and other details of the finding.
*
*
* @return The status and other details of the finding.
*/
public ClassificationResult getResult() {
return this.result;
}
/**
*
* The status and other details of the finding.
*
*
* @param result
* The status and other details of the finding.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ClassificationDetails withResult(ClassificationResult result) {
setResult(result);
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 (getDetailedResultsLocation() != null)
sb.append("DetailedResultsLocation: ").append(getDetailedResultsLocation()).append(",");
if (getJobArn() != null)
sb.append("JobArn: ").append(getJobArn()).append(",");
if (getJobId() != null)
sb.append("JobId: ").append(getJobId()).append(",");
if (getOriginType() != null)
sb.append("OriginType: ").append(getOriginType()).append(",");
if (getResult() != null)
sb.append("Result: ").append(getResult());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ClassificationDetails == false)
return false;
ClassificationDetails other = (ClassificationDetails) obj;
if (other.getDetailedResultsLocation() == null ^ this.getDetailedResultsLocation() == null)
return false;
if (other.getDetailedResultsLocation() != null && other.getDetailedResultsLocation().equals(this.getDetailedResultsLocation()) == false)
return false;
if (other.getJobArn() == null ^ this.getJobArn() == null)
return false;
if (other.getJobArn() != null && other.getJobArn().equals(this.getJobArn()) == false)
return false;
if (other.getJobId() == null ^ this.getJobId() == null)
return false;
if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false)
return false;
if (other.getOriginType() == null ^ this.getOriginType() == null)
return false;
if (other.getOriginType() != null && other.getOriginType().equals(this.getOriginType()) == false)
return false;
if (other.getResult() == null ^ this.getResult() == null)
return false;
if (other.getResult() != null && other.getResult().equals(this.getResult()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDetailedResultsLocation() == null) ? 0 : getDetailedResultsLocation().hashCode());
hashCode = prime * hashCode + ((getJobArn() == null) ? 0 : getJobArn().hashCode());
hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode());
hashCode = prime * hashCode + ((getOriginType() == null) ? 0 : getOriginType().hashCode());
hashCode = prime * hashCode + ((getResult() == null) ? 0 : getResult().hashCode());
return hashCode;
}
@Override
public ClassificationDetails clone() {
try {
return (ClassificationDetails) 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.macie2.model.transform.ClassificationDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}