| | 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> A set of extracted fields corresponding to the input document. </summary> |
| | 15 | | internal partial class DocumentResult |
| | 16 | | { |
| | 17 | | /// <summary> Initializes a new instance of DocumentResult. </summary> |
| | 18 | | /// <param name="docType"> Document type. </param> |
| | 19 | | /// <param name="pageRange"> First and last page number where the document is found. </param> |
| | 20 | | /// <param name="fields"> Dictionary of named field values. </param> |
| | 21 | | /// <exception cref="ArgumentNullException"> <paramref name="docType"/>, <paramref name="pageRange"/>, or <param |
| 0 | 22 | | internal DocumentResult(string docType, IEnumerable<int> pageRange, IReadOnlyDictionary<string, FieldValue_inter |
| | 23 | | { |
| 0 | 24 | | if (docType == null) |
| | 25 | | { |
| 0 | 26 | | throw new ArgumentNullException(nameof(docType)); |
| | 27 | | } |
| 0 | 28 | | if (pageRange == null) |
| | 29 | | { |
| 0 | 30 | | throw new ArgumentNullException(nameof(pageRange)); |
| | 31 | | } |
| 0 | 32 | | if (fields == null) |
| | 33 | | { |
| 0 | 34 | | throw new ArgumentNullException(nameof(fields)); |
| | 35 | | } |
| | 36 | |
|
| 0 | 37 | | DocType = docType; |
| 0 | 38 | | PageRange = pageRange.ToList(); |
| 0 | 39 | | Fields = fields; |
| 0 | 40 | | } |
| | 41 | |
|
| | 42 | | /// <summary> Initializes a new instance of DocumentResult. </summary> |
| | 43 | | /// <param name="docType"> Document type. </param> |
| | 44 | | /// <param name="pageRange"> First and last page number where the document is found. </param> |
| | 45 | | /// <param name="fields"> Dictionary of named field values. </param> |
| 92 | 46 | | internal DocumentResult(string docType, IReadOnlyList<int> pageRange, IReadOnlyDictionary<string, FieldValue_int |
| | 47 | | { |
| 92 | 48 | | DocType = docType; |
| 92 | 49 | | PageRange = pageRange; |
| 92 | 50 | | Fields = fields; |
| 92 | 51 | | } |
| | 52 | |
|
| | 53 | | /// <summary> Document type. </summary> |
| 92 | 54 | | public string DocType { get; } |
| | 55 | | /// <summary> First and last page number where the document is found. </summary> |
| 184 | 56 | | public IReadOnlyList<int> PageRange { get; } |
| | 57 | | /// <summary> Dictionary of named field values. </summary> |
| 184 | 58 | | public IReadOnlyDictionary<string, FieldValue_internal> Fields { get; } |
| | 59 | | } |
| | 60 | | } |