| | 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 SentimentResponse. </summary> |
| | 16 | | internal partial class SentimentResponse |
| | 17 | | { |
| | 18 | | /// <summary> Initializes a new instance of SentimentResponse. </summary> |
| | 19 | | /// <param name="documents"> Sentiment analysis per 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 SentimentResponse(IEnumerable<DocumentSentiment> documents, IEnumerable<DocumentError> errors, string m |
| | 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 SentimentResponse. </summary> |
| | 44 | | /// <param name="documents"> Sentiment analysis per 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> |
| 0 | 48 | | internal SentimentResponse(IReadOnlyList<DocumentSentiment> documents, IReadOnlyList<DocumentError> errors, Text |
| | 49 | | { |
| 0 | 50 | | Documents = documents; |
| 0 | 51 | | Errors = errors; |
| 0 | 52 | | Statistics = statistics; |
| 0 | 53 | | ModelVersion = modelVersion; |
| 0 | 54 | | } |
| | 55 | |
|
| | 56 | | /// <summary> Sentiment analysis per document. </summary> |
| 0 | 57 | | public IReadOnlyList<DocumentSentiment> Documents { get; } |
| | 58 | | /// <summary> Errors by document id. </summary> |
| 0 | 59 | | public IReadOnlyList<DocumentError> Errors { get; } |
| | 60 | | /// <summary> if showStats=true was specified in the request this field will contain information about the reque |
| 0 | 61 | | public TextDocumentBatchStatistics Statistics { get; } |
| | 62 | | /// <summary> This field indicates which model is used for scoring. </summary> |
| 0 | 63 | | public string ModelVersion { get; } |
| | 64 | | } |
| | 65 | | } |