| | 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.AI.TextAnalytics; |
| | 12 | |
|
| | 13 | | namespace Azure.AI.TextAnalytics.Models |
| | 14 | | { |
| | 15 | | /// <summary> The LanguageResult. </summary> |
| | 16 | | internal partial class LanguageResult |
| | 17 | | { |
| | 18 | | /// <summary> Initializes a new instance of LanguageResult. </summary> |
| | 19 | | /// <param name="documents"> Response by document. </param> |
| | 20 | | /// <param name="errors"> Errors by document id. </param> |
| | 21 | | /// <param name="modelVersion"> This field indicates which model is used for scoring. </param> |
| | 22 | | /// <exception cref="ArgumentNullException"> <paramref name="documents"/>, <paramref name="errors"/>, or <paramr |
| 0 | 23 | | internal LanguageResult(IEnumerable<DocumentLanguage> documents, IEnumerable<DocumentError> errors, string model |
| | 24 | | { |
| 0 | 25 | | if (documents == null) |
| | 26 | | { |
| 0 | 27 | | throw new ArgumentNullException(nameof(documents)); |
| | 28 | | } |
| 0 | 29 | | if (errors == null) |
| | 30 | | { |
| 0 | 31 | | throw new ArgumentNullException(nameof(errors)); |
| | 32 | | } |
| 0 | 33 | | if (modelVersion == null) |
| | 34 | | { |
| 0 | 35 | | throw new ArgumentNullException(nameof(modelVersion)); |
| | 36 | | } |
| | 37 | |
|
| 0 | 38 | | Documents = documents.ToList(); |
| 0 | 39 | | Errors = errors.ToList(); |
| 0 | 40 | | ModelVersion = modelVersion; |
| 0 | 41 | | } |
| | 42 | |
|
| | 43 | | /// <summary> Initializes a new instance of LanguageResult. </summary> |
| | 44 | | /// <param name="documents"> Response by document. </param> |
| | 45 | | /// <param name="errors"> Errors by document id. </param> |
| | 46 | | /// <param name="statistics"> if showStats=true was specified in the request this field will contain information |
| | 47 | | /// <param name="modelVersion"> This field indicates which model is used for scoring. </param> |
| 48 | 48 | | internal LanguageResult(IReadOnlyList<DocumentLanguage> documents, IReadOnlyList<DocumentError> errors, TextDocu |
| | 49 | | { |
| 48 | 50 | | Documents = documents; |
| 48 | 51 | | Errors = errors; |
| 48 | 52 | | Statistics = statistics; |
| 48 | 53 | | ModelVersion = modelVersion; |
| 48 | 54 | | } |
| | 55 | |
|
| | 56 | | /// <summary> Response by document. </summary> |
| 44 | 57 | | public IReadOnlyList<DocumentLanguage> Documents { get; } |
| | 58 | | /// <summary> Errors by document id. </summary> |
| 52 | 59 | | public IReadOnlyList<DocumentError> Errors { get; } |
| | 60 | | /// <summary> if showStats=true was specified in the request this field will contain information about the reque |
| 20 | 61 | | public TextDocumentBatchStatistics Statistics { get; } |
| | 62 | | /// <summary> This field indicates which model is used for scoring. </summary> |
| 20 | 63 | | public string ModelVersion { get; } |
| | 64 | | } |
| | 65 | | } |