/* * 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 regarding DocumentGroups and UndetectedDocumentTypes. *

*/ public class LendingSummary implements Serializable { /** *

* Contains an array of all DocumentGroup objects. *

*/ private java.util.List documentGroups; /** *

* UndetectedDocumentTypes. *

*/ private java.util.List undetectedDocumentTypes; /** *

* Contains an array of all DocumentGroup objects. *

* * @return

* Contains an array of all DocumentGroup objects. *

*/ public java.util.List getDocumentGroups() { return documentGroups; } /** *

* Contains an array of all DocumentGroup objects. *

* * @param documentGroups

* Contains an array of all DocumentGroup objects. *

*/ public void setDocumentGroups(java.util.Collection documentGroups) { if (documentGroups == null) { this.documentGroups = null; return; } this.documentGroups = new java.util.ArrayList(documentGroups); } /** *

* Contains an array of all DocumentGroup objects. *

*

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

* Contains an array of all DocumentGroup objects. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LendingSummary withDocumentGroups(DocumentGroup... documentGroups) { if (getDocumentGroups() == null) { this.documentGroups = new java.util.ArrayList(documentGroups.length); } for (DocumentGroup value : documentGroups) { this.documentGroups.add(value); } return this; } /** *

* Contains an array of all DocumentGroup objects. *

*

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

* Contains an array of all DocumentGroup objects. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LendingSummary withDocumentGroups(java.util.Collection documentGroups) { setDocumentGroups(documentGroups); return this; } /** *

* UndetectedDocumentTypes. *

* * @return

* UndetectedDocumentTypes. *

*/ public java.util.List getUndetectedDocumentTypes() { return undetectedDocumentTypes; } /** *

* UndetectedDocumentTypes. *

* * @param undetectedDocumentTypes

* UndetectedDocumentTypes. *

*/ public void setUndetectedDocumentTypes(java.util.Collection undetectedDocumentTypes) { if (undetectedDocumentTypes == null) { this.undetectedDocumentTypes = null; return; } this.undetectedDocumentTypes = new java.util.ArrayList(undetectedDocumentTypes); } /** *

* UndetectedDocumentTypes. *

*

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

* UndetectedDocumentTypes. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LendingSummary withUndetectedDocumentTypes(String... undetectedDocumentTypes) { if (getUndetectedDocumentTypes() == null) { this.undetectedDocumentTypes = new java.util.ArrayList( undetectedDocumentTypes.length); } for (String value : undetectedDocumentTypes) { this.undetectedDocumentTypes.add(value); } return this; } /** *

* UndetectedDocumentTypes. *

*

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

* UndetectedDocumentTypes. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LendingSummary withUndetectedDocumentTypes( java.util.Collection undetectedDocumentTypes) { setUndetectedDocumentTypes(undetectedDocumentTypes); 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 (getDocumentGroups() != null) sb.append("DocumentGroups: " + getDocumentGroups() + ","); if (getUndetectedDocumentTypes() != null) sb.append("UndetectedDocumentTypes: " + getUndetectedDocumentTypes()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDocumentGroups() == null) ? 0 : getDocumentGroups().hashCode()); hashCode = prime * hashCode + ((getUndetectedDocumentTypes() == null) ? 0 : getUndetectedDocumentTypes() .hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LendingSummary == false) return false; LendingSummary other = (LendingSummary) obj; if (other.getDocumentGroups() == null ^ this.getDocumentGroups() == null) return false; if (other.getDocumentGroups() != null && other.getDocumentGroups().equals(this.getDocumentGroups()) == false) return false; if (other.getUndetectedDocumentTypes() == null ^ this.getUndetectedDocumentTypes() == null) return false; if (other.getUndetectedDocumentTypes() != null && other.getUndetectedDocumentTypes().equals(this.getUndetectedDocumentTypes()) == false) return false; return true; } }