/* * 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.textract.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Breakdown of detected information, seperated into the catagories Type, LabelDetection, and ValueDetection *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ExpenseField implements Serializable, Cloneable, StructuredPojo { /** ** The implied label of a detected element. Present alongside LabelDetection for explicit elements. *
*/ private ExpenseType type; /** ** The explicitly stated label of a detected element. *
*/ private ExpenseDetection labelDetection; /** ** The value of a detected element. Present in explicit and implicit elements. *
*/ private ExpenseDetection valueDetection; /** ** The page number the value was detected on. *
*/ private Integer pageNumber; /** ** Shows the kind of currency, both the code and confidence associated with any monatary value detected. *
*/ private ExpenseCurrency currency; /** ** Shows which group a response object belongs to, such as whether an address line belongs to the vendor's address * or the recipent's address. *
*/ private java.util.List* The implied label of a detected element. Present alongside LabelDetection for explicit elements. *
* * @param type * The implied label of a detected element. Present alongside LabelDetection for explicit elements. */ public void setType(ExpenseType type) { this.type = type; } /** ** The implied label of a detected element. Present alongside LabelDetection for explicit elements. *
* * @return The implied label of a detected element. Present alongside LabelDetection for explicit elements. */ public ExpenseType getType() { return this.type; } /** ** The implied label of a detected element. Present alongside LabelDetection for explicit elements. *
* * @param type * The implied label of a detected element. Present alongside LabelDetection for explicit elements. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpenseField withType(ExpenseType type) { setType(type); return this; } /** ** The explicitly stated label of a detected element. *
* * @param labelDetection * The explicitly stated label of a detected element. */ public void setLabelDetection(ExpenseDetection labelDetection) { this.labelDetection = labelDetection; } /** ** The explicitly stated label of a detected element. *
* * @return The explicitly stated label of a detected element. */ public ExpenseDetection getLabelDetection() { return this.labelDetection; } /** ** The explicitly stated label of a detected element. *
* * @param labelDetection * The explicitly stated label of a detected element. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpenseField withLabelDetection(ExpenseDetection labelDetection) { setLabelDetection(labelDetection); return this; } /** ** The value of a detected element. Present in explicit and implicit elements. *
* * @param valueDetection * The value of a detected element. Present in explicit and implicit elements. */ public void setValueDetection(ExpenseDetection valueDetection) { this.valueDetection = valueDetection; } /** ** The value of a detected element. Present in explicit and implicit elements. *
* * @return The value of a detected element. Present in explicit and implicit elements. */ public ExpenseDetection getValueDetection() { return this.valueDetection; } /** ** The value of a detected element. Present in explicit and implicit elements. *
* * @param valueDetection * The value of a detected element. Present in explicit and implicit elements. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpenseField withValueDetection(ExpenseDetection valueDetection) { setValueDetection(valueDetection); return this; } /** ** The page number the value was detected on. *
* * @param pageNumber * The page number the value was detected on. */ public void setPageNumber(Integer pageNumber) { this.pageNumber = pageNumber; } /** ** The page number the value was detected on. *
* * @return The page number the value was detected on. */ public Integer getPageNumber() { return this.pageNumber; } /** ** The page number the value was detected on. *
* * @param pageNumber * The page number the value was detected on. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpenseField withPageNumber(Integer pageNumber) { setPageNumber(pageNumber); return this; } /** ** Shows the kind of currency, both the code and confidence associated with any monatary value detected. *
* * @param currency * Shows the kind of currency, both the code and confidence associated with any monatary value detected. */ public void setCurrency(ExpenseCurrency currency) { this.currency = currency; } /** ** Shows the kind of currency, both the code and confidence associated with any monatary value detected. *
* * @return Shows the kind of currency, both the code and confidence associated with any monatary value detected. */ public ExpenseCurrency getCurrency() { return this.currency; } /** ** Shows the kind of currency, both the code and confidence associated with any monatary value detected. *
* * @param currency * Shows the kind of currency, both the code and confidence associated with any monatary value detected. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpenseField withCurrency(ExpenseCurrency currency) { setCurrency(currency); return this; } /** ** Shows which group a response object belongs to, such as whether an address line belongs to the vendor's address * or the recipent's address. *
* * @return Shows which group a response object belongs to, such as whether an address line belongs to the vendor's * address or the recipent's address. */ public java.util.List* Shows which group a response object belongs to, such as whether an address line belongs to the vendor's address * or the recipent's address. *
* * @param groupProperties * Shows which group a response object belongs to, such as whether an address line belongs to the vendor's * address or the recipent's address. */ public void setGroupProperties(java.util.Collection* Shows which group a response object belongs to, such as whether an address line belongs to the vendor's address * or the recipent's address. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setGroupProperties(java.util.Collection)} or {@link #withGroupProperties(java.util.Collection)} if you * want to override the existing values. *
* * @param groupProperties * Shows which group a response object belongs to, such as whether an address line belongs to the vendor's * address or the recipent's address. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpenseField withGroupProperties(ExpenseGroupProperty... groupProperties) { if (this.groupProperties == null) { setGroupProperties(new java.util.ArrayList* Shows which group a response object belongs to, such as whether an address line belongs to the vendor's address * or the recipent's address. *
* * @param groupProperties * Shows which group a response object belongs to, such as whether an address line belongs to the vendor's * address or the recipent's address. * @return Returns a reference to this object so that method calls can be chained together. */ public ExpenseField withGroupProperties(java.util.Collection