Skip to content

Commit b88760c

Browse files
authored
Sumeh/feature/textanalytics5.2 analyze (Azure#16785)
* Initial Setup working * Added AnalyzeHealth Operation - build passing * added healthcare samples sync and async * fix build error - passing build * added healthcare cancellation - build passing * added healthcare samples with cancellation - build passing * HC samples added - build passing * Added ShowStats samples for healthcare * fix tests and build passing * update names and resolved comments * resolved warnings for adding docstring * removed unused functions from CLientCOmmon.cs * resolve comments * resolved comments * resolved comments * resolved comments * added async pageablle for pagination * remove analyze commented code * updated session record * update tests endpoint to dev and record tests * update env variables * run exportapi.ps1 * Added RecogniseHealthcareEntitiesTests * fixed async tests * removed stringindextype customization * removed exception methods * added more tests and updated samples * cleanup * fixed apidev view issues * fixed apidev view issues * resolved comments * update session records * update readme * Revert "update readme" This reverts commit dbe7b97. * resolved comments * run export.ps1 * update session records * updated docstrings * run update snippets * update ../test-resources.json * fix flaky tests * added analyze sdk code * added tests and samples * resolved comments * resolved comments * resolve comments * update session records * run update snippits and exportApi script * remove skip and top from options * run exportapi script * remove swagger * update session records to remove top and skip * update docstrings * make options non default * cleanup * cleanup * fix tests * update session records Co-authored-by: Suhas Mehta <suhas.mehta@microsoft.com>
1 parent 6f76d38 commit b88760c

File tree

243 files changed

+37730
-3999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+37730
-3999
lines changed

sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
namespace Azure.AI.TextAnalytics
22
{
3+
public partial class AnalyzeOperation : Azure.Operation<Azure.AI.TextAnalytics.AnalyzeOperationResult>
4+
{
5+
public AnalyzeOperation(string operationId, Azure.AI.TextAnalytics.TextAnalyticsClient client) { }
6+
public override bool HasCompleted { get { throw null; } }
7+
public override bool HasValue { get { throw null; } }
8+
public override string Id { get { throw null; } }
9+
public override Azure.AI.TextAnalytics.AnalyzeOperationResult Value { get { throw null; } }
10+
public override Azure.Response GetRawResponse() { throw null; }
11+
public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
12+
public override System.Threading.Tasks.ValueTask<Azure.Response> UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
13+
public override System.Threading.Tasks.ValueTask<Azure.Response<Azure.AI.TextAnalytics.AnalyzeOperationResult>> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
14+
public override System.Threading.Tasks.ValueTask<Azure.Response<Azure.AI.TextAnalytics.AnalyzeOperationResult>> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
15+
}
16+
public partial class AnalyzeOperationOptions : Azure.AI.TextAnalytics.TextAnalyticsRequestOptions
17+
{
18+
public AnalyzeOperationOptions() { }
19+
public string DisplayName { get { throw null; } set { } }
20+
public Azure.AI.TextAnalytics.EntitiesTaskParameters EntitiesTaskParameters { get { throw null; } set { } }
21+
public Azure.AI.TextAnalytics.KeyPhrasesTaskParameters KeyPhrasesTaskParameters { get { throw null; } set { } }
22+
public Azure.AI.TextAnalytics.PiiTaskParameters PiiTaskParameters { get { throw null; } set { } }
23+
}
24+
public partial class AnalyzeOperationResult
25+
{
26+
internal AnalyzeOperationResult() { }
27+
public string DisplayName { get { throw null; } }
28+
public System.Collections.Generic.IReadOnlyList<Azure.AI.TextAnalytics.TextAnalyticsError> Errors { get { throw null; } }
29+
public Azure.AI.TextAnalytics.TextDocumentBatchStatistics Statistics { get { throw null; } }
30+
public Azure.AI.TextAnalytics.JobStatus Status { get { throw null; } }
31+
public Azure.AI.TextAnalytics.AnalyzeTasks Tasks { get { throw null; } }
32+
}
333
public partial class AnalyzeSentimentOptions : Azure.AI.TextAnalytics.TextAnalyticsRequestOptions
434
{
535
public AnalyzeSentimentOptions() { }
@@ -16,6 +46,18 @@ internal AnalyzeSentimentResultCollection() : base (default(System.Collections.G
1646
public string ModelVersion { get { throw null; } }
1747
public Azure.AI.TextAnalytics.TextDocumentBatchStatistics Statistics { get { throw null; } }
1848
}
49+
public partial class AnalyzeTasks
50+
{
51+
internal AnalyzeTasks() { }
52+
public int Completed { get { throw null; } }
53+
public Azure.AI.TextAnalytics.TasksStateTasksDetails Details { get { throw null; } }
54+
public System.Collections.Generic.IReadOnlyList<Azure.AI.TextAnalytics.EntityRecognitionPiiTasksItem> EntityRecognitionPiiTasks { get { throw null; } }
55+
public System.Collections.Generic.IReadOnlyList<Azure.AI.TextAnalytics.EntityRecognitionTasksItem> EntityRecognitionTasks { get { throw null; } }
56+
public int Failed { get { throw null; } }
57+
public int InProgress { get { throw null; } }
58+
public System.Collections.Generic.IReadOnlyList<Azure.AI.TextAnalytics.KeyPhraseExtractionTasksItem> KeyPhraseExtractionTasks { get { throw null; } }
59+
public int Total { get { throw null; } }
60+
}
1961
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
2062
public readonly partial struct AspectSentiment
2163
{
@@ -140,10 +182,12 @@ internal Entity() { }
140182
public partial class EntityRecognitionPiiTasksItem : Azure.AI.TextAnalytics.TaskState
141183
{
142184
internal EntityRecognitionPiiTasksItem() { }
185+
public Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection Results { get { throw null; } }
143186
}
144187
public partial class EntityRecognitionTasksItem : Azure.AI.TextAnalytics.TaskState
145188
{
146189
internal EntityRecognitionTasksItem() { }
190+
public Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection Results { get { throw null; } }
147191
}
148192
public partial class ExtractKeyPhrasesResult : Azure.AI.TextAnalytics.TextAnalyticsResult
149193
{
@@ -211,8 +255,9 @@ public JobManifestTasks() { }
211255
public static Azure.AI.TextAnalytics.JobStatus Cancelled { get { throw null; } }
212256
public static Azure.AI.TextAnalytics.JobStatus Cancelling { get { throw null; } }
213257
public static Azure.AI.TextAnalytics.JobStatus Failed { get { throw null; } }
214-
public static Azure.AI.TextAnalytics.JobStatus Notstarted { get { throw null; } }
215-
public static Azure.AI.TextAnalytics.JobStatus Partiallycompleted { get { throw null; } }
258+
public static Azure.AI.TextAnalytics.JobStatus NotStarted { get { throw null; } }
259+
public static Azure.AI.TextAnalytics.JobStatus PartiallyCompleted { get { throw null; } }
260+
public static Azure.AI.TextAnalytics.JobStatus Rejected { get { throw null; } }
216261
public static Azure.AI.TextAnalytics.JobStatus Running { get { throw null; } }
217262
public static Azure.AI.TextAnalytics.JobStatus Succeeded { get { throw null; } }
218263
public bool Equals(Azure.AI.TextAnalytics.JobStatus other) { throw null; }
@@ -233,6 +278,7 @@ internal KeyPhraseCollection() : base (default(System.Collections.Generic.IList<
233278
public partial class KeyPhraseExtractionTasksItem : Azure.AI.TextAnalytics.TaskState
234279
{
235280
internal KeyPhraseExtractionTasksItem() { }
281+
public Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection Results { get { throw null; } }
236282
}
237283
public partial class KeyPhrasesTask
238284
{
@@ -402,17 +448,9 @@ internal SentimentConfidenceScores() { }
402448
public double Neutral { get { throw null; } }
403449
public double Positive { get { throw null; } }
404450
}
405-
public partial class TasksStateTasks
451+
public partial class TasksStateTasksDetails : Azure.AI.TextAnalytics.TaskState
406452
{
407-
internal TasksStateTasks() { }
408-
public int Completed { get { throw null; } }
409-
public System.Collections.Generic.IReadOnlyList<Azure.AI.TextAnalytics.TaskState> Details { get { throw null; } }
410-
public System.Collections.Generic.IReadOnlyList<Azure.AI.TextAnalytics.EntityRecognitionPiiTasksItem> EntityRecognitionPiiTasks { get { throw null; } }
411-
public System.Collections.Generic.IReadOnlyList<Azure.AI.TextAnalytics.EntityRecognitionTasksItem> EntityRecognitionTasks { get { throw null; } }
412-
public int Failed { get { throw null; } }
413-
public int InProgress { get { throw null; } }
414-
public System.Collections.Generic.IReadOnlyList<Azure.AI.TextAnalytics.KeyPhraseExtractionTasksItem> KeyPhraseExtractionTasks { get { throw null; } }
415-
public int Total { get { throw null; } }
453+
internal TasksStateTasksDetails() { }
416454
}
417455
public partial class TaskState
418456
{
@@ -481,6 +519,10 @@ public TextAnalyticsClient(System.Uri endpoint, Azure.Core.TokenCredential crede
481519
public virtual Azure.Response<Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection> RecognizePiiEntitiesBatch(System.Collections.Generic.IEnumerable<string> documents, string language = null, Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
482520
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection>> RecognizePiiEntitiesBatchAsync(System.Collections.Generic.IEnumerable<Azure.AI.TextAnalytics.TextDocumentInput> documents, Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
483521
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection>> RecognizePiiEntitiesBatchAsync(System.Collections.Generic.IEnumerable<string> documents, string language = null, Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
522+
public virtual Azure.AI.TextAnalytics.AnalyzeOperation StartAnalyzeOperationBatch(System.Collections.Generic.IEnumerable<Azure.AI.TextAnalytics.TextDocumentInput> documents, Azure.AI.TextAnalytics.AnalyzeOperationOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
523+
public virtual Azure.AI.TextAnalytics.AnalyzeOperation StartAnalyzeOperationBatch(System.Collections.Generic.IEnumerable<string> documents, Azure.AI.TextAnalytics.AnalyzeOperationOptions options, string language = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
524+
public virtual System.Threading.Tasks.Task<Azure.AI.TextAnalytics.AnalyzeOperation> StartAnalyzeOperationBatchAsync(System.Collections.Generic.IEnumerable<Azure.AI.TextAnalytics.TextDocumentInput> documents, Azure.AI.TextAnalytics.AnalyzeOperationOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
525+
public virtual System.Threading.Tasks.Task<Azure.AI.TextAnalytics.AnalyzeOperation> StartAnalyzeOperationBatchAsync(System.Collections.Generic.IEnumerable<string> documents, Azure.AI.TextAnalytics.AnalyzeOperationOptions options, string language = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
484526
public virtual string StartCancelHealthJob(Azure.AI.TextAnalytics.HealthcareOperation operation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
485527
public virtual System.Threading.Tasks.Task<string> StartCancelHealthJobAsync(Azure.AI.TextAnalytics.HealthcareOperation operation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
486528
public virtual Azure.AI.TextAnalytics.HealthcareOperation StartHealthcare(string document, string language = null, Azure.AI.TextAnalytics.HealthcareOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using Azure.Core;
6+
7+
namespace Azure.AI.TextAnalytics.Models
8+
{
9+
/// <summary>
10+
/// AnalyzeBatchInput.
11+
/// </summary>
12+
[CodeGenModel("AnalyzeBatchInput")]
13+
internal partial class AnalyzeBatchInput
14+
{
15+
16+
/// <summary> Initializes a new instance of AnalyzeBatchInput. </summary>
17+
/// <param name="analysisInput"> Contains a set of input documents to be analyzed by the service. </param>
18+
/// <param name="tasks"> The set of tasks to execute on the input documents. Cannot specify the same task more than once. </param>
19+
/// <param name="displayName">The name wassigned for the job</param>
20+
/// <exception cref="ArgumentNullException"> <paramref name="analysisInput"/> or <paramref name="tasks"/> is null. </exception>
21+
public AnalyzeBatchInput(MultiLanguageBatchInput analysisInput, JobManifestTasks tasks, string displayName)
22+
{
23+
if (analysisInput == null)
24+
{
25+
throw new ArgumentNullException(nameof(analysisInput));
26+
}
27+
if (tasks == null)
28+
{
29+
throw new ArgumentNullException(nameof(tasks));
30+
}
31+
AnalysisInput = analysisInput;
32+
Tasks = tasks;
33+
DisplayName = displayName;
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)