| | 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 | |
|
| | 12 | | namespace Azure.AI.FormRecognizer.Models |
| | 13 | | { |
| | 14 | | /// <summary> An object representing a word. </summary> |
| | 15 | | internal partial class TextWord |
| | 16 | | { |
| | 17 | | /// <summary> Initializes a new instance of TextWord. </summary> |
| | 18 | | /// <param name="text"> The text content of the word. </param> |
| | 19 | | /// <param name="boundingBox"> Bounding box of an extracted word. </param> |
| | 20 | | /// <exception cref="ArgumentNullException"> <paramref name="text"/> or <paramref name="boundingBox"/> is null. |
| 0 | 21 | | internal TextWord(string text, IEnumerable<float> boundingBox) |
| | 22 | | { |
| 0 | 23 | | if (text == null) |
| | 24 | | { |
| 0 | 25 | | throw new ArgumentNullException(nameof(text)); |
| | 26 | | } |
| 0 | 27 | | if (boundingBox == null) |
| | 28 | | { |
| 0 | 29 | | throw new ArgumentNullException(nameof(boundingBox)); |
| | 30 | | } |
| | 31 | |
|
| 0 | 32 | | Text = text; |
| 0 | 33 | | BoundingBox = boundingBox.ToList(); |
| 0 | 34 | | } |
| | 35 | |
|
| | 36 | | /// <summary> Initializes a new instance of TextWord. </summary> |
| | 37 | | /// <param name="text"> The text content of the word. </param> |
| | 38 | | /// <param name="boundingBox"> Bounding box of an extracted word. </param> |
| | 39 | | /// <param name="confidence"> Confidence value. </param> |
| 10600 | 40 | | internal TextWord(string text, IReadOnlyList<float> boundingBox, float? confidence) |
| | 41 | | { |
| 10600 | 42 | | Text = text; |
| 10600 | 43 | | BoundingBox = boundingBox; |
| 10600 | 44 | | Confidence = confidence; |
| 10600 | 45 | | } |
| | 46 | |
|
| | 47 | | /// <summary> The text content of the word. </summary> |
| 15908 | 48 | | public string Text { get; } |
| | 49 | | /// <summary> Bounding box of an extracted word. </summary> |
| 15908 | 50 | | public IReadOnlyList<float> BoundingBox { get; } |
| | 51 | | /// <summary> Confidence value. </summary> |
| 27552 | 52 | | public float? Confidence { get; } |
| | 53 | | } |
| | 54 | | } |