diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs index d861737dba81..ac94f3b1a794 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs @@ -92,7 +92,6 @@ public AnalyzeSentimentAction(Azure.AI.TextAnalytics.AnalyzeSentimentOptions opt public partial class AnalyzeSentimentActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionResult { internal AnalyzeSentimentActionResult() { } - public string ActionName { get { throw null; } } public Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection DocumentsResults { get { throw null; } } } public partial class AnalyzeSentimentOptions : Azure.AI.TextAnalytics.TextAnalyticsRequestOptions @@ -240,7 +239,6 @@ public ExtractKeyPhrasesAction(Azure.AI.TextAnalytics.TextAnalyticsRequestOption public partial class ExtractKeyPhrasesActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionResult { internal ExtractKeyPhrasesActionResult() { } - public string ActionName { get { throw null; } } public Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection DocumentsResults { get { throw null; } } } public partial class ExtractKeyPhrasesResult : Azure.AI.TextAnalytics.TextAnalyticsResult @@ -622,7 +620,6 @@ public RecognizeEntitiesAction(Azure.AI.TextAnalytics.TextAnalyticsRequestOption public partial class RecognizeEntitiesActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionResult { internal RecognizeEntitiesActionResult() { } - public string ActionName { get { throw null; } } public Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection DocumentsResults { get { throw null; } } } public partial class RecognizeEntitiesResult : Azure.AI.TextAnalytics.TextAnalyticsResult @@ -647,7 +644,6 @@ public RecognizeLinkedEntitiesAction(Azure.AI.TextAnalytics.TextAnalyticsRequest public partial class RecognizeLinkedEntitiesActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionResult { internal RecognizeLinkedEntitiesActionResult() { } - public string ActionName { get { throw null; } } public Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection DocumentsResults { get { throw null; } } } public partial class RecognizeLinkedEntitiesResult : Azure.AI.TextAnalytics.TextAnalyticsResult @@ -674,7 +670,6 @@ public RecognizePiiEntitiesAction(Azure.AI.TextAnalytics.RecognizePiiEntitiesOpt public partial class RecognizePiiEntitiesActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionResult { internal RecognizePiiEntitiesActionResult() { } - public string ActionName { get { throw null; } } public Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection DocumentsResults { get { throw null; } } } public partial class RecognizePiiEntitiesOptions : Azure.AI.TextAnalytics.TextAnalyticsRequestOptions @@ -735,6 +730,7 @@ public readonly partial struct TargetSentiment public partial class TextAnalyticsActionResult { internal TextAnalyticsActionResult() { } + public string ActionName { get { throw null; } } public System.DateTimeOffset CompletedOn { get { throw null; } } public Azure.AI.TextAnalytics.TextAnalyticsError Error { get { throw null; } } public bool HasError { get { throw null; } } @@ -937,8 +933,6 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.SentenceSentiment SentenceSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, string text, double positiveScore, double neutralScore, double negativeScore, int offset, int length, System.Collections.Generic.IEnumerable opinions) { throw null; } public static Azure.AI.TextAnalytics.SentimentConfidenceScores SentimentConfidenceScores(double positiveScore, double neutralScore, double negativeScore) { throw null; } public static Azure.AI.TextAnalytics.TargetSentiment TargetSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, string text, double positiveScore, double negativeScore, int offset, int length) { throw null; } - public static Azure.AI.TextAnalytics.TextAnalyticsActionResult TextAnalyticsActionResult(System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.TextAnalyticsActionResult TextAnalyticsActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.TextAnalyticsError TextAnalyticsError(string code, string message, string target = null) { throw null; } public static Azure.AI.TextAnalytics.TextAnalyticsWarning TextAnalyticsWarning(string code, string message) { throw null; } public static Azure.AI.TextAnalytics.TextDocumentBatchStatistics TextDocumentBatchStatistics(int documentCount, int validDocumentCount, int invalidDocumentCount, long transactionCount) { throw null; } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs index 8cb1368336a6..7b0b0a5d5eb7 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs @@ -17,20 +17,16 @@ public class AnalyzeSentimentActionResult : TextAnalyticsActionResult /// Successful action. /// internal AnalyzeSentimentActionResult(AnalyzeSentimentResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn) + : base(completedOn, actionName) { _documentsResults = result; - ActionName = actionName; } /// /// Action with an error. /// internal AnalyzeSentimentActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) - { - ActionName = actionName; - } + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of an per each input document. @@ -46,10 +42,5 @@ public AnalyzeSentimentResultCollection DocumentsResults return _documentsResults; } } - - /// - /// Gets the name for this action. - /// - public string ActionName { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs index 47bf9f7b89ee..847695e57b47 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs @@ -17,20 +17,16 @@ public class ExtractKeyPhrasesActionResult : TextAnalyticsActionResult /// Successful action. /// internal ExtractKeyPhrasesActionResult(ExtractKeyPhrasesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn) + : base(completedOn, actionName) { _documentsResults = result; - ActionName = actionName; } /// /// Action with an error. /// internal ExtractKeyPhrasesActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) - { - ActionName = actionName; - } + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of an per each input document. @@ -48,10 +44,5 @@ public ExtractKeyPhrasesResultCollection DocumentsResults return _documentsResults; } } - - /// - /// Gets the name for this action. - /// - public string ActionName { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs index 9b49b67e6eb5..cecfdb46e669 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs @@ -17,20 +17,16 @@ public class RecognizeEntitiesActionResult : TextAnalyticsActionResult /// Successful action. /// internal RecognizeEntitiesActionResult(RecognizeEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn) + : base(completedOn, actionName) { _documentsResults = result; - ActionName = actionName; } /// /// Action with an error. /// internal RecognizeEntitiesActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) - { - ActionName = actionName; - } + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. @@ -48,10 +44,5 @@ public RecognizeEntitiesResultCollection DocumentsResults return _documentsResults; } } - - /// - /// Gets the name for this action. - /// - public string ActionName { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs index 53e8a8b1d98f..56ed64c2c45d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs @@ -17,20 +17,16 @@ public class RecognizeLinkedEntitiesActionResult : TextAnalyticsActionResult /// Successful action. /// internal RecognizeLinkedEntitiesActionResult(RecognizeLinkedEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn) + : base(completedOn, actionName) { _documentsResults = result; - ActionName = actionName; } /// /// Action with an error. /// internal RecognizeLinkedEntitiesActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) - { - ActionName = actionName; - } + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. @@ -48,10 +44,5 @@ public RecognizeLinkedEntitiesResultCollection DocumentsResults return _documentsResults; } } - - /// - /// Gets the name for this action. - /// - public string ActionName { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs index 84e4c894d0a9..0aacaafaf78c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs @@ -17,20 +17,16 @@ public class RecognizePiiEntitiesActionResult : TextAnalyticsActionResult /// Successful action. /// internal RecognizePiiEntitiesActionResult(RecognizePiiEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn) + : base(completedOn, actionName) { _documentsResults = result; - ActionName = actionName; } /// /// Action with an error. /// internal RecognizePiiEntitiesActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) - { - ActionName = actionName; - } + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. @@ -48,10 +44,5 @@ public RecognizePiiEntitiesResultCollection DocumentsResults return _documentsResults; } } - - /// - /// Gets the name for this action. - /// - public string ActionName { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs index 416d3105d491..97a5043441cb 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs @@ -11,15 +11,17 @@ namespace Azure.AI.TextAnalytics /// public class TextAnalyticsActionResult { - internal TextAnalyticsActionResult (DateTimeOffset completedOn, TextAnalyticsErrorInternal error) + internal TextAnalyticsActionResult (DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) { CompletedOn = completedOn; + ActionName = actionName; Error = error != null ? Transforms.ConvertToError(error) : default; } - internal TextAnalyticsActionResult(DateTimeOffset completedOn) + internal TextAnalyticsActionResult(DateTimeOffset completedOn, string actionName) { CompletedOn = completedOn; + ActionName = actionName; } /// @@ -27,6 +29,11 @@ internal TextAnalyticsActionResult(DateTimeOffset completedOn) /// public DateTimeOffset CompletedOn { get; } + /// + /// Gets the name for this action. + /// + public string ActionName { get; } + /// /// Determines the TextAnalyticsError object for an action result. /// diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs index 9841328dd2a4..03c0bd96b43f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs @@ -615,7 +615,7 @@ public static AnalyzeActionsResult AnalyzeActionsResult( /// Initializes a new instance of for mocking purposes. /// /// Sets the property. - /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( @@ -629,7 +629,7 @@ public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( /// /// Initializes a new instance of for mocking purposes. /// - /// Sets the property. + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. @@ -647,7 +647,7 @@ public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( /// Initializes a new instance of for mocking purposes. /// /// Sets the property. - /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( @@ -661,7 +661,7 @@ public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( /// /// Initializes a new instance of for mocking purposes. /// - /// Sets the property. + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. @@ -675,37 +675,11 @@ public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( return new AnalyzeSentimentActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } - /// - /// Initializes a new instance of for mocking purposes. - /// - /// Sets the property. - /// A new instance of for mocking purposes. - public static TextAnalyticsActionResult TextAnalyticsActionResult( - DateTimeOffset completedOn) - { - return new TextAnalyticsActionResult(completedOn); - } - - /// - /// Initializes a new instance of for mocking purposes. - /// - /// Sets the property. - /// Sets the property. - /// Sets the property. - /// A new instance of for mocking purposes. - public static TextAnalyticsActionResult TextAnalyticsActionResult( - DateTimeOffset completedOn, - string code, - string message) - { - return new TextAnalyticsActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); - } - /// /// Initializes a new instance of for mocking purposes. /// /// Sets the property. - /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult( @@ -719,7 +693,7 @@ public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionR /// /// Initializes a new instance of for mocking purposes. /// - /// Sets the property. + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. @@ -737,7 +711,7 @@ public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionR /// Initializes a new instance of for mocking purposes. /// /// Sets the property. - /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( @@ -751,7 +725,7 @@ public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( /// /// Initializes a new instance of for mocking purposes. /// - /// Sets the property. + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. @@ -769,7 +743,7 @@ public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( /// Initializes a new instance of for mocking purposes. /// /// Sets the property. - /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( @@ -783,7 +757,7 @@ public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( /// /// Initializes a new instance of for mocking purposes. /// - /// Sets the property. + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property.