/* * Copyright 2010-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.textract.model; import java.io.Serializable; /** *

* Contains information extracted by an analysis operation after using * StartLendingAnalysis. *

*/ public class Extraction implements Serializable { /** *

* Holds the structured data returned by AnalyzeDocument for lending * documents. *

*/ private LendingDocument lendingDocument; /** *

* The structure holding all the information returned by AnalyzeExpense *

*/ private ExpenseDocument expenseDocument; /** *

* The structure that lists each document processed in an AnalyzeID * operation. *

*/ private IdentityDocument identityDocument; /** *

* Holds the structured data returned by AnalyzeDocument for lending * documents. *

* * @return

* Holds the structured data returned by AnalyzeDocument for lending * documents. *

*/ public LendingDocument getLendingDocument() { return lendingDocument; } /** *

* Holds the structured data returned by AnalyzeDocument for lending * documents. *

* * @param lendingDocument

* Holds the structured data returned by AnalyzeDocument for * lending documents. *

*/ public void setLendingDocument(LendingDocument lendingDocument) { this.lendingDocument = lendingDocument; } /** *

* Holds the structured data returned by AnalyzeDocument for lending * documents. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param lendingDocument

* Holds the structured data returned by AnalyzeDocument for * lending documents. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Extraction withLendingDocument(LendingDocument lendingDocument) { this.lendingDocument = lendingDocument; return this; } /** *

* The structure holding all the information returned by AnalyzeExpense *

* * @return

* The structure holding all the information returned by * AnalyzeExpense *

*/ public ExpenseDocument getExpenseDocument() { return expenseDocument; } /** *

* The structure holding all the information returned by AnalyzeExpense *

* * @param expenseDocument

* The structure holding all the information returned by * AnalyzeExpense *

*/ public void setExpenseDocument(ExpenseDocument expenseDocument) { this.expenseDocument = expenseDocument; } /** *

* The structure holding all the information returned by AnalyzeExpense *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param expenseDocument

* The structure holding all the information returned by * AnalyzeExpense *

* @return A reference to this updated object so that method calls can be * chained together. */ public Extraction withExpenseDocument(ExpenseDocument expenseDocument) { this.expenseDocument = expenseDocument; return this; } /** *

* The structure that lists each document processed in an AnalyzeID * operation. *

* * @return

* The structure that lists each document processed in an AnalyzeID * operation. *

*/ public IdentityDocument getIdentityDocument() { return identityDocument; } /** *

* The structure that lists each document processed in an AnalyzeID * operation. *

* * @param identityDocument

* The structure that lists each document processed in an * AnalyzeID operation. *

*/ public void setIdentityDocument(IdentityDocument identityDocument) { this.identityDocument = identityDocument; } /** *

* The structure that lists each document processed in an AnalyzeID * operation. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param identityDocument

* The structure that lists each document processed in an * AnalyzeID operation. *

* @return A reference to this updated object so that method calls can be * chained together. */ public Extraction withIdentityDocument(IdentityDocument identityDocument) { this.identityDocument = identityDocument; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLendingDocument() != null) sb.append("LendingDocument: " + getLendingDocument() + ","); if (getExpenseDocument() != null) sb.append("ExpenseDocument: " + getExpenseDocument() + ","); if (getIdentityDocument() != null) sb.append("IdentityDocument: " + getIdentityDocument()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLendingDocument() == null) ? 0 : getLendingDocument().hashCode()); hashCode = prime * hashCode + ((getExpenseDocument() == null) ? 0 : getExpenseDocument().hashCode()); hashCode = prime * hashCode + ((getIdentityDocument() == null) ? 0 : getIdentityDocument().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Extraction == false) return false; Extraction other = (Extraction) obj; if (other.getLendingDocument() == null ^ this.getLendingDocument() == null) return false; if (other.getLendingDocument() != null && other.getLendingDocument().equals(this.getLendingDocument()) == false) return false; if (other.getExpenseDocument() == null ^ this.getExpenseDocument() == null) return false; if (other.getExpenseDocument() != null && other.getExpenseDocument().equals(this.getExpenseDocument()) == false) return false; if (other.getIdentityDocument() == null ^ this.getIdentityDocument() == null) return false; if (other.getIdentityDocument() != null && other.getIdentityDocument().equals(this.getIdentityDocument()) == false) return false; return true; } }