com.amazonaws.services.textract.model.GetLendingAnalysisSummaryResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-textract 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.textract.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetLendingAnalysisSummaryResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
private DocumentMetadata documentMetadata;
/**
*
* The current status of the lending analysis job.
*
*/
private String jobStatus;
/**
*
* Contains summary information for documents grouped by type.
*
*/
private LendingSummary summary;
/**
*
* A list of warnings that occurred during the lending analysis operation.
*
*/
private java.util.List warnings;
/**
*
* Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
*
*/
private String statusMessage;
/**
*
* The current model version of the Analyze Lending API.
*
*/
private String analyzeLendingModelVersion;
/**
* @param documentMetadata
*/
public void setDocumentMetadata(DocumentMetadata documentMetadata) {
this.documentMetadata = documentMetadata;
}
/**
* @return
*/
public DocumentMetadata getDocumentMetadata() {
return this.documentMetadata;
}
/**
* @param documentMetadata
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLendingAnalysisSummaryResult withDocumentMetadata(DocumentMetadata documentMetadata) {
setDocumentMetadata(documentMetadata);
return this;
}
/**
*
* The current status of the lending analysis job.
*
*
* @param jobStatus
* The current status of the lending analysis job.
* @see JobStatus
*/
public void setJobStatus(String jobStatus) {
this.jobStatus = jobStatus;
}
/**
*
* The current status of the lending analysis job.
*
*
* @return The current status of the lending analysis job.
* @see JobStatus
*/
public String getJobStatus() {
return this.jobStatus;
}
/**
*
* The current status of the lending analysis job.
*
*
* @param jobStatus
* The current status of the lending analysis job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JobStatus
*/
public GetLendingAnalysisSummaryResult withJobStatus(String jobStatus) {
setJobStatus(jobStatus);
return this;
}
/**
*
* The current status of the lending analysis job.
*
*
* @param jobStatus
* The current status of the lending analysis job.
* @return Returns a reference to this object so that method calls can be chained together.
* @see JobStatus
*/
public GetLendingAnalysisSummaryResult withJobStatus(JobStatus jobStatus) {
this.jobStatus = jobStatus.toString();
return this;
}
/**
*
* Contains summary information for documents grouped by type.
*
*
* @param summary
* Contains summary information for documents grouped by type.
*/
public void setSummary(LendingSummary summary) {
this.summary = summary;
}
/**
*
* Contains summary information for documents grouped by type.
*
*
* @return Contains summary information for documents grouped by type.
*/
public LendingSummary getSummary() {
return this.summary;
}
/**
*
* Contains summary information for documents grouped by type.
*
*
* @param summary
* Contains summary information for documents grouped by type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLendingAnalysisSummaryResult withSummary(LendingSummary summary) {
setSummary(summary);
return this;
}
/**
*
* A list of warnings that occurred during the lending analysis operation.
*
*
* @return A list of warnings that occurred during the lending analysis operation.
*/
public java.util.List getWarnings() {
return warnings;
}
/**
*
* A list of warnings that occurred during the lending analysis operation.
*
*
* @param warnings
* A list of warnings that occurred during the lending analysis operation.
*/
public void setWarnings(java.util.Collection warnings) {
if (warnings == null) {
this.warnings = null;
return;
}
this.warnings = new java.util.ArrayList(warnings);
}
/**
*
* A list of warnings that occurred during the lending analysis operation.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setWarnings(java.util.Collection)} or {@link #withWarnings(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param warnings
* A list of warnings that occurred during the lending analysis operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLendingAnalysisSummaryResult withWarnings(Warning... warnings) {
if (this.warnings == null) {
setWarnings(new java.util.ArrayList(warnings.length));
}
for (Warning ele : warnings) {
this.warnings.add(ele);
}
return this;
}
/**
*
* A list of warnings that occurred during the lending analysis operation.
*
*
* @param warnings
* A list of warnings that occurred during the lending analysis operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLendingAnalysisSummaryResult withWarnings(java.util.Collection warnings) {
setWarnings(warnings);
return this;
}
/**
*
* Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
*
*
* @param statusMessage
* Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
*/
public void setStatusMessage(String statusMessage) {
this.statusMessage = statusMessage;
}
/**
*
* Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
*
*
* @return Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
*/
public String getStatusMessage() {
return this.statusMessage;
}
/**
*
* Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
*
*
* @param statusMessage
* Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLendingAnalysisSummaryResult withStatusMessage(String statusMessage) {
setStatusMessage(statusMessage);
return this;
}
/**
*
* The current model version of the Analyze Lending API.
*
*
* @param analyzeLendingModelVersion
* The current model version of the Analyze Lending API.
*/
public void setAnalyzeLendingModelVersion(String analyzeLendingModelVersion) {
this.analyzeLendingModelVersion = analyzeLendingModelVersion;
}
/**
*
* The current model version of the Analyze Lending API.
*
*
* @return The current model version of the Analyze Lending API.
*/
public String getAnalyzeLendingModelVersion() {
return this.analyzeLendingModelVersion;
}
/**
*
* The current model version of the Analyze Lending API.
*
*
* @param analyzeLendingModelVersion
* The current model version of the Analyze Lending API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLendingAnalysisSummaryResult withAnalyzeLendingModelVersion(String analyzeLendingModelVersion) {
setAnalyzeLendingModelVersion(analyzeLendingModelVersion);
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 (getDocumentMetadata() != null)
sb.append("DocumentMetadata: ").append(getDocumentMetadata()).append(",");
if (getJobStatus() != null)
sb.append("JobStatus: ").append(getJobStatus()).append(",");
if (getSummary() != null)
sb.append("Summary: ").append(getSummary()).append(",");
if (getWarnings() != null)
sb.append("Warnings: ").append(getWarnings()).append(",");
if (getStatusMessage() != null)
sb.append("StatusMessage: ").append(getStatusMessage()).append(",");
if (getAnalyzeLendingModelVersion() != null)
sb.append("AnalyzeLendingModelVersion: ").append(getAnalyzeLendingModelVersion());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetLendingAnalysisSummaryResult == false)
return false;
GetLendingAnalysisSummaryResult other = (GetLendingAnalysisSummaryResult) obj;
if (other.getDocumentMetadata() == null ^ this.getDocumentMetadata() == null)
return false;
if (other.getDocumentMetadata() != null && other.getDocumentMetadata().equals(this.getDocumentMetadata()) == false)
return false;
if (other.getJobStatus() == null ^ this.getJobStatus() == null)
return false;
if (other.getJobStatus() != null && other.getJobStatus().equals(this.getJobStatus()) == false)
return false;
if (other.getSummary() == null ^ this.getSummary() == null)
return false;
if (other.getSummary() != null && other.getSummary().equals(this.getSummary()) == false)
return false;
if (other.getWarnings() == null ^ this.getWarnings() == null)
return false;
if (other.getWarnings() != null && other.getWarnings().equals(this.getWarnings()) == false)
return false;
if (other.getStatusMessage() == null ^ this.getStatusMessage() == null)
return false;
if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false)
return false;
if (other.getAnalyzeLendingModelVersion() == null ^ this.getAnalyzeLendingModelVersion() == null)
return false;
if (other.getAnalyzeLendingModelVersion() != null && other.getAnalyzeLendingModelVersion().equals(this.getAnalyzeLendingModelVersion()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDocumentMetadata() == null) ? 0 : getDocumentMetadata().hashCode());
hashCode = prime * hashCode + ((getJobStatus() == null) ? 0 : getJobStatus().hashCode());
hashCode = prime * hashCode + ((getSummary() == null) ? 0 : getSummary().hashCode());
hashCode = prime * hashCode + ((getWarnings() == null) ? 0 : getWarnings().hashCode());
hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage().hashCode());
hashCode = prime * hashCode + ((getAnalyzeLendingModelVersion() == null) ? 0 : getAnalyzeLendingModelVersion().hashCode());
return hashCode;
}
@Override
public GetLendingAnalysisSummaryResult clone() {
try {
return (GetLendingAnalysisSummaryResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}