| | | 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.TextAnalytics.Models |
| | | 13 | | { |
| | | 14 | | /// <summary> The SentenceAspect. </summary> |
| | | 15 | | internal partial class SentenceAspect |
| | | 16 | | { |
| | | 17 | | /// <summary> Initializes a new instance of SentenceAspect. </summary> |
| | | 18 | | /// <param name="sentiment"> Aspect level sentiment for the aspect in the sentence. </param> |
| | | 19 | | /// <param name="confidenceScores"> Aspect level sentiment confidence scores for the aspect in the sentence. </p |
| | | 20 | | /// <param name="offset"> The aspect offset from the start of the sentence. </param> |
| | | 21 | | /// <param name="length"> The length of the aspect. </param> |
| | | 22 | | /// <param name="text"> The aspect text detected. </param> |
| | | 23 | | /// <param name="relations"> The array of either opinion or aspect object which is related to the aspect. </para |
| | | 24 | | /// <exception cref="ArgumentNullException"> <paramref name="confidenceScores"/>, <paramref name="text"/>, or <p |
| | 0 | 25 | | internal SentenceAspect(SentenceAspectSentiment sentiment, AspectConfidenceScoreLabel confidenceScores, int offs |
| | | 26 | | { |
| | 0 | 27 | | if (confidenceScores == null) |
| | | 28 | | { |
| | 0 | 29 | | throw new ArgumentNullException(nameof(confidenceScores)); |
| | | 30 | | } |
| | 0 | 31 | | if (text == null) |
| | | 32 | | { |
| | 0 | 33 | | throw new ArgumentNullException(nameof(text)); |
| | | 34 | | } |
| | 0 | 35 | | if (relations == null) |
| | | 36 | | { |
| | 0 | 37 | | throw new ArgumentNullException(nameof(relations)); |
| | | 38 | | } |
| | | 39 | | |
| | 0 | 40 | | Sentiment = sentiment; |
| | 0 | 41 | | ConfidenceScores = confidenceScores; |
| | 0 | 42 | | Offset = offset; |
| | 0 | 43 | | Length = length; |
| | 0 | 44 | | Text = text; |
| | 0 | 45 | | Relations = relations.ToList(); |
| | 0 | 46 | | } |
| | | 47 | | |
| | | 48 | | /// <summary> Initializes a new instance of SentenceAspect. </summary> |
| | | 49 | | /// <param name="sentiment"> Aspect level sentiment for the aspect in the sentence. </param> |
| | | 50 | | /// <param name="confidenceScores"> Aspect level sentiment confidence scores for the aspect in the sentence. </p |
| | | 51 | | /// <param name="offset"> The aspect offset from the start of the sentence. </param> |
| | | 52 | | /// <param name="length"> The length of the aspect. </param> |
| | | 53 | | /// <param name="text"> The aspect text detected. </param> |
| | | 54 | | /// <param name="relations"> The array of either opinion or aspect object which is related to the aspect. </para |
| | 0 | 55 | | internal SentenceAspect(SentenceAspectSentiment sentiment, AspectConfidenceScoreLabel confidenceScores, int offs |
| | | 56 | | { |
| | 0 | 57 | | Sentiment = sentiment; |
| | 0 | 58 | | ConfidenceScores = confidenceScores; |
| | 0 | 59 | | Offset = offset; |
| | 0 | 60 | | Length = length; |
| | 0 | 61 | | Text = text; |
| | 0 | 62 | | Relations = relations; |
| | 0 | 63 | | } |
| | | 64 | | |
| | | 65 | | /// <summary> Aspect level sentiment for the aspect in the sentence. </summary> |
| | 0 | 66 | | public SentenceAspectSentiment Sentiment { get; } |
| | | 67 | | /// <summary> Aspect level sentiment confidence scores for the aspect in the sentence. </summary> |
| | 0 | 68 | | public AspectConfidenceScoreLabel ConfidenceScores { get; } |
| | | 69 | | /// <summary> The aspect offset from the start of the sentence. </summary> |
| | 0 | 70 | | public int Offset { get; } |
| | | 71 | | /// <summary> The length of the aspect. </summary> |
| | 0 | 72 | | public int Length { get; } |
| | | 73 | | /// <summary> The aspect text detected. </summary> |
| | 0 | 74 | | public string Text { get; } |
| | | 75 | | /// <summary> The array of either opinion or aspect object which is related to the aspect. </summary> |
| | 0 | 76 | | public IReadOnlyList<AspectRelation> Relations { get; } |
| | | 77 | | } |
| | | 78 | | } |