Skip to content

Commit fb1f8a2

Browse files
authored
[TA] Targets service version 3.1-preview.5 (#20994)
* generation + build + tests + disable healthcare * update public api with new version
1 parent d9b1026 commit fb1f8a2

File tree

266 files changed

+12862
-54682
lines changed

Some content is hidden

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

266 files changed

+12862
-54682
lines changed

sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Release History
22

33
## 5.1.0-beta.7 (Unreleased)
4-
4+
### Breaking changes
5+
- The client defaults to the latest supported service version, which currently is `3.1-preview.5`.
6+
- Renamed type `TextElementsV8` to `TextElementV8` in model `StringIndexType`.
57

68
## 5.1.0-beta.6 (2021-04-06)
79
### New features

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ internal SentimentConfidenceScores() { }
647647
private readonly object _dummy;
648648
private readonly int _dummyPrimitive;
649649
public StringIndexType(string value) { throw null; }
650-
public static Azure.AI.TextAnalytics.StringIndexType TextElementsV8 { get { throw null; } }
650+
public static Azure.AI.TextAnalytics.StringIndexType TextElementV8 { get { throw null; } }
651651
public static Azure.AI.TextAnalytics.StringIndexType UnicodeCodePoint { get { throw null; } }
652652
public static Azure.AI.TextAnalytics.StringIndexType Utf16CodeUnit { get { throw null; } }
653653
public bool Equals(Azure.AI.TextAnalytics.StringIndexType other) { throw null; }
@@ -795,13 +795,13 @@ public TextAnalyticsClient(System.Uri endpoint, Azure.Core.TokenCredential crede
795795
}
796796
public partial class TextAnalyticsClientOptions : Azure.Core.ClientOptions
797797
{
798-
public TextAnalyticsClientOptions(Azure.AI.TextAnalytics.TextAnalyticsClientOptions.ServiceVersion version = Azure.AI.TextAnalytics.TextAnalyticsClientOptions.ServiceVersion.V3_1_Preview_4) { }
798+
public TextAnalyticsClientOptions(Azure.AI.TextAnalytics.TextAnalyticsClientOptions.ServiceVersion version = Azure.AI.TextAnalytics.TextAnalyticsClientOptions.ServiceVersion.V3_1_Preview_5) { }
799799
public string DefaultCountryHint { get { throw null; } set { } }
800800
public string DefaultLanguage { get { throw null; } set { } }
801801
public enum ServiceVersion
802802
{
803803
V3_0 = 1,
804-
V3_1_Preview_4 = 2,
804+
V3_1_Preview_5 = 2,
805805
}
806806
}
807807
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]

sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeBatchActionsOperation.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ async Task<Page<AnalyzeBatchActionsResult>> NextPageFunc(string nextLink, int? p
296296
//diagnostics scope?
297297
try
298298
{
299-
Response<AnalyzeJobState> jobState = await _serviceClient.AnalyzeStatusNextPageAsync(nextLink, _showStats).ConfigureAwait(false);
299+
Response<AnalyzeJobState> jobState = await _serviceClient.AnalyzeStatusNextPageAsync(RemoveExtraInformationFromNextLink(nextLink)).ConfigureAwait(false);
300300

301301
AnalyzeBatchActionsResult result = Transforms.ConvertToAnalyzeOperationResult(jobState.Value, _idToIndexMap);
302302
return Page.FromValues(new List<AnalyzeBatchActionsResult>() { result }, jobState.Value.NextLink, jobState.GetRawResponse());
@@ -325,7 +325,7 @@ Page<AnalyzeBatchActionsResult> NextPageFunc(string nextLink, int? pageSizeHint)
325325
//diagnostics scope?
326326
try
327327
{
328-
Response<AnalyzeJobState> jobState = _serviceClient.AnalyzeStatusNextPage(nextLink, _showStats);
328+
Response<AnalyzeJobState> jobState = _serviceClient.AnalyzeStatusNextPage(RemoveExtraInformationFromNextLink(nextLink));
329329

330330
AnalyzeBatchActionsResult result = Transforms.ConvertToAnalyzeOperationResult(jobState.Value, _idToIndexMap);
331331
return Page.FromValues(new List<AnalyzeBatchActionsResult>() { result }, jobState.Value.NextLink, jobState.GetRawResponse());
@@ -344,5 +344,8 @@ private void ValidateOperationStatus()
344344
if (!HasCompleted)
345345
throw new InvalidOperationException("The operation has not completed yet.");
346346
}
347+
348+
// Service bug https://github.com/Azure/azure-sdk-for-net/issues/20991
349+
private static string RemoveExtraInformationFromNextLink(string nextlink) => nextlink.Split('/').Last();
347350
}
348351
}

sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeHealthcareEntitiesOperation.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ async Task<Page<AnalyzeHealthcareEntitiesResultCollection>> NextPageFunc(string
334334
//diagnostics scope?
335335
try
336336
{
337-
Response<HealthcareJobState> jobState = await _serviceClient.HealthStatusNextPageAsync(nextLink, _showStats).ConfigureAwait(false);
337+
Response<HealthcareJobState> jobState = await _serviceClient.HealthStatusNextPageAsync(RemoveExtraInformationFromNextLink(nextLink)).ConfigureAwait(false);
338338

339339
AnalyzeHealthcareEntitiesResultCollection result = Transforms.ConvertToAnalyzeHealthcareEntitiesResultCollection(jobState.Value.Results, _idToIndexMap);
340340
return Page.FromValues(new List<AnalyzeHealthcareEntitiesResultCollection>() { result }, jobState.Value.NextLink, jobState.GetRawResponse());
@@ -363,7 +363,7 @@ Page<AnalyzeHealthcareEntitiesResultCollection> NextPageFunc(string nextLink, in
363363
//diagnostics scope?
364364
try
365365
{
366-
Response<HealthcareJobState> jobState = _serviceClient.HealthStatusNextPage(nextLink, _showStats);
366+
Response<HealthcareJobState> jobState = _serviceClient.HealthStatusNextPage(RemoveExtraInformationFromNextLink(nextLink));
367367

368368
AnalyzeHealthcareEntitiesResultCollection result = Transforms.ConvertToAnalyzeHealthcareEntitiesResultCollection(jobState.Value.Results, _idToIndexMap);
369369
return Page.FromValues(new List<AnalyzeHealthcareEntitiesResultCollection>() { result }, jobState.Value.NextLink, jobState.GetRawResponse());
@@ -384,5 +384,8 @@ private void ValidateOperationStatus()
384384
if (!HasValue)
385385
throw _requestFailedException;
386386
}
387+
388+
// Service bug https://github.com/Azure/azure-sdk-for-net/issues/20991
389+
private static string RemoveExtraInformationFromNextLink(string nextlink) => nextlink.Split('/').Last();
387390
}
388391
}

sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTasks.Serialization.cs

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/AnalyzeTasks.cs

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Components1C6O47FSchemasTasksstatePropertiesTasksPropertiesSentimentanalysistasksItemsAllof1.Serialization.cs

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/Components1C6O47FSchemasTasksstatePropertiesTasksPropertiesSentimentanalysistasksItemsAllof1.cs

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.Serialization.cs

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Models/EntitiesTaskParameters.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)