/* * 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; /** *
* A Block
represents items that are recognized in a document within a group of pixels close to each other.
* The information returned in a Block
object depends on the type of operation. In text detection for
* documents (for example DetectDocumentText), you get information about the detected words and lines of text. In
* text analysis (for example AnalyzeDocument), you can also get information about the fields, tables, and
* selection elements that are detected in the document.
*
* An array of Block
objects is returned by both synchronous and asynchronous operations. In synchronous
* operations, such as DetectDocumentText, the array of Block
objects is the entire set of results.
* In asynchronous operations, such as GetDocumentAnalysis, the array is returned over one or more responses.
*
* For more information, see How Amazon * Textract Works. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Block implements Serializable, Cloneable, StructuredPojo { /** ** The type of text item that's recognized. In operations for text detection, the following types are returned: *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters that * aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's detected on a
* document page. Use the EntityType
field to determine if a KEY_VALUE_SET object is a KEY
* Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or more * rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text below a * table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text in the * cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box that's
* detected on a document page. Use the value of SelectionStatus
to determine the status of the
* selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be returned * as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it * to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an alias and * ID for ease of locating in a response. Also contains location and confidence score. *
** The confidence score that Amazon Textract has in the accuracy of the recognized text and the accuracy of the * geometry points around the recognized text. *
*/ private Float confidence; /** ** The word or line of text that's recognized by Amazon Textract. *
*/ private String text; /** ** The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. *
*/ private String textType; /** *
* The row in which a table cell is located. The first row position is 1. RowIndex
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
* The column in which a table cell appears. The first column position is 1. ColumnIndex
isn't returned
* by DetectDocumentText
and GetDocumentTextDetection
.
*
* The number of rows that a table cell spans. RowSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
* The number of columns that a table cell spans. ColumnSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
* The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that surrounds * the text, and a finer-grain polygon for more accurate spatial information. *
*/ private Geometry geometry; /** ** The identifier for the recognized text. The identifier is only unique for a single operation. *
*/ private String id; /** ** A list of relationship objects that describe how blocks are related to each other. For example, a LINE block * object contains a CHILD relationship type with the WORD blocks that make up the line of text. There aren't * Relationship objects in the list for relationships that don't exist, such as when the current block has no child * blocks. *
*/ private java.util.List* The type of entity. *
** The following entity types can be returned by FORMS analysis: *
** KEY - An identifier for a field on the document. *
** VALUE - The field text. *
** The following entity types can be returned by TABLES analysis: *
** COLUMN_HEADER - Identifies a cell that is a header of a column. *
** TABLE_TITLE - Identifies a cell that is a title within the table. *
** TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section title is a * cell that typically spans an entire row above a section. *
** TABLE_FOOTER - Identifies a cell that is a footer of a table. *
** TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an * additional, smaller table that contains summary information for another table. *
** STRUCTURED_TABLE - Identifies a table with column headers where the content of each row corresponds to * the headers. *
** SEMI_STRUCTURED_TABLE - Identifies a non-structured table. *
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
*
* The selection status of a selection element, such as an option button or check box. *
*/ private String selectionStatus; /** *
* The page on which a block was detected. Page
is returned by synchronous and asynchronous operations.
* Page values greater than 1 are only returned for multipage documents that are in PDF or TIFF format. A scanned
* image (JPEG/PNG) provided to an asynchronous operation, even if it contains multiple document pages, is
* considered a single-page document. This means that for scanned images the value of Page
is always 1.
* Synchronous operations will also return a Page
value of 1 because every input document is considered
* to be a single-page document.
*
* The type of text item that's recognized. In operations for text detection, the following types are returned: *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters that * aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's detected on a
* document page. Use the EntityType
field to determine if a KEY_VALUE_SET object is a KEY
* Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or more * rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text below a * table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text in the * cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box that's
* detected on a document page. Use the value of SelectionStatus
to determine the status of the
* selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be returned * as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it * to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an alias and * ID for ease of locating in a response. Also contains location and confidence score. *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's detected
* on a document page. Use the EntityType
field to determine if a KEY_VALUE_SET object is a KEY
* Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script * characters that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or * more rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text * below a table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text * in the cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box
* that's detected on a document page. Use the value of SelectionStatus
to determine the status
* of the selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be * returned as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that * attaches it to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an * alias and ID for ease of locating in a response. Also contains location and confidence score. *
** The type of text item that's recognized. In operations for text detection, the following types are returned: *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters that * aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's detected on a
* document page. Use the EntityType
field to determine if a KEY_VALUE_SET object is a KEY
* Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or more * rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text below a * table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text in the * cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box that's
* detected on a document page. Use the value of SelectionStatus
to determine the status of the
* selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be returned * as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it * to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an alias and * ID for ease of locating in a response. Also contains location and confidence score. *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document
* page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's
* detected on a document page. Use the EntityType
field to determine if a KEY_VALUE_SET object
* is a KEY Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script * characters that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or * more rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text * below a table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text * in the cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box
* that's detected on a document page. Use the value of SelectionStatus
to determine the status
* of the selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be * returned as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that * attaches it to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an * alias and ID for ease of locating in a response. Also contains location and confidence score. *
** The type of text item that's recognized. In operations for text detection, the following types are returned: *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters that * aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's detected on a
* document page. Use the EntityType
field to determine if a KEY_VALUE_SET object is a KEY
* Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or more * rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text below a * table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text in the * cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box that's
* detected on a document page. Use the value of SelectionStatus
to determine the status of the
* selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be returned * as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it * to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an alias and * ID for ease of locating in a response. Also contains location and confidence score. *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's detected
* on a document page. Use the EntityType
field to determine if a KEY_VALUE_SET object is a KEY
* Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script * characters that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or * more rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text * below a table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text * in the cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box
* that's detected on a document page. Use the value of SelectionStatus
to determine the status
* of the selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be * returned as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that * attaches it to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an * alias and ID for ease of locating in a response. Also contains location and confidence score. *
** The type of text item that's recognized. In operations for text detection, the following types are returned: *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters that * aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's detected on a
* document page. Use the EntityType
field to determine if a KEY_VALUE_SET object is a KEY
* Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or more * rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text below a * table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text in the * cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box that's
* detected on a document page. Use the value of SelectionStatus
to determine the status of the
* selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be returned * as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it * to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an alias and * ID for ease of locating in a response. Also contains location and confidence score. *
*
* PAGE - Contains a list of the LINE Block
objects that are detected on a document page.
*
* WORD - A word detected on a document page. A word is one or more ISO basic Latin script characters * that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** In text analysis operations, the following types are returned: *
*
* PAGE - Contains a list of child Block
objects that are detected on a document page.
*
* KEY_VALUE_SET - Stores the KEY and VALUE Block
objects for linked text that's detected
* on a document page. Use the EntityType
field to determine if a KEY_VALUE_SET object is a KEY
* Block
object or a VALUE Block
object.
*
* WORD - A word that's detected on a document page. A word is one or more ISO basic Latin script * characters that aren't separated by spaces. *
** LINE - A string of tab-delimited, contiguous words that are detected on a document page. *
** TABLE - A table that's detected on a document page. A table is grid-based information with two or * more rows or columns, with a cell span of one row and one column each. *
** TABLE_TITLE - The title of a table. A title is typically a line of text above or below a table, or * embedded as the first row of a table. *
** TABLE_FOOTER - The footer associated with a table. A footer is typically a line or lines of text * below a table or embedded as the last row of a table. *
** CELL - A cell within a detected table. The cell is the parent of the block that contains the text * in the cell. *
*
* MERGED_CELL - A cell in a table whose content spans more than one row or column. The
* Relationships
array for this cell contain data from individual cells.
*
* SELECTION_ELEMENT - A selection element such as an option button (radio button) or a check box
* that's detected on a document page. Use the value of SelectionStatus
to determine the status
* of the selection element.
*
* SIGNATURE - The location and confidene score of a signature detected on a document page. Can be * returned as part of a Key-Value pair or a detected cell. *
** QUERY - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that * attaches it to its answer. *
** QUERY_RESULT - A response to a question asked during the call of analyze document. Comes with an * alias and ID for ease of locating in a response. Also contains location and confidence score. *
** The confidence score that Amazon Textract has in the accuracy of the recognized text and the accuracy of the * geometry points around the recognized text. *
* * @param confidence * The confidence score that Amazon Textract has in the accuracy of the recognized text and the accuracy of * the geometry points around the recognized text. */ public void setConfidence(Float confidence) { this.confidence = confidence; } /** ** The confidence score that Amazon Textract has in the accuracy of the recognized text and the accuracy of the * geometry points around the recognized text. *
* * @return The confidence score that Amazon Textract has in the accuracy of the recognized text and the accuracy of * the geometry points around the recognized text. */ public Float getConfidence() { return this.confidence; } /** ** The confidence score that Amazon Textract has in the accuracy of the recognized text and the accuracy of the * geometry points around the recognized text. *
* * @param confidence * The confidence score that Amazon Textract has in the accuracy of the recognized text and the accuracy of * the geometry points around the recognized text. * @return Returns a reference to this object so that method calls can be chained together. */ public Block withConfidence(Float confidence) { setConfidence(confidence); return this; } /** ** The word or line of text that's recognized by Amazon Textract. *
* * @param text * The word or line of text that's recognized by Amazon Textract. */ public void setText(String text) { this.text = text; } /** ** The word or line of text that's recognized by Amazon Textract. *
* * @return The word or line of text that's recognized by Amazon Textract. */ public String getText() { return this.text; } /** ** The word or line of text that's recognized by Amazon Textract. *
* * @param text * The word or line of text that's recognized by Amazon Textract. * @return Returns a reference to this object so that method calls can be chained together. */ public Block withText(String text) { setText(text); return this; } /** ** The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. *
* * @param textType * The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. * @see TextType */ public void setTextType(String textType) { this.textType = textType; } /** ** The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. *
* * @return The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. * @see TextType */ public String getTextType() { return this.textType; } /** ** The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. *
* * @param textType * The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. * @return Returns a reference to this object so that method calls can be chained together. * @see TextType */ public Block withTextType(String textType) { setTextType(textType); return this; } /** ** The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. *
* * @param textType * The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text. * @return Returns a reference to this object so that method calls can be chained together. * @see TextType */ public Block withTextType(TextType textType) { this.textType = textType.toString(); return this; } /** *
* The row in which a table cell is located. The first row position is 1. RowIndex
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
RowIndex
isn't
* returned by DetectDocumentText
and GetDocumentTextDetection
.
*/
public void setRowIndex(Integer rowIndex) {
this.rowIndex = rowIndex;
}
/**
*
* The row in which a table cell is located. The first row position is 1. RowIndex
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
RowIndex
isn't
* returned by DetectDocumentText
and GetDocumentTextDetection
.
*/
public Integer getRowIndex() {
return this.rowIndex;
}
/**
*
* The row in which a table cell is located. The first row position is 1. RowIndex
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
RowIndex
isn't
* returned by DetectDocumentText
and GetDocumentTextDetection
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Block withRowIndex(Integer rowIndex) {
setRowIndex(rowIndex);
return this;
}
/**
*
* The column in which a table cell appears. The first column position is 1. ColumnIndex
isn't returned
* by DetectDocumentText
and GetDocumentTextDetection
.
*
ColumnIndex
isn't
* returned by DetectDocumentText
and GetDocumentTextDetection
.
*/
public void setColumnIndex(Integer columnIndex) {
this.columnIndex = columnIndex;
}
/**
*
* The column in which a table cell appears. The first column position is 1. ColumnIndex
isn't returned
* by DetectDocumentText
and GetDocumentTextDetection
.
*
ColumnIndex
isn't
* returned by DetectDocumentText
and GetDocumentTextDetection
.
*/
public Integer getColumnIndex() {
return this.columnIndex;
}
/**
*
* The column in which a table cell appears. The first column position is 1. ColumnIndex
isn't returned
* by DetectDocumentText
and GetDocumentTextDetection
.
*
ColumnIndex
isn't
* returned by DetectDocumentText
and GetDocumentTextDetection
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Block withColumnIndex(Integer columnIndex) {
setColumnIndex(columnIndex);
return this;
}
/**
*
* The number of rows that a table cell spans. RowSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
RowSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*/
public void setRowSpan(Integer rowSpan) {
this.rowSpan = rowSpan;
}
/**
*
* The number of rows that a table cell spans. RowSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
RowSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*/
public Integer getRowSpan() {
return this.rowSpan;
}
/**
*
* The number of rows that a table cell spans. RowSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
RowSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Block withRowSpan(Integer rowSpan) {
setRowSpan(rowSpan);
return this;
}
/**
*
* The number of columns that a table cell spans. ColumnSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
ColumnSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*/
public void setColumnSpan(Integer columnSpan) {
this.columnSpan = columnSpan;
}
/**
*
* The number of columns that a table cell spans. ColumnSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
ColumnSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*/
public Integer getColumnSpan() {
return this.columnSpan;
}
/**
*
* The number of columns that a table cell spans. ColumnSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
*
ColumnSpan
isn't returned by
* DetectDocumentText
and GetDocumentTextDetection
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Block withColumnSpan(Integer columnSpan) {
setColumnSpan(columnSpan);
return this;
}
/**
* * The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that surrounds * the text, and a finer-grain polygon for more accurate spatial information. *
* * @param geometry * The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that * surrounds the text, and a finer-grain polygon for more accurate spatial information. */ public void setGeometry(Geometry geometry) { this.geometry = geometry; } /** ** The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that surrounds * the text, and a finer-grain polygon for more accurate spatial information. *
* * @return The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that * surrounds the text, and a finer-grain polygon for more accurate spatial information. */ public Geometry getGeometry() { return this.geometry; } /** ** The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that surrounds * the text, and a finer-grain polygon for more accurate spatial information. *
* * @param geometry * The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that * surrounds the text, and a finer-grain polygon for more accurate spatial information. * @return Returns a reference to this object so that method calls can be chained together. */ public Block withGeometry(Geometry geometry) { setGeometry(geometry); return this; } /** ** The identifier for the recognized text. The identifier is only unique for a single operation. *
* * @param id * The identifier for the recognized text. The identifier is only unique for a single operation. */ public void setId(String id) { this.id = id; } /** ** The identifier for the recognized text. The identifier is only unique for a single operation. *
* * @return The identifier for the recognized text. The identifier is only unique for a single operation. */ public String getId() { return this.id; } /** ** The identifier for the recognized text. The identifier is only unique for a single operation. *
* * @param id * The identifier for the recognized text. The identifier is only unique for a single operation. * @return Returns a reference to this object so that method calls can be chained together. */ public Block withId(String id) { setId(id); return this; } /** ** A list of relationship objects that describe how blocks are related to each other. For example, a LINE block * object contains a CHILD relationship type with the WORD blocks that make up the line of text. There aren't * Relationship objects in the list for relationships that don't exist, such as when the current block has no child * blocks. *
* * @return A list of relationship objects that describe how blocks are related to each other. For example, a LINE * block object contains a CHILD relationship type with the WORD blocks that make up the line of text. There * aren't Relationship objects in the list for relationships that don't exist, such as when the current * block has no child blocks. */ public java.util.List* A list of relationship objects that describe how blocks are related to each other. For example, a LINE block * object contains a CHILD relationship type with the WORD blocks that make up the line of text. There aren't * Relationship objects in the list for relationships that don't exist, such as when the current block has no child * blocks. *
* * @param relationships * A list of relationship objects that describe how blocks are related to each other. For example, a LINE * block object contains a CHILD relationship type with the WORD blocks that make up the line of text. There * aren't Relationship objects in the list for relationships that don't exist, such as when the current block * has no child blocks. */ public void setRelationships(java.util.Collection* A list of relationship objects that describe how blocks are related to each other. For example, a LINE block * object contains a CHILD relationship type with the WORD blocks that make up the line of text. There aren't * Relationship objects in the list for relationships that don't exist, such as when the current block has no child * blocks. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRelationships(java.util.Collection)} or {@link #withRelationships(java.util.Collection)} if you want * to override the existing values. *
* * @param relationships * A list of relationship objects that describe how blocks are related to each other. For example, a LINE * block object contains a CHILD relationship type with the WORD blocks that make up the line of text. There * aren't Relationship objects in the list for relationships that don't exist, such as when the current block * has no child blocks. * @return Returns a reference to this object so that method calls can be chained together. */ public Block withRelationships(Relationship... relationships) { if (this.relationships == null) { setRelationships(new java.util.ArrayList* A list of relationship objects that describe how blocks are related to each other. For example, a LINE block * object contains a CHILD relationship type with the WORD blocks that make up the line of text. There aren't * Relationship objects in the list for relationships that don't exist, such as when the current block has no child * blocks. *
* * @param relationships * A list of relationship objects that describe how blocks are related to each other. For example, a LINE * block object contains a CHILD relationship type with the WORD blocks that make up the line of text. There * aren't Relationship objects in the list for relationships that don't exist, such as when the current block * has no child blocks. * @return Returns a reference to this object so that method calls can be chained together. */ public Block withRelationships(java.util.Collection* The type of entity. *
** The following entity types can be returned by FORMS analysis: *
** KEY - An identifier for a field on the document. *
** VALUE - The field text. *
** The following entity types can be returned by TABLES analysis: *
** COLUMN_HEADER - Identifies a cell that is a header of a column. *
** TABLE_TITLE - Identifies a cell that is a title within the table. *
** TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section title is a * cell that typically spans an entire row above a section. *
** TABLE_FOOTER - Identifies a cell that is a footer of a table. *
** TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an * additional, smaller table that contains summary information for another table. *
** STRUCTURED_TABLE - Identifies a table with column headers where the content of each row corresponds to * the headers. *
** SEMI_STRUCTURED_TABLE - Identifies a non-structured table. *
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
*
* The following entity types can be returned by FORMS analysis: *
** KEY - An identifier for a field on the document. *
** VALUE - The field text. *
** The following entity types can be returned by TABLES analysis: *
** COLUMN_HEADER - Identifies a cell that is a header of a column. *
** TABLE_TITLE - Identifies a cell that is a title within the table. *
** TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section * title is a cell that typically spans an entire row above a section. *
** TABLE_FOOTER - Identifies a cell that is a footer of a table. *
** TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an * additional, smaller table that contains summary information for another table. *
** STRUCTURED_TABLE - Identifies a table with column headers where the content of each row * corresponds to the headers. *
** SEMI_STRUCTURED_TABLE - Identifies a non-structured table. *
*
*
* The type of entity.
*
* The following entity types can be returned by FORMS analysis:
*
* KEY - An identifier for a field on the document.
*
* VALUE - The field text.
*
* The following entity types can be returned by TABLES analysis:
*
* COLUMN_HEADER - Identifies a cell that is a header of a column.
*
* TABLE_TITLE - Identifies a cell that is a title within the table.
*
* TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section title is a
* cell that typically spans an entire row above a section.
*
* TABLE_FOOTER - Identifies a cell that is a footer of a table.
*
* TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an
* additional, smaller table that contains summary information for another table.
*
* STRUCTURED_TABLE - Identifies a table with column headers where the content of each row corresponds to
* the headers.
*
* SEMI_STRUCTURED_TABLE - Identifies a non-structured table.
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
* @see EntityType
*/
public java.util.List
*
*
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
*
* The following entity types can be returned by FORMS analysis: *
** KEY - An identifier for a field on the document. *
** VALUE - The field text. *
** The following entity types can be returned by TABLES analysis: *
** COLUMN_HEADER - Identifies a cell that is a header of a column. *
** TABLE_TITLE - Identifies a cell that is a title within the table. *
** TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section * title is a cell that typically spans an entire row above a section. *
** TABLE_FOOTER - Identifies a cell that is a footer of a table. *
** TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an * additional, smaller table that contains summary information for another table. *
** STRUCTURED_TABLE - Identifies a table with column headers where the content of each row * corresponds to the headers. *
** SEMI_STRUCTURED_TABLE - Identifies a non-structured table. *
*
*
* The type of entity.
*
* The following entity types can be returned by FORMS analysis:
*
* KEY - An identifier for a field on the document.
*
* VALUE - The field text.
*
* The following entity types can be returned by TABLES analysis:
*
* COLUMN_HEADER - Identifies a cell that is a header of a column.
*
* TABLE_TITLE - Identifies a cell that is a title within the table.
*
* TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section title is a
* cell that typically spans an entire row above a section.
*
* TABLE_FOOTER - Identifies a cell that is a footer of a table.
*
* TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an
* additional, smaller table that contains summary information for another table.
*
* STRUCTURED_TABLE - Identifies a table with column headers where the content of each row corresponds to
* the headers.
*
* SEMI_STRUCTURED_TABLE - Identifies a non-structured table.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEntityTypes(java.util.Collection)} or {@link #withEntityTypes(java.util.Collection)} if you want to
* override the existing values.
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
* @see EntityType
*/
public void setEntityTypes(java.util.Collection
*
*
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
*
* The following entity types can be returned by FORMS analysis: *
** KEY - An identifier for a field on the document. *
** VALUE - The field text. *
** The following entity types can be returned by TABLES analysis: *
** COLUMN_HEADER - Identifies a cell that is a header of a column. *
** TABLE_TITLE - Identifies a cell that is a title within the table. *
** TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section * title is a cell that typically spans an entire row above a section. *
** TABLE_FOOTER - Identifies a cell that is a footer of a table. *
** TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an * additional, smaller table that contains summary information for another table. *
** STRUCTURED_TABLE - Identifies a table with column headers where the content of each row * corresponds to the headers. *
** SEMI_STRUCTURED_TABLE - Identifies a non-structured table. *
*
*
* The type of entity.
*
* The following entity types can be returned by FORMS analysis:
*
* KEY - An identifier for a field on the document.
*
* VALUE - The field text.
*
* The following entity types can be returned by TABLES analysis:
*
* COLUMN_HEADER - Identifies a cell that is a header of a column.
*
* TABLE_TITLE - Identifies a cell that is a title within the table.
*
* TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section title is a
* cell that typically spans an entire row above a section.
*
* TABLE_FOOTER - Identifies a cell that is a footer of a table.
*
* TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an
* additional, smaller table that contains summary information for another table.
*
* STRUCTURED_TABLE - Identifies a table with column headers where the content of each row corresponds to
* the headers.
*
* SEMI_STRUCTURED_TABLE - Identifies a non-structured table.
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EntityType
*/
public Block withEntityTypes(String... entityTypes) {
if (this.entityTypes == null) {
setEntityTypes(new java.util.ArrayList
*
*
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
*
* The following entity types can be returned by FORMS analysis: *
** KEY - An identifier for a field on the document. *
** VALUE - The field text. *
** The following entity types can be returned by TABLES analysis: *
** COLUMN_HEADER - Identifies a cell that is a header of a column. *
** TABLE_TITLE - Identifies a cell that is a title within the table. *
** TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section * title is a cell that typically spans an entire row above a section. *
** TABLE_FOOTER - Identifies a cell that is a footer of a table. *
** TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an * additional, smaller table that contains summary information for another table. *
** STRUCTURED_TABLE - Identifies a table with column headers where the content of each row * corresponds to the headers. *
** SEMI_STRUCTURED_TABLE - Identifies a non-structured table. *
*
*
* The type of entity.
*
* The following entity types can be returned by FORMS analysis:
*
* KEY - An identifier for a field on the document.
*
* VALUE - The field text.
*
* The following entity types can be returned by TABLES analysis:
*
* COLUMN_HEADER - Identifies a cell that is a header of a column.
*
* TABLE_TITLE - Identifies a cell that is a title within the table.
*
* TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section title is a
* cell that typically spans an entire row above a section.
*
* TABLE_FOOTER - Identifies a cell that is a footer of a table.
*
* TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an
* additional, smaller table that contains summary information for another table.
*
* STRUCTURED_TABLE - Identifies a table with column headers where the content of each row corresponds to
* the headers.
*
* SEMI_STRUCTURED_TABLE - Identifies a non-structured table.
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EntityType
*/
public Block withEntityTypes(java.util.Collection
*
*
*
* EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
*
* The following entity types can be returned by FORMS analysis: *
** KEY - An identifier for a field on the document. *
** VALUE - The field text. *
** The following entity types can be returned by TABLES analysis: *
** COLUMN_HEADER - Identifies a cell that is a header of a column. *
** TABLE_TITLE - Identifies a cell that is a title within the table. *
** TABLE_SECTION_TITLE - Identifies a cell that is a title of a section within a table. A section * title is a cell that typically spans an entire row above a section. *
** TABLE_FOOTER - Identifies a cell that is a footer of a table. *
** TABLE_SUMMARY - Identifies a summary cell of a table. A summary cell can be a row of a table or an * additional, smaller table that contains summary information for another table. *
** STRUCTURED_TABLE - Identifies a table with column headers where the content of each row * corresponds to the headers. *
** SEMI_STRUCTURED_TABLE - Identifies a non-structured table. *
*
*
* The selection status of a selection element, such as an option button or check box.
*
* The selection status of a selection element, such as an option button or check box.
*
* The selection status of a selection element, such as an option button or check box.
*
* The selection status of a selection element, such as an option button or check box.
*
* The page on which a block was detected.
* The page on which a block was detected.
* The page on which a block was detected. EntityTypes
isn't returned by DetectDocumentText
and
* GetDocumentTextDetection
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EntityType
*/
public Block withEntityTypes(EntityType... entityTypes) {
java.util.ArrayListPage
is returned by synchronous and asynchronous operations.
* Page values greater than 1 are only returned for multipage documents that are in PDF or TIFF format. A scanned
* image (JPEG/PNG) provided to an asynchronous operation, even if it contains multiple document pages, is
* considered a single-page document. This means that for scanned images the value of Page
is always 1.
* Synchronous operations will also return a Page
value of 1 because every input document is considered
* to be a single-page document.
* Page
is returned by synchronous and asynchronous
* operations. Page values greater than 1 are only returned for multipage documents that are in PDF or TIFF
* format. A scanned image (JPEG/PNG) provided to an asynchronous operation, even if it contains multiple
* document pages, is considered a single-page document. This means that for scanned images the value of
* Page
is always 1. Synchronous operations will also return a Page
value of 1
* because every input document is considered to be a single-page document.
*/
public void setPage(Integer page) {
this.page = page;
}
/**
* Page
is returned by synchronous and asynchronous operations.
* Page values greater than 1 are only returned for multipage documents that are in PDF or TIFF format. A scanned
* image (JPEG/PNG) provided to an asynchronous operation, even if it contains multiple document pages, is
* considered a single-page document. This means that for scanned images the value of Page
is always 1.
* Synchronous operations will also return a Page
value of 1 because every input document is considered
* to be a single-page document.
* Page
is returned by synchronous and asynchronous
* operations. Page values greater than 1 are only returned for multipage documents that are in PDF or TIFF
* format. A scanned image (JPEG/PNG) provided to an asynchronous operation, even if it contains multiple
* document pages, is considered a single-page document. This means that for scanned images the value of
* Page
is always 1. Synchronous operations will also return a Page
value of 1
* because every input document is considered to be a single-page document.
*/
public Integer getPage() {
return this.page;
}
/**
* Page
is returned by synchronous and asynchronous operations.
* Page values greater than 1 are only returned for multipage documents that are in PDF or TIFF format. A scanned
* image (JPEG/PNG) provided to an asynchronous operation, even if it contains multiple document pages, is
* considered a single-page document. This means that for scanned images the value of Page
is always 1.
* Synchronous operations will also return a Page
value of 1 because every input document is considered
* to be a single-page document.
* Page
is returned by synchronous and asynchronous
* operations. Page values greater than 1 are only returned for multipage documents that are in PDF or TIFF
* format. A scanned image (JPEG/PNG) provided to an asynchronous operation, even if it contains multiple
* document pages, is considered a single-page document. This means that for scanned images the value of
* Page
is always 1. Synchronous operations will also return a Page
value of 1
* because every input document is considered to be a single-page document.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Block withPage(Integer page) {
setPage(page);
return this;
}
/**
*
*
* @param query
*/
public void setQuery(Query query) {
this.query = query;
}
/**
*
*
* @return
*/
public Query getQuery() {
return this.query;
}
/**
*
*
* @param query
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Block withQuery(Query query) {
setQuery(query);
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 (getBlockType() != null)
sb.append("BlockType: ").append(getBlockType()).append(",");
if (getConfidence() != null)
sb.append("Confidence: ").append(getConfidence()).append(",");
if (getText() != null)
sb.append("Text: ").append(getText()).append(",");
if (getTextType() != null)
sb.append("TextType: ").append(getTextType()).append(",");
if (getRowIndex() != null)
sb.append("RowIndex: ").append(getRowIndex()).append(",");
if (getColumnIndex() != null)
sb.append("ColumnIndex: ").append(getColumnIndex()).append(",");
if (getRowSpan() != null)
sb.append("RowSpan: ").append(getRowSpan()).append(",");
if (getColumnSpan() != null)
sb.append("ColumnSpan: ").append(getColumnSpan()).append(",");
if (getGeometry() != null)
sb.append("Geometry: ").append(getGeometry()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getRelationships() != null)
sb.append("Relationships: ").append(getRelationships()).append(",");
if (getEntityTypes() != null)
sb.append("EntityTypes: ").append(getEntityTypes()).append(",");
if (getSelectionStatus() != null)
sb.append("SelectionStatus: ").append(getSelectionStatus()).append(",");
if (getPage() != null)
sb.append("Page: ").append(getPage()).append(",");
if (getQuery() != null)
sb.append("Query: ").append(getQuery());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Block == false)
return false;
Block other = (Block) obj;
if (other.getBlockType() == null ^ this.getBlockType() == null)
return false;
if (other.getBlockType() != null && other.getBlockType().equals(this.getBlockType()) == false)
return false;
if (other.getConfidence() == null ^ this.getConfidence() == null)
return false;
if (other.getConfidence() != null && other.getConfidence().equals(this.getConfidence()) == false)
return false;
if (other.getText() == null ^ this.getText() == null)
return false;
if (other.getText() != null && other.getText().equals(this.getText()) == false)
return false;
if (other.getTextType() == null ^ this.getTextType() == null)
return false;
if (other.getTextType() != null && other.getTextType().equals(this.getTextType()) == false)
return false;
if (other.getRowIndex() == null ^ this.getRowIndex() == null)
return false;
if (other.getRowIndex() != null && other.getRowIndex().equals(this.getRowIndex()) == false)
return false;
if (other.getColumnIndex() == null ^ this.getColumnIndex() == null)
return false;
if (other.getColumnIndex() != null && other.getColumnIndex().equals(this.getColumnIndex()) == false)
return false;
if (other.getRowSpan() == null ^ this.getRowSpan() == null)
return false;
if (other.getRowSpan() != null && other.getRowSpan().equals(this.getRowSpan()) == false)
return false;
if (other.getColumnSpan() == null ^ this.getColumnSpan() == null)
return false;
if (other.getColumnSpan() != null && other.getColumnSpan().equals(this.getColumnSpan()) == false)
return false;
if (other.getGeometry() == null ^ this.getGeometry() == null)
return false;
if (other.getGeometry() != null && other.getGeometry().equals(this.getGeometry()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getRelationships() == null ^ this.getRelationships() == null)
return false;
if (other.getRelationships() != null && other.getRelationships().equals(this.getRelationships()) == false)
return false;
if (other.getEntityTypes() == null ^ this.getEntityTypes() == null)
return false;
if (other.getEntityTypes() != null && other.getEntityTypes().equals(this.getEntityTypes()) == false)
return false;
if (other.getSelectionStatus() == null ^ this.getSelectionStatus() == null)
return false;
if (other.getSelectionStatus() != null && other.getSelectionStatus().equals(this.getSelectionStatus()) == false)
return false;
if (other.getPage() == null ^ this.getPage() == null)
return false;
if (other.getPage() != null && other.getPage().equals(this.getPage()) == false)
return false;
if (other.getQuery() == null ^ this.getQuery() == null)
return false;
if (other.getQuery() != null && other.getQuery().equals(this.getQuery()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getBlockType() == null) ? 0 : getBlockType().hashCode());
hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode());
hashCode = prime * hashCode + ((getText() == null) ? 0 : getText().hashCode());
hashCode = prime * hashCode + ((getTextType() == null) ? 0 : getTextType().hashCode());
hashCode = prime * hashCode + ((getRowIndex() == null) ? 0 : getRowIndex().hashCode());
hashCode = prime * hashCode + ((getColumnIndex() == null) ? 0 : getColumnIndex().hashCode());
hashCode = prime * hashCode + ((getRowSpan() == null) ? 0 : getRowSpan().hashCode());
hashCode = prime * hashCode + ((getColumnSpan() == null) ? 0 : getColumnSpan().hashCode());
hashCode = prime * hashCode + ((getGeometry() == null) ? 0 : getGeometry().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getRelationships() == null) ? 0 : getRelationships().hashCode());
hashCode = prime * hashCode + ((getEntityTypes() == null) ? 0 : getEntityTypes().hashCode());
hashCode = prime * hashCode + ((getSelectionStatus() == null) ? 0 : getSelectionStatus().hashCode());
hashCode = prime * hashCode + ((getPage() == null) ? 0 : getPage().hashCode());
hashCode = prime * hashCode + ((getQuery() == null) ? 0 : getQuery().hashCode());
return hashCode;
}
@Override
public Block clone() {
try {
return (Block) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.textract.model.transform.BlockMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}