aws_sdk_textract/types/
_block.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A <code>Block</code> represents items that are recognized in a document within a group of pixels close to each other. The information returned in a <code>Block</code> object depends on the type of operation. In text detection for documents (for example <code>DetectDocumentText</code>), you get information about the detected words and lines of text. In text analysis (for example <code>AnalyzeDocument</code>), you can also get information about the fields, tables, and selection elements that are detected in the document.</p>
4/// <p>An array of <code>Block</code> objects is returned by both synchronous and asynchronous operations. In synchronous operations, such as <code>DetectDocumentText</code>, the array of <code>Block</code> objects is the entire set of results. In asynchronous operations, such as <code>GetDocumentAnalysis</code>, the array is returned over one or more responses.</p>
5/// <p>For more information, see <a href="https://docs.aws.amazon.com/textract/latest/dg/how-it-works.html">How Amazon Textract Works</a>.</p>
6#[non_exhaustive]
7#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
8pub struct Block {
9    /// <p>The type of text item that's recognized. In operations for text detection, the following types are returned:</p>
10    /// <ul>
11    /// <li>
12    /// <p><i>PAGE</i> - Contains a list of the LINE <code>Block</code> objects that are detected on a document page.</p></li>
13    /// <li>
14    /// <p><i>WORD</i> - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.</p></li>
15    /// <li>
16    /// <p><i>LINE</i> - A string of space-delimited, contiguous words that are detected on a document page.</p></li>
17    /// </ul>
18    /// <p>In text analysis operations, the following types are returned:</p>
19    /// <ul>
20    /// <li>
21    /// <p><i>PAGE</i> - Contains a list of child <code>Block</code> objects that are detected on a document page.</p></li>
22    /// <li>
23    /// <p><i>KEY_VALUE_SET</i> - Stores the KEY and VALUE <code>Block</code> objects for linked text that's detected on a document page. Use the <code>EntityType</code> field to determine if a KEY_VALUE_SET object is a KEY <code>Block</code> object or a VALUE <code>Block</code> object.</p></li>
24    /// <li>
25    /// <p><i>WORD</i> - 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.</p></li>
26    /// <li>
27    /// <p><i>LINE</i> - A string of tab-delimited, contiguous words that are detected on a document page.</p></li>
28    /// <li>
29    /// <p><i>TABLE</i> - 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.</p></li>
30    /// <li>
31    /// <p><i>TABLE_TITLE</i> - 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.</p></li>
32    /// <li>
33    /// <p><i>TABLE_FOOTER</i> - 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.</p></li>
34    /// <li>
35    /// <p><i>CELL</i> - A cell within a detected table. The cell is the parent of the block that contains the text in the cell.</p></li>
36    /// <li>
37    /// <p><i>MERGED_CELL</i> - A cell in a table whose content spans more than one row or column. The <code>Relationships</code> array for this cell contain data from individual cells.</p></li>
38    /// <li>
39    /// <p><i>SELECTION_ELEMENT</i> - 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 <code>SelectionStatus</code> to determine the status of the selection element.</p></li>
40    /// <li>
41    /// <p><i>SIGNATURE</i> - The location and confidence score of a signature detected on a document page. Can be returned as part of a Key-Value pair or a detected cell.</p></li>
42    /// <li>
43    /// <p><i>QUERY</i> - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it to its answer.</p></li>
44    /// <li>
45    /// <p><i>QUERY_RESULT</i> - 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.</p></li>
46    /// </ul>
47    /// <p>The following BlockTypes are only returned for Amazon Textract Layout.</p>
48    /// <ul>
49    /// <li>
50    /// <p><code>LAYOUT_TITLE</code> - The main title of the document.</p></li>
51    /// <li>
52    /// <p><code>LAYOUT_HEADER</code> - Text located in the top margin of the document.</p></li>
53    /// <li>
54    /// <p><code>LAYOUT_FOOTER</code> - Text located in the bottom margin of the document.</p></li>
55    /// <li>
56    /// <p><code>LAYOUT_SECTION_HEADER</code> - The titles of sections within a document.</p></li>
57    /// <li>
58    /// <p><code>LAYOUT_PAGE_NUMBER</code> - The page number of the documents.</p></li>
59    /// <li>
60    /// <p><code>LAYOUT_LIST</code> - Any information grouped together in list form.</p></li>
61    /// <li>
62    /// <p><code>LAYOUT_FIGURE</code> - Indicates the location of an image in a document.</p></li>
63    /// <li>
64    /// <p><code>LAYOUT_TABLE</code> - Indicates the location of a table in the document.</p></li>
65    /// <li>
66    /// <p><code>LAYOUT_KEY_VALUE</code> - Indicates the location of form key-values in a document.</p></li>
67    /// <li>
68    /// <p><code>LAYOUT_TEXT</code> - Text that is present typically as a part of paragraphs in documents.</p></li>
69    /// </ul>
70    pub block_type: ::std::option::Option<crate::types::BlockType>,
71    /// <p>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.</p>
72    pub confidence: ::std::option::Option<f32>,
73    /// <p>The word or line of text that's recognized by Amazon Textract.</p>
74    pub text: ::std::option::Option<::std::string::String>,
75    /// <p>The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text.</p>
76    pub text_type: ::std::option::Option<crate::types::TextType>,
77    /// <p>The row in which a table cell is located. The first row position is 1. <code>RowIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
78    pub row_index: ::std::option::Option<i32>,
79    /// <p>The column in which a table cell appears. The first column position is 1. <code>ColumnIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
80    pub column_index: ::std::option::Option<i32>,
81    /// <p>The number of rows that a table cell spans. <code>RowSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
82    pub row_span: ::std::option::Option<i32>,
83    /// <p>The number of columns that a table cell spans. <code>ColumnSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
84    pub column_span: ::std::option::Option<i32>,
85    /// <p>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.</p>
86    pub geometry: ::std::option::Option<crate::types::Geometry>,
87    /// <p>The identifier for the recognized text. The identifier is only unique for a single operation.</p>
88    pub id: ::std::option::Option<::std::string::String>,
89    /// <p>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.</p>
90    pub relationships: ::std::option::Option<::std::vec::Vec<crate::types::Relationship>>,
91    /// <p>The type of entity.</p>
92    /// <p>The following entity types can be returned by FORMS analysis:</p>
93    /// <ul>
94    /// <li>
95    /// <p><i>KEY</i> - An identifier for a field on the document.</p></li>
96    /// <li>
97    /// <p><i>VALUE</i> - The field text.</p></li>
98    /// </ul>
99    /// <p>The following entity types can be returned by TABLES analysis:</p>
100    /// <ul>
101    /// <li>
102    /// <p><i>COLUMN_HEADER</i> - Identifies a cell that is a header of a column.</p></li>
103    /// <li>
104    /// <p><i>TABLE_TITLE</i> - Identifies a cell that is a title within the table.</p></li>
105    /// <li>
106    /// <p><i>TABLE_SECTION_TITLE</i> - 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.</p></li>
107    /// <li>
108    /// <p><i>TABLE_FOOTER</i> - Identifies a cell that is a footer of a table.</p></li>
109    /// <li>
110    /// <p><i>TABLE_SUMMARY</i> - 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.</p></li>
111    /// <li>
112    /// <p><i>STRUCTURED_TABLE </i> - Identifies a table with column headers where the content of each row corresponds to the headers.</p></li>
113    /// <li>
114    /// <p><i>SEMI_STRUCTURED_TABLE</i> - Identifies a non-structured table.</p></li>
115    /// </ul>
116    /// <p><code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
117    pub entity_types: ::std::option::Option<::std::vec::Vec<crate::types::EntityType>>,
118    /// <p>The selection status of a selection element, such as an option button or check box.</p>
119    pub selection_status: ::std::option::Option<crate::types::SelectionStatus>,
120    /// <p>The page on which a block was detected. <code>Page</code> 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 <code>Page</code> is always 1.</p>
121    pub page: ::std::option::Option<i32>,
122    /// <p></p>
123    pub query: ::std::option::Option<crate::types::Query>,
124}
125impl Block {
126    /// <p>The type of text item that's recognized. In operations for text detection, the following types are returned:</p>
127    /// <ul>
128    /// <li>
129    /// <p><i>PAGE</i> - Contains a list of the LINE <code>Block</code> objects that are detected on a document page.</p></li>
130    /// <li>
131    /// <p><i>WORD</i> - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.</p></li>
132    /// <li>
133    /// <p><i>LINE</i> - A string of space-delimited, contiguous words that are detected on a document page.</p></li>
134    /// </ul>
135    /// <p>In text analysis operations, the following types are returned:</p>
136    /// <ul>
137    /// <li>
138    /// <p><i>PAGE</i> - Contains a list of child <code>Block</code> objects that are detected on a document page.</p></li>
139    /// <li>
140    /// <p><i>KEY_VALUE_SET</i> - Stores the KEY and VALUE <code>Block</code> objects for linked text that's detected on a document page. Use the <code>EntityType</code> field to determine if a KEY_VALUE_SET object is a KEY <code>Block</code> object or a VALUE <code>Block</code> object.</p></li>
141    /// <li>
142    /// <p><i>WORD</i> - 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.</p></li>
143    /// <li>
144    /// <p><i>LINE</i> - A string of tab-delimited, contiguous words that are detected on a document page.</p></li>
145    /// <li>
146    /// <p><i>TABLE</i> - 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.</p></li>
147    /// <li>
148    /// <p><i>TABLE_TITLE</i> - 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.</p></li>
149    /// <li>
150    /// <p><i>TABLE_FOOTER</i> - 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.</p></li>
151    /// <li>
152    /// <p><i>CELL</i> - A cell within a detected table. The cell is the parent of the block that contains the text in the cell.</p></li>
153    /// <li>
154    /// <p><i>MERGED_CELL</i> - A cell in a table whose content spans more than one row or column. The <code>Relationships</code> array for this cell contain data from individual cells.</p></li>
155    /// <li>
156    /// <p><i>SELECTION_ELEMENT</i> - 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 <code>SelectionStatus</code> to determine the status of the selection element.</p></li>
157    /// <li>
158    /// <p><i>SIGNATURE</i> - The location and confidence score of a signature detected on a document page. Can be returned as part of a Key-Value pair or a detected cell.</p></li>
159    /// <li>
160    /// <p><i>QUERY</i> - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it to its answer.</p></li>
161    /// <li>
162    /// <p><i>QUERY_RESULT</i> - 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.</p></li>
163    /// </ul>
164    /// <p>The following BlockTypes are only returned for Amazon Textract Layout.</p>
165    /// <ul>
166    /// <li>
167    /// <p><code>LAYOUT_TITLE</code> - The main title of the document.</p></li>
168    /// <li>
169    /// <p><code>LAYOUT_HEADER</code> - Text located in the top margin of the document.</p></li>
170    /// <li>
171    /// <p><code>LAYOUT_FOOTER</code> - Text located in the bottom margin of the document.</p></li>
172    /// <li>
173    /// <p><code>LAYOUT_SECTION_HEADER</code> - The titles of sections within a document.</p></li>
174    /// <li>
175    /// <p><code>LAYOUT_PAGE_NUMBER</code> - The page number of the documents.</p></li>
176    /// <li>
177    /// <p><code>LAYOUT_LIST</code> - Any information grouped together in list form.</p></li>
178    /// <li>
179    /// <p><code>LAYOUT_FIGURE</code> - Indicates the location of an image in a document.</p></li>
180    /// <li>
181    /// <p><code>LAYOUT_TABLE</code> - Indicates the location of a table in the document.</p></li>
182    /// <li>
183    /// <p><code>LAYOUT_KEY_VALUE</code> - Indicates the location of form key-values in a document.</p></li>
184    /// <li>
185    /// <p><code>LAYOUT_TEXT</code> - Text that is present typically as a part of paragraphs in documents.</p></li>
186    /// </ul>
187    pub fn block_type(&self) -> ::std::option::Option<&crate::types::BlockType> {
188        self.block_type.as_ref()
189    }
190    /// <p>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.</p>
191    pub fn confidence(&self) -> ::std::option::Option<f32> {
192        self.confidence
193    }
194    /// <p>The word or line of text that's recognized by Amazon Textract.</p>
195    pub fn text(&self) -> ::std::option::Option<&str> {
196        self.text.as_deref()
197    }
198    /// <p>The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text.</p>
199    pub fn text_type(&self) -> ::std::option::Option<&crate::types::TextType> {
200        self.text_type.as_ref()
201    }
202    /// <p>The row in which a table cell is located. The first row position is 1. <code>RowIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
203    pub fn row_index(&self) -> ::std::option::Option<i32> {
204        self.row_index
205    }
206    /// <p>The column in which a table cell appears. The first column position is 1. <code>ColumnIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
207    pub fn column_index(&self) -> ::std::option::Option<i32> {
208        self.column_index
209    }
210    /// <p>The number of rows that a table cell spans. <code>RowSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
211    pub fn row_span(&self) -> ::std::option::Option<i32> {
212        self.row_span
213    }
214    /// <p>The number of columns that a table cell spans. <code>ColumnSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
215    pub fn column_span(&self) -> ::std::option::Option<i32> {
216        self.column_span
217    }
218    /// <p>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.</p>
219    pub fn geometry(&self) -> ::std::option::Option<&crate::types::Geometry> {
220        self.geometry.as_ref()
221    }
222    /// <p>The identifier for the recognized text. The identifier is only unique for a single operation.</p>
223    pub fn id(&self) -> ::std::option::Option<&str> {
224        self.id.as_deref()
225    }
226    /// <p>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.</p>
227    ///
228    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.relationships.is_none()`.
229    pub fn relationships(&self) -> &[crate::types::Relationship] {
230        self.relationships.as_deref().unwrap_or_default()
231    }
232    /// <p>The type of entity.</p>
233    /// <p>The following entity types can be returned by FORMS analysis:</p>
234    /// <ul>
235    /// <li>
236    /// <p><i>KEY</i> - An identifier for a field on the document.</p></li>
237    /// <li>
238    /// <p><i>VALUE</i> - The field text.</p></li>
239    /// </ul>
240    /// <p>The following entity types can be returned by TABLES analysis:</p>
241    /// <ul>
242    /// <li>
243    /// <p><i>COLUMN_HEADER</i> - Identifies a cell that is a header of a column.</p></li>
244    /// <li>
245    /// <p><i>TABLE_TITLE</i> - Identifies a cell that is a title within the table.</p></li>
246    /// <li>
247    /// <p><i>TABLE_SECTION_TITLE</i> - 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.</p></li>
248    /// <li>
249    /// <p><i>TABLE_FOOTER</i> - Identifies a cell that is a footer of a table.</p></li>
250    /// <li>
251    /// <p><i>TABLE_SUMMARY</i> - 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.</p></li>
252    /// <li>
253    /// <p><i>STRUCTURED_TABLE </i> - Identifies a table with column headers where the content of each row corresponds to the headers.</p></li>
254    /// <li>
255    /// <p><i>SEMI_STRUCTURED_TABLE</i> - Identifies a non-structured table.</p></li>
256    /// </ul>
257    /// <p><code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
258    ///
259    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.entity_types.is_none()`.
260    pub fn entity_types(&self) -> &[crate::types::EntityType] {
261        self.entity_types.as_deref().unwrap_or_default()
262    }
263    /// <p>The selection status of a selection element, such as an option button or check box.</p>
264    pub fn selection_status(&self) -> ::std::option::Option<&crate::types::SelectionStatus> {
265        self.selection_status.as_ref()
266    }
267    /// <p>The page on which a block was detected. <code>Page</code> 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 <code>Page</code> is always 1.</p>
268    pub fn page(&self) -> ::std::option::Option<i32> {
269        self.page
270    }
271    /// <p></p>
272    pub fn query(&self) -> ::std::option::Option<&crate::types::Query> {
273        self.query.as_ref()
274    }
275}
276impl Block {
277    /// Creates a new builder-style object to manufacture [`Block`](crate::types::Block).
278    pub fn builder() -> crate::types::builders::BlockBuilder {
279        crate::types::builders::BlockBuilder::default()
280    }
281}
282
283/// A builder for [`Block`](crate::types::Block).
284#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
285#[non_exhaustive]
286pub struct BlockBuilder {
287    pub(crate) block_type: ::std::option::Option<crate::types::BlockType>,
288    pub(crate) confidence: ::std::option::Option<f32>,
289    pub(crate) text: ::std::option::Option<::std::string::String>,
290    pub(crate) text_type: ::std::option::Option<crate::types::TextType>,
291    pub(crate) row_index: ::std::option::Option<i32>,
292    pub(crate) column_index: ::std::option::Option<i32>,
293    pub(crate) row_span: ::std::option::Option<i32>,
294    pub(crate) column_span: ::std::option::Option<i32>,
295    pub(crate) geometry: ::std::option::Option<crate::types::Geometry>,
296    pub(crate) id: ::std::option::Option<::std::string::String>,
297    pub(crate) relationships: ::std::option::Option<::std::vec::Vec<crate::types::Relationship>>,
298    pub(crate) entity_types: ::std::option::Option<::std::vec::Vec<crate::types::EntityType>>,
299    pub(crate) selection_status: ::std::option::Option<crate::types::SelectionStatus>,
300    pub(crate) page: ::std::option::Option<i32>,
301    pub(crate) query: ::std::option::Option<crate::types::Query>,
302}
303impl BlockBuilder {
304    /// <p>The type of text item that's recognized. In operations for text detection, the following types are returned:</p>
305    /// <ul>
306    /// <li>
307    /// <p><i>PAGE</i> - Contains a list of the LINE <code>Block</code> objects that are detected on a document page.</p></li>
308    /// <li>
309    /// <p><i>WORD</i> - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.</p></li>
310    /// <li>
311    /// <p><i>LINE</i> - A string of space-delimited, contiguous words that are detected on a document page.</p></li>
312    /// </ul>
313    /// <p>In text analysis operations, the following types are returned:</p>
314    /// <ul>
315    /// <li>
316    /// <p><i>PAGE</i> - Contains a list of child <code>Block</code> objects that are detected on a document page.</p></li>
317    /// <li>
318    /// <p><i>KEY_VALUE_SET</i> - Stores the KEY and VALUE <code>Block</code> objects for linked text that's detected on a document page. Use the <code>EntityType</code> field to determine if a KEY_VALUE_SET object is a KEY <code>Block</code> object or a VALUE <code>Block</code> object.</p></li>
319    /// <li>
320    /// <p><i>WORD</i> - 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.</p></li>
321    /// <li>
322    /// <p><i>LINE</i> - A string of tab-delimited, contiguous words that are detected on a document page.</p></li>
323    /// <li>
324    /// <p><i>TABLE</i> - 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.</p></li>
325    /// <li>
326    /// <p><i>TABLE_TITLE</i> - 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.</p></li>
327    /// <li>
328    /// <p><i>TABLE_FOOTER</i> - 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.</p></li>
329    /// <li>
330    /// <p><i>CELL</i> - A cell within a detected table. The cell is the parent of the block that contains the text in the cell.</p></li>
331    /// <li>
332    /// <p><i>MERGED_CELL</i> - A cell in a table whose content spans more than one row or column. The <code>Relationships</code> array for this cell contain data from individual cells.</p></li>
333    /// <li>
334    /// <p><i>SELECTION_ELEMENT</i> - 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 <code>SelectionStatus</code> to determine the status of the selection element.</p></li>
335    /// <li>
336    /// <p><i>SIGNATURE</i> - The location and confidence score of a signature detected on a document page. Can be returned as part of a Key-Value pair or a detected cell.</p></li>
337    /// <li>
338    /// <p><i>QUERY</i> - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it to its answer.</p></li>
339    /// <li>
340    /// <p><i>QUERY_RESULT</i> - 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.</p></li>
341    /// </ul>
342    /// <p>The following BlockTypes are only returned for Amazon Textract Layout.</p>
343    /// <ul>
344    /// <li>
345    /// <p><code>LAYOUT_TITLE</code> - The main title of the document.</p></li>
346    /// <li>
347    /// <p><code>LAYOUT_HEADER</code> - Text located in the top margin of the document.</p></li>
348    /// <li>
349    /// <p><code>LAYOUT_FOOTER</code> - Text located in the bottom margin of the document.</p></li>
350    /// <li>
351    /// <p><code>LAYOUT_SECTION_HEADER</code> - The titles of sections within a document.</p></li>
352    /// <li>
353    /// <p><code>LAYOUT_PAGE_NUMBER</code> - The page number of the documents.</p></li>
354    /// <li>
355    /// <p><code>LAYOUT_LIST</code> - Any information grouped together in list form.</p></li>
356    /// <li>
357    /// <p><code>LAYOUT_FIGURE</code> - Indicates the location of an image in a document.</p></li>
358    /// <li>
359    /// <p><code>LAYOUT_TABLE</code> - Indicates the location of a table in the document.</p></li>
360    /// <li>
361    /// <p><code>LAYOUT_KEY_VALUE</code> - Indicates the location of form key-values in a document.</p></li>
362    /// <li>
363    /// <p><code>LAYOUT_TEXT</code> - Text that is present typically as a part of paragraphs in documents.</p></li>
364    /// </ul>
365    pub fn block_type(mut self, input: crate::types::BlockType) -> Self {
366        self.block_type = ::std::option::Option::Some(input);
367        self
368    }
369    /// <p>The type of text item that's recognized. In operations for text detection, the following types are returned:</p>
370    /// <ul>
371    /// <li>
372    /// <p><i>PAGE</i> - Contains a list of the LINE <code>Block</code> objects that are detected on a document page.</p></li>
373    /// <li>
374    /// <p><i>WORD</i> - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.</p></li>
375    /// <li>
376    /// <p><i>LINE</i> - A string of space-delimited, contiguous words that are detected on a document page.</p></li>
377    /// </ul>
378    /// <p>In text analysis operations, the following types are returned:</p>
379    /// <ul>
380    /// <li>
381    /// <p><i>PAGE</i> - Contains a list of child <code>Block</code> objects that are detected on a document page.</p></li>
382    /// <li>
383    /// <p><i>KEY_VALUE_SET</i> - Stores the KEY and VALUE <code>Block</code> objects for linked text that's detected on a document page. Use the <code>EntityType</code> field to determine if a KEY_VALUE_SET object is a KEY <code>Block</code> object or a VALUE <code>Block</code> object.</p></li>
384    /// <li>
385    /// <p><i>WORD</i> - 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.</p></li>
386    /// <li>
387    /// <p><i>LINE</i> - A string of tab-delimited, contiguous words that are detected on a document page.</p></li>
388    /// <li>
389    /// <p><i>TABLE</i> - 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.</p></li>
390    /// <li>
391    /// <p><i>TABLE_TITLE</i> - 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.</p></li>
392    /// <li>
393    /// <p><i>TABLE_FOOTER</i> - 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.</p></li>
394    /// <li>
395    /// <p><i>CELL</i> - A cell within a detected table. The cell is the parent of the block that contains the text in the cell.</p></li>
396    /// <li>
397    /// <p><i>MERGED_CELL</i> - A cell in a table whose content spans more than one row or column. The <code>Relationships</code> array for this cell contain data from individual cells.</p></li>
398    /// <li>
399    /// <p><i>SELECTION_ELEMENT</i> - 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 <code>SelectionStatus</code> to determine the status of the selection element.</p></li>
400    /// <li>
401    /// <p><i>SIGNATURE</i> - The location and confidence score of a signature detected on a document page. Can be returned as part of a Key-Value pair or a detected cell.</p></li>
402    /// <li>
403    /// <p><i>QUERY</i> - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it to its answer.</p></li>
404    /// <li>
405    /// <p><i>QUERY_RESULT</i> - 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.</p></li>
406    /// </ul>
407    /// <p>The following BlockTypes are only returned for Amazon Textract Layout.</p>
408    /// <ul>
409    /// <li>
410    /// <p><code>LAYOUT_TITLE</code> - The main title of the document.</p></li>
411    /// <li>
412    /// <p><code>LAYOUT_HEADER</code> - Text located in the top margin of the document.</p></li>
413    /// <li>
414    /// <p><code>LAYOUT_FOOTER</code> - Text located in the bottom margin of the document.</p></li>
415    /// <li>
416    /// <p><code>LAYOUT_SECTION_HEADER</code> - The titles of sections within a document.</p></li>
417    /// <li>
418    /// <p><code>LAYOUT_PAGE_NUMBER</code> - The page number of the documents.</p></li>
419    /// <li>
420    /// <p><code>LAYOUT_LIST</code> - Any information grouped together in list form.</p></li>
421    /// <li>
422    /// <p><code>LAYOUT_FIGURE</code> - Indicates the location of an image in a document.</p></li>
423    /// <li>
424    /// <p><code>LAYOUT_TABLE</code> - Indicates the location of a table in the document.</p></li>
425    /// <li>
426    /// <p><code>LAYOUT_KEY_VALUE</code> - Indicates the location of form key-values in a document.</p></li>
427    /// <li>
428    /// <p><code>LAYOUT_TEXT</code> - Text that is present typically as a part of paragraphs in documents.</p></li>
429    /// </ul>
430    pub fn set_block_type(mut self, input: ::std::option::Option<crate::types::BlockType>) -> Self {
431        self.block_type = input;
432        self
433    }
434    /// <p>The type of text item that's recognized. In operations for text detection, the following types are returned:</p>
435    /// <ul>
436    /// <li>
437    /// <p><i>PAGE</i> - Contains a list of the LINE <code>Block</code> objects that are detected on a document page.</p></li>
438    /// <li>
439    /// <p><i>WORD</i> - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.</p></li>
440    /// <li>
441    /// <p><i>LINE</i> - A string of space-delimited, contiguous words that are detected on a document page.</p></li>
442    /// </ul>
443    /// <p>In text analysis operations, the following types are returned:</p>
444    /// <ul>
445    /// <li>
446    /// <p><i>PAGE</i> - Contains a list of child <code>Block</code> objects that are detected on a document page.</p></li>
447    /// <li>
448    /// <p><i>KEY_VALUE_SET</i> - Stores the KEY and VALUE <code>Block</code> objects for linked text that's detected on a document page. Use the <code>EntityType</code> field to determine if a KEY_VALUE_SET object is a KEY <code>Block</code> object or a VALUE <code>Block</code> object.</p></li>
449    /// <li>
450    /// <p><i>WORD</i> - 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.</p></li>
451    /// <li>
452    /// <p><i>LINE</i> - A string of tab-delimited, contiguous words that are detected on a document page.</p></li>
453    /// <li>
454    /// <p><i>TABLE</i> - 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.</p></li>
455    /// <li>
456    /// <p><i>TABLE_TITLE</i> - 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.</p></li>
457    /// <li>
458    /// <p><i>TABLE_FOOTER</i> - 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.</p></li>
459    /// <li>
460    /// <p><i>CELL</i> - A cell within a detected table. The cell is the parent of the block that contains the text in the cell.</p></li>
461    /// <li>
462    /// <p><i>MERGED_CELL</i> - A cell in a table whose content spans more than one row or column. The <code>Relationships</code> array for this cell contain data from individual cells.</p></li>
463    /// <li>
464    /// <p><i>SELECTION_ELEMENT</i> - 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 <code>SelectionStatus</code> to determine the status of the selection element.</p></li>
465    /// <li>
466    /// <p><i>SIGNATURE</i> - The location and confidence score of a signature detected on a document page. Can be returned as part of a Key-Value pair or a detected cell.</p></li>
467    /// <li>
468    /// <p><i>QUERY</i> - A question asked during the call of AnalyzeDocument. Contains an alias and an ID that attaches it to its answer.</p></li>
469    /// <li>
470    /// <p><i>QUERY_RESULT</i> - 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.</p></li>
471    /// </ul>
472    /// <p>The following BlockTypes are only returned for Amazon Textract Layout.</p>
473    /// <ul>
474    /// <li>
475    /// <p><code>LAYOUT_TITLE</code> - The main title of the document.</p></li>
476    /// <li>
477    /// <p><code>LAYOUT_HEADER</code> - Text located in the top margin of the document.</p></li>
478    /// <li>
479    /// <p><code>LAYOUT_FOOTER</code> - Text located in the bottom margin of the document.</p></li>
480    /// <li>
481    /// <p><code>LAYOUT_SECTION_HEADER</code> - The titles of sections within a document.</p></li>
482    /// <li>
483    /// <p><code>LAYOUT_PAGE_NUMBER</code> - The page number of the documents.</p></li>
484    /// <li>
485    /// <p><code>LAYOUT_LIST</code> - Any information grouped together in list form.</p></li>
486    /// <li>
487    /// <p><code>LAYOUT_FIGURE</code> - Indicates the location of an image in a document.</p></li>
488    /// <li>
489    /// <p><code>LAYOUT_TABLE</code> - Indicates the location of a table in the document.</p></li>
490    /// <li>
491    /// <p><code>LAYOUT_KEY_VALUE</code> - Indicates the location of form key-values in a document.</p></li>
492    /// <li>
493    /// <p><code>LAYOUT_TEXT</code> - Text that is present typically as a part of paragraphs in documents.</p></li>
494    /// </ul>
495    pub fn get_block_type(&self) -> &::std::option::Option<crate::types::BlockType> {
496        &self.block_type
497    }
498    /// <p>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.</p>
499    pub fn confidence(mut self, input: f32) -> Self {
500        self.confidence = ::std::option::Option::Some(input);
501        self
502    }
503    /// <p>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.</p>
504    pub fn set_confidence(mut self, input: ::std::option::Option<f32>) -> Self {
505        self.confidence = input;
506        self
507    }
508    /// <p>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.</p>
509    pub fn get_confidence(&self) -> &::std::option::Option<f32> {
510        &self.confidence
511    }
512    /// <p>The word or line of text that's recognized by Amazon Textract.</p>
513    pub fn text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
514        self.text = ::std::option::Option::Some(input.into());
515        self
516    }
517    /// <p>The word or line of text that's recognized by Amazon Textract.</p>
518    pub fn set_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
519        self.text = input;
520        self
521    }
522    /// <p>The word or line of text that's recognized by Amazon Textract.</p>
523    pub fn get_text(&self) -> &::std::option::Option<::std::string::String> {
524        &self.text
525    }
526    /// <p>The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text.</p>
527    pub fn text_type(mut self, input: crate::types::TextType) -> Self {
528        self.text_type = ::std::option::Option::Some(input);
529        self
530    }
531    /// <p>The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text.</p>
532    pub fn set_text_type(mut self, input: ::std::option::Option<crate::types::TextType>) -> Self {
533        self.text_type = input;
534        self
535    }
536    /// <p>The kind of text that Amazon Textract has detected. Can check for handwritten text and printed text.</p>
537    pub fn get_text_type(&self) -> &::std::option::Option<crate::types::TextType> {
538        &self.text_type
539    }
540    /// <p>The row in which a table cell is located. The first row position is 1. <code>RowIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
541    pub fn row_index(mut self, input: i32) -> Self {
542        self.row_index = ::std::option::Option::Some(input);
543        self
544    }
545    /// <p>The row in which a table cell is located. The first row position is 1. <code>RowIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
546    pub fn set_row_index(mut self, input: ::std::option::Option<i32>) -> Self {
547        self.row_index = input;
548        self
549    }
550    /// <p>The row in which a table cell is located. The first row position is 1. <code>RowIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
551    pub fn get_row_index(&self) -> &::std::option::Option<i32> {
552        &self.row_index
553    }
554    /// <p>The column in which a table cell appears. The first column position is 1. <code>ColumnIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
555    pub fn column_index(mut self, input: i32) -> Self {
556        self.column_index = ::std::option::Option::Some(input);
557        self
558    }
559    /// <p>The column in which a table cell appears. The first column position is 1. <code>ColumnIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
560    pub fn set_column_index(mut self, input: ::std::option::Option<i32>) -> Self {
561        self.column_index = input;
562        self
563    }
564    /// <p>The column in which a table cell appears. The first column position is 1. <code>ColumnIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
565    pub fn get_column_index(&self) -> &::std::option::Option<i32> {
566        &self.column_index
567    }
568    /// <p>The number of rows that a table cell spans. <code>RowSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
569    pub fn row_span(mut self, input: i32) -> Self {
570        self.row_span = ::std::option::Option::Some(input);
571        self
572    }
573    /// <p>The number of rows that a table cell spans. <code>RowSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
574    pub fn set_row_span(mut self, input: ::std::option::Option<i32>) -> Self {
575        self.row_span = input;
576        self
577    }
578    /// <p>The number of rows that a table cell spans. <code>RowSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
579    pub fn get_row_span(&self) -> &::std::option::Option<i32> {
580        &self.row_span
581    }
582    /// <p>The number of columns that a table cell spans. <code>ColumnSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
583    pub fn column_span(mut self, input: i32) -> Self {
584        self.column_span = ::std::option::Option::Some(input);
585        self
586    }
587    /// <p>The number of columns that a table cell spans. <code>ColumnSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
588    pub fn set_column_span(mut self, input: ::std::option::Option<i32>) -> Self {
589        self.column_span = input;
590        self
591    }
592    /// <p>The number of columns that a table cell spans. <code>ColumnSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
593    pub fn get_column_span(&self) -> &::std::option::Option<i32> {
594        &self.column_span
595    }
596    /// <p>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.</p>
597    pub fn geometry(mut self, input: crate::types::Geometry) -> Self {
598        self.geometry = ::std::option::Option::Some(input);
599        self
600    }
601    /// <p>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.</p>
602    pub fn set_geometry(mut self, input: ::std::option::Option<crate::types::Geometry>) -> Self {
603        self.geometry = input;
604        self
605    }
606    /// <p>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.</p>
607    pub fn get_geometry(&self) -> &::std::option::Option<crate::types::Geometry> {
608        &self.geometry
609    }
610    /// <p>The identifier for the recognized text. The identifier is only unique for a single operation.</p>
611    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
612        self.id = ::std::option::Option::Some(input.into());
613        self
614    }
615    /// <p>The identifier for the recognized text. The identifier is only unique for a single operation.</p>
616    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
617        self.id = input;
618        self
619    }
620    /// <p>The identifier for the recognized text. The identifier is only unique for a single operation.</p>
621    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
622        &self.id
623    }
624    /// Appends an item to `relationships`.
625    ///
626    /// To override the contents of this collection use [`set_relationships`](Self::set_relationships).
627    ///
628    /// <p>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.</p>
629    pub fn relationships(mut self, input: crate::types::Relationship) -> Self {
630        let mut v = self.relationships.unwrap_or_default();
631        v.push(input);
632        self.relationships = ::std::option::Option::Some(v);
633        self
634    }
635    /// <p>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.</p>
636    pub fn set_relationships(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Relationship>>) -> Self {
637        self.relationships = input;
638        self
639    }
640    /// <p>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.</p>
641    pub fn get_relationships(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Relationship>> {
642        &self.relationships
643    }
644    /// Appends an item to `entity_types`.
645    ///
646    /// To override the contents of this collection use [`set_entity_types`](Self::set_entity_types).
647    ///
648    /// <p>The type of entity.</p>
649    /// <p>The following entity types can be returned by FORMS analysis:</p>
650    /// <ul>
651    /// <li>
652    /// <p><i>KEY</i> - An identifier for a field on the document.</p></li>
653    /// <li>
654    /// <p><i>VALUE</i> - The field text.</p></li>
655    /// </ul>
656    /// <p>The following entity types can be returned by TABLES analysis:</p>
657    /// <ul>
658    /// <li>
659    /// <p><i>COLUMN_HEADER</i> - Identifies a cell that is a header of a column.</p></li>
660    /// <li>
661    /// <p><i>TABLE_TITLE</i> - Identifies a cell that is a title within the table.</p></li>
662    /// <li>
663    /// <p><i>TABLE_SECTION_TITLE</i> - 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.</p></li>
664    /// <li>
665    /// <p><i>TABLE_FOOTER</i> - Identifies a cell that is a footer of a table.</p></li>
666    /// <li>
667    /// <p><i>TABLE_SUMMARY</i> - 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.</p></li>
668    /// <li>
669    /// <p><i>STRUCTURED_TABLE </i> - Identifies a table with column headers where the content of each row corresponds to the headers.</p></li>
670    /// <li>
671    /// <p><i>SEMI_STRUCTURED_TABLE</i> - Identifies a non-structured table.</p></li>
672    /// </ul>
673    /// <p><code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
674    pub fn entity_types(mut self, input: crate::types::EntityType) -> Self {
675        let mut v = self.entity_types.unwrap_or_default();
676        v.push(input);
677        self.entity_types = ::std::option::Option::Some(v);
678        self
679    }
680    /// <p>The type of entity.</p>
681    /// <p>The following entity types can be returned by FORMS analysis:</p>
682    /// <ul>
683    /// <li>
684    /// <p><i>KEY</i> - An identifier for a field on the document.</p></li>
685    /// <li>
686    /// <p><i>VALUE</i> - The field text.</p></li>
687    /// </ul>
688    /// <p>The following entity types can be returned by TABLES analysis:</p>
689    /// <ul>
690    /// <li>
691    /// <p><i>COLUMN_HEADER</i> - Identifies a cell that is a header of a column.</p></li>
692    /// <li>
693    /// <p><i>TABLE_TITLE</i> - Identifies a cell that is a title within the table.</p></li>
694    /// <li>
695    /// <p><i>TABLE_SECTION_TITLE</i> - 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.</p></li>
696    /// <li>
697    /// <p><i>TABLE_FOOTER</i> - Identifies a cell that is a footer of a table.</p></li>
698    /// <li>
699    /// <p><i>TABLE_SUMMARY</i> - 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.</p></li>
700    /// <li>
701    /// <p><i>STRUCTURED_TABLE </i> - Identifies a table with column headers where the content of each row corresponds to the headers.</p></li>
702    /// <li>
703    /// <p><i>SEMI_STRUCTURED_TABLE</i> - Identifies a non-structured table.</p></li>
704    /// </ul>
705    /// <p><code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
706    pub fn set_entity_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EntityType>>) -> Self {
707        self.entity_types = input;
708        self
709    }
710    /// <p>The type of entity.</p>
711    /// <p>The following entity types can be returned by FORMS analysis:</p>
712    /// <ul>
713    /// <li>
714    /// <p><i>KEY</i> - An identifier for a field on the document.</p></li>
715    /// <li>
716    /// <p><i>VALUE</i> - The field text.</p></li>
717    /// </ul>
718    /// <p>The following entity types can be returned by TABLES analysis:</p>
719    /// <ul>
720    /// <li>
721    /// <p><i>COLUMN_HEADER</i> - Identifies a cell that is a header of a column.</p></li>
722    /// <li>
723    /// <p><i>TABLE_TITLE</i> - Identifies a cell that is a title within the table.</p></li>
724    /// <li>
725    /// <p><i>TABLE_SECTION_TITLE</i> - 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.</p></li>
726    /// <li>
727    /// <p><i>TABLE_FOOTER</i> - Identifies a cell that is a footer of a table.</p></li>
728    /// <li>
729    /// <p><i>TABLE_SUMMARY</i> - 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.</p></li>
730    /// <li>
731    /// <p><i>STRUCTURED_TABLE </i> - Identifies a table with column headers where the content of each row corresponds to the headers.</p></li>
732    /// <li>
733    /// <p><i>SEMI_STRUCTURED_TABLE</i> - Identifies a non-structured table.</p></li>
734    /// </ul>
735    /// <p><code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
736    pub fn get_entity_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EntityType>> {
737        &self.entity_types
738    }
739    /// <p>The selection status of a selection element, such as an option button or check box.</p>
740    pub fn selection_status(mut self, input: crate::types::SelectionStatus) -> Self {
741        self.selection_status = ::std::option::Option::Some(input);
742        self
743    }
744    /// <p>The selection status of a selection element, such as an option button or check box.</p>
745    pub fn set_selection_status(mut self, input: ::std::option::Option<crate::types::SelectionStatus>) -> Self {
746        self.selection_status = input;
747        self
748    }
749    /// <p>The selection status of a selection element, such as an option button or check box.</p>
750    pub fn get_selection_status(&self) -> &::std::option::Option<crate::types::SelectionStatus> {
751        &self.selection_status
752    }
753    /// <p>The page on which a block was detected. <code>Page</code> 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 <code>Page</code> is always 1.</p>
754    pub fn page(mut self, input: i32) -> Self {
755        self.page = ::std::option::Option::Some(input);
756        self
757    }
758    /// <p>The page on which a block was detected. <code>Page</code> 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 <code>Page</code> is always 1.</p>
759    pub fn set_page(mut self, input: ::std::option::Option<i32>) -> Self {
760        self.page = input;
761        self
762    }
763    /// <p>The page on which a block was detected. <code>Page</code> 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 <code>Page</code> is always 1.</p>
764    pub fn get_page(&self) -> &::std::option::Option<i32> {
765        &self.page
766    }
767    /// <p></p>
768    pub fn query(mut self, input: crate::types::Query) -> Self {
769        self.query = ::std::option::Option::Some(input);
770        self
771    }
772    /// <p></p>
773    pub fn set_query(mut self, input: ::std::option::Option<crate::types::Query>) -> Self {
774        self.query = input;
775        self
776    }
777    /// <p></p>
778    pub fn get_query(&self) -> &::std::option::Option<crate::types::Query> {
779        &self.query
780    }
781    /// Consumes the builder and constructs a [`Block`](crate::types::Block).
782    pub fn build(self) -> crate::types::Block {
783        crate::types::Block {
784            block_type: self.block_type,
785            confidence: self.confidence,
786            text: self.text,
787            text_type: self.text_type,
788            row_index: self.row_index,
789            column_index: self.column_index,
790            row_span: self.row_span,
791            column_span: self.column_span,
792            geometry: self.geometry,
793            id: self.id,
794            relationships: self.relationships,
795            entity_types: self.entity_types,
796            selection_status: self.selection_status,
797            page: self.page,
798            query: self.query,
799        }
800    }
801}