* Metadata about the analyzed document. An example is the number of pages. *
*/ private DocumentMetadata documentMetadata; /** *
* The items that are detected and analyzed by AnalyzeDocument
.
*
* Shows the results of the human in the loop evaluation. *
*/ private HumanLoopActivationOutput humanLoopActivationOutput; /** ** The version of the model used to analyze the document. *
*/ private String analyzeDocumentModelVersion; /** ** Metadata about the analyzed document. An example is the number of pages. *
* * @param documentMetadata * Metadata about the analyzed document. An example is the number of pages. */ public void setDocumentMetadata(DocumentMetadata documentMetadata) { this.documentMetadata = documentMetadata; } /** ** Metadata about the analyzed document. An example is the number of pages. *
* * @return Metadata about the analyzed document. An example is the number of pages. */ public DocumentMetadata getDocumentMetadata() { return this.documentMetadata; } /** ** Metadata about the analyzed document. An example is the number of pages. *
* * @param documentMetadata * Metadata about the analyzed document. An example is the number of pages. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyzeDocumentResult withDocumentMetadata(DocumentMetadata documentMetadata) { setDocumentMetadata(documentMetadata); return this; } /** *
* The items that are detected and analyzed by AnalyzeDocument
.
*
AnalyzeDocument
.
*/
public java.util.List
* The items that are detected and analyzed by AnalyzeDocument
.
*
AnalyzeDocument
.
*/
public void setBlocks(java.util.Collection
* The items that are detected and analyzed by AnalyzeDocument
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBlocks(java.util.Collection)} or {@link #withBlocks(java.util.Collection)} if you want to override the * existing values. *
* * @param blocks * The items that are detected and analyzed byAnalyzeDocument
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalyzeDocumentResult withBlocks(Block... blocks) {
if (this.blocks == null) {
setBlocks(new java.util.ArrayList
* The items that are detected and analyzed by AnalyzeDocument
.
*
AnalyzeDocument
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AnalyzeDocumentResult withBlocks(java.util.Collection* Shows the results of the human in the loop evaluation. *
* * @param humanLoopActivationOutput * Shows the results of the human in the loop evaluation. */ public void setHumanLoopActivationOutput(HumanLoopActivationOutput humanLoopActivationOutput) { this.humanLoopActivationOutput = humanLoopActivationOutput; } /** ** Shows the results of the human in the loop evaluation. *
* * @return Shows the results of the human in the loop evaluation. */ public HumanLoopActivationOutput getHumanLoopActivationOutput() { return this.humanLoopActivationOutput; } /** ** Shows the results of the human in the loop evaluation. *
* * @param humanLoopActivationOutput * Shows the results of the human in the loop evaluation. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyzeDocumentResult withHumanLoopActivationOutput(HumanLoopActivationOutput humanLoopActivationOutput) { setHumanLoopActivationOutput(humanLoopActivationOutput); return this; } /** ** The version of the model used to analyze the document. *
* * @param analyzeDocumentModelVersion * The version of the model used to analyze the document. */ public void setAnalyzeDocumentModelVersion(String analyzeDocumentModelVersion) { this.analyzeDocumentModelVersion = analyzeDocumentModelVersion; } /** ** The version of the model used to analyze the document. *
* * @return The version of the model used to analyze the document. */ public String getAnalyzeDocumentModelVersion() { return this.analyzeDocumentModelVersion; } /** ** The version of the model used to analyze the document. *
* * @param analyzeDocumentModelVersion * The version of the model used to analyze the document. * @return Returns a reference to this object so that method calls can be chained together. */ public AnalyzeDocumentResult withAnalyzeDocumentModelVersion(String analyzeDocumentModelVersion) { setAnalyzeDocumentModelVersion(analyzeDocumentModelVersion); 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 (getBlocks() != null) sb.append("Blocks: ").append(getBlocks()).append(","); if (getHumanLoopActivationOutput() != null) sb.append("HumanLoopActivationOutput: ").append(getHumanLoopActivationOutput()).append(","); if (getAnalyzeDocumentModelVersion() != null) sb.append("AnalyzeDocumentModelVersion: ").append(getAnalyzeDocumentModelVersion()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AnalyzeDocumentResult == false) return false; AnalyzeDocumentResult other = (AnalyzeDocumentResult) obj; if (other.getDocumentMetadata() == null ^ this.getDocumentMetadata() == null) return false; if (other.getDocumentMetadata() != null && other.getDocumentMetadata().equals(this.getDocumentMetadata()) == false) return false; if (other.getBlocks() == null ^ this.getBlocks() == null) return false; if (other.getBlocks() != null && other.getBlocks().equals(this.getBlocks()) == false) return false; if (other.getHumanLoopActivationOutput() == null ^ this.getHumanLoopActivationOutput() == null) return false; if (other.getHumanLoopActivationOutput() != null && other.getHumanLoopActivationOutput().equals(this.getHumanLoopActivationOutput()) == false) return false; if (other.getAnalyzeDocumentModelVersion() == null ^ this.getAnalyzeDocumentModelVersion() == null) return false; if (other.getAnalyzeDocumentModelVersion() != null && other.getAnalyzeDocumentModelVersion().equals(this.getAnalyzeDocumentModelVersion()) == 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 + ((getBlocks() == null) ? 0 : getBlocks().hashCode()); hashCode = prime * hashCode + ((getHumanLoopActivationOutput() == null) ? 0 : getHumanLoopActivationOutput().hashCode()); hashCode = prime * hashCode + ((getAnalyzeDocumentModelVersion() == null) ? 0 : getAnalyzeDocumentModelVersion().hashCode()); return hashCode; } @Override public AnalyzeDocumentResult clone() { try { return (AnalyzeDocumentResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }