| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | // <auto-generated/> |
| | | 5 | | |
| | | 6 | | #nullable disable |
| | | 7 | | |
| | | 8 | | using System; |
| | | 9 | | using System.Collections.Generic; |
| | | 10 | | using System.Linq; |
| | | 11 | | using Azure.Core; |
| | | 12 | | |
| | | 13 | | namespace Azure.AI.FormRecognizer.Models |
| | | 14 | | { |
| | | 15 | | /// <summary> Information about the extracted cell in a table. </summary> |
| | | 16 | | internal partial class DataTableCell |
| | | 17 | | { |
| | | 18 | | /// <summary> Initializes a new instance of DataTableCell. </summary> |
| | | 19 | | /// <param name="rowIndex"> Row index of the cell. </param> |
| | | 20 | | /// <param name="columnIndex"> Column index of the cell. </param> |
| | | 21 | | /// <param name="text"> Text content of the cell. </param> |
| | | 22 | | /// <param name="boundingBox"> Bounding box of the cell. </param> |
| | | 23 | | /// <param name="confidence"> Confidence value. </param> |
| | | 24 | | /// <exception cref="ArgumentNullException"> <paramref name="text"/> or <paramref name="boundingBox"/> is null. |
| | 0 | 25 | | internal DataTableCell(int rowIndex, int columnIndex, string text, IEnumerable<float> boundingBox, float confide |
| | | 26 | | { |
| | 0 | 27 | | if (text == null) |
| | | 28 | | { |
| | 0 | 29 | | throw new ArgumentNullException(nameof(text)); |
| | | 30 | | } |
| | 0 | 31 | | if (boundingBox == null) |
| | | 32 | | { |
| | 0 | 33 | | throw new ArgumentNullException(nameof(boundingBox)); |
| | | 34 | | } |
| | | 35 | | |
| | 0 | 36 | | RowIndex = rowIndex; |
| | 0 | 37 | | ColumnIndex = columnIndex; |
| | 0 | 38 | | Text = text; |
| | 0 | 39 | | BoundingBox = boundingBox.ToList(); |
| | 0 | 40 | | Confidence = confidence; |
| | 0 | 41 | | Elements = new ChangeTrackingList<string>(); |
| | 0 | 42 | | } |
| | | 43 | | |
| | | 44 | | /// <summary> Initializes a new instance of DataTableCell. </summary> |
| | | 45 | | /// <param name="rowIndex"> Row index of the cell. </param> |
| | | 46 | | /// <param name="columnIndex"> Column index of the cell. </param> |
| | | 47 | | /// <param name="rowSpan"> Number of rows spanned by this cell. </param> |
| | | 48 | | /// <param name="columnSpan"> Number of columns spanned by this cell. </param> |
| | | 49 | | /// <param name="text"> Text content of the cell. </param> |
| | | 50 | | /// <param name="boundingBox"> Bounding box of the cell. </param> |
| | | 51 | | /// <param name="confidence"> Confidence value. </param> |
| | | 52 | | /// <param name="elements"> When includeTextDetails is set to true, a list of references to the text elements co |
| | | 53 | | /// <param name="isHeader"> Is the current cell a header cell?. </param> |
| | | 54 | | /// <param name="isFooter"> Is the current cell a footer cell?. </param> |
| | 1220 | 55 | | internal DataTableCell(int rowIndex, int columnIndex, int? rowSpan, int? columnSpan, string text, IReadOnlyList< |
| | | 56 | | { |
| | 1220 | 57 | | RowIndex = rowIndex; |
| | 1220 | 58 | | ColumnIndex = columnIndex; |
| | 1220 | 59 | | RowSpan = rowSpan; |
| | 1220 | 60 | | ColumnSpan = columnSpan; |
| | 1220 | 61 | | Text = text; |
| | 1220 | 62 | | BoundingBox = boundingBox; |
| | 1220 | 63 | | Confidence = confidence; |
| | 1220 | 64 | | Elements = elements; |
| | 1220 | 65 | | IsHeader = isHeader; |
| | 1220 | 66 | | IsFooter = isFooter; |
| | 1220 | 67 | | } |
| | | 68 | | |
| | | 69 | | /// <summary> Row index of the cell. </summary> |
| | 1220 | 70 | | public int RowIndex { get; } |
| | | 71 | | /// <summary> Column index of the cell. </summary> |
| | 1220 | 72 | | public int ColumnIndex { get; } |
| | | 73 | | /// <summary> Number of rows spanned by this cell. </summary> |
| | 1220 | 74 | | public int? RowSpan { get; } |
| | | 75 | | /// <summary> Number of columns spanned by this cell. </summary> |
| | 1220 | 76 | | public int? ColumnSpan { get; } |
| | | 77 | | /// <summary> Text content of the cell. </summary> |
| | 1220 | 78 | | public string Text { get; } |
| | | 79 | | /// <summary> Bounding box of the cell. </summary> |
| | 1220 | 80 | | public IReadOnlyList<float> BoundingBox { get; } |
| | | 81 | | /// <summary> Confidence value. </summary> |
| | 1220 | 82 | | public float Confidence { get; } |
| | | 83 | | /// <summary> When includeTextDetails is set to true, a list of references to the text elements constituting thi |
| | 2232 | 84 | | public IReadOnlyList<string> Elements { get; } |
| | | 85 | | /// <summary> Is the current cell a header cell?. </summary> |
| | 1220 | 86 | | public bool? IsHeader { get; } |
| | | 87 | | /// <summary> Is the current cell a footer cell?. </summary> |
| | 1220 | 88 | | public bool? IsFooter { get; } |
| | | 89 | | } |
| | | 90 | | } |