| | | 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 Azure.Core; |
| | | 11 | | |
| | | 12 | | namespace Azure.AI.FormRecognizer.Models |
| | | 13 | | { |
| | | 14 | | /// <summary> Information about the extracted key or value in a key-value pair. </summary> |
| | | 15 | | internal partial class KeyValueElement |
| | | 16 | | { |
| | | 17 | | /// <summary> Initializes a new instance of KeyValueElement. </summary> |
| | | 18 | | /// <param name="text"> The text content of the key or value. </param> |
| | | 19 | | /// <exception cref="ArgumentNullException"> <paramref name="text"/> is null. </exception> |
| | 0 | 20 | | internal KeyValueElement(string text) |
| | | 21 | | { |
| | 0 | 22 | | if (text == null) |
| | | 23 | | { |
| | 0 | 24 | | throw new ArgumentNullException(nameof(text)); |
| | | 25 | | } |
| | | 26 | | |
| | 0 | 27 | | Text = text; |
| | 0 | 28 | | BoundingBox = new ChangeTrackingList<float>(); |
| | 0 | 29 | | Elements = new ChangeTrackingList<string>(); |
| | 0 | 30 | | } |
| | | 31 | | |
| | | 32 | | /// <summary> Initializes a new instance of KeyValueElement. </summary> |
| | | 33 | | /// <param name="text"> The text content of the key or value. </param> |
| | | 34 | | /// <param name="boundingBox"> Bounding box of the key or value. </param> |
| | | 35 | | /// <param name="elements"> When includeTextDetails is set to true, a list of references to the text elements co |
| | 1152 | 36 | | internal KeyValueElement(string text, IReadOnlyList<float> boundingBox, IReadOnlyList<string> elements) |
| | | 37 | | { |
| | 1152 | 38 | | Text = text; |
| | 1152 | 39 | | BoundingBox = boundingBox; |
| | 1152 | 40 | | Elements = elements; |
| | 1152 | 41 | | } |
| | | 42 | | |
| | | 43 | | /// <summary> The text content of the key or value. </summary> |
| | 1728 | 44 | | public string Text { get; } |
| | | 45 | | /// <summary> Bounding box of the key or value. </summary> |
| | 2064 | 46 | | public IReadOnlyList<float> BoundingBox { get; } |
| | | 47 | | /// <summary> When includeTextDetails is set to true, a list of references to the text elements constituting thi |
| | 1728 | 48 | | public IReadOnlyList<string> Elements { get; } |
| | | 49 | | } |
| | | 50 | | } |