From f8f89a8607ec59bdbc7f7776b8dde77d129c3645 Mon Sep 17 00:00:00 2001 From: Mariana Rios Flores Date: Fri, 4 Jun 2021 09:54:25 -0700 Subject: [PATCH] [Translation] Renames (#21582) --- .../CHANGELOG.md | 2 + .../Azure.AI.Translation.Document/README.md | 8 +- ....AI.Translation.Document.netstandard2.0.cs | 8 +- .../samples/Sample1_StartTranslation.md | 2 +- .../Sample2_PollIndividualDocuments.md | 2 +- .../samples/Sample3_OperationsHistory.md | 2 +- .../samples/Sample4_MultipleInputs.md | 2 +- .../src/DocumentStatusResult.cs | 2 +- .../src/DocumentTranslationClient.cs | 12 +- .../BatchDocumentTranslationModelFactory.cs | 6 +- .../Generated/Models/DocumentStatusResult.cs | 18 +- .../DocumentTranslationClientLiveTests.cs | 4 +- ...GetAllTranslationStatusesTest(False).json} | 0 ...lTranslationStatusesTest(False)Async.json} | 0 ... GetAllTranslationStatusesTest(True).json} | 0 ...llTranslationStatusesTest(True)Async.json} | 0 .../GetTranslationsTest.json | 524 ----------------- .../GetTranslationsTestAsync.json | 525 ------------------ .../tests/TranslationOperationLiveTests.cs | 4 +- .../tests/samples/Sample_MultipleInputs.cs | 2 +- .../samples/Sample_MultipleInputsAsync.cs | 2 +- .../tests/samples/Sample_OperationsHistory.cs | 2 +- .../samples/Sample_OperationsHistoryAsync.cs | 2 +- .../samples/Sample_PollIndividualDocuments.cs | 2 +- .../Sample_PollIndividualDocumentsAsync.cs | 2 +- .../tests/samples/Sample_StartTranslation.cs | 2 +- .../samples/Sample_StartTranslationAsync.cs | 2 +- .../Sample_StartTranslationWithAzureBlob.cs | 2 +- 28 files changed, 46 insertions(+), 1093 deletions(-) rename sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/{GetTranslationsTest(False).json => GetAllTranslationStatusesTest(False).json} (100%) rename sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/{GetTranslationsTest(False)Async.json => GetAllTranslationStatusesTest(False)Async.json} (100%) rename sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/{GetTranslationsTest(True).json => GetAllTranslationStatusesTest(True).json} (100%) rename sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/{GetTranslationsTest(True)Async.json => GetAllTranslationStatusesTest(True)Async.json} (100%) delete mode 100644 sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest.json delete mode 100644 sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTestAsync.json diff --git a/sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md b/sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md index 550f287d50a86..6543dcaf6fea6 100644 --- a/sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md +++ b/sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md @@ -9,6 +9,8 @@ ### Breaking changes - This version of the SDK defaults to the latest supported service version, which currently is `v1.0`. +- Renamed method `GetTranslations` to `GetAllTranslationStatuses` and same for the async equivalent method. +- Renamed property `TranslateTo` to `TranslatedTo` in type `DocumentStatusResult`. ## 1.0.0-beta.1 (2021-04-06) diff --git a/sdk/translation/Azure.AI.Translation.Document/README.md b/sdk/translation/Azure.AI.Translation.Document/README.md index b1807d2db6e25..1494ea50aa87a 100644 --- a/sdk/translation/Azure.AI.Translation.Document/README.md +++ b/sdk/translation/Azure.AI.Translation.Document/README.md @@ -208,7 +208,7 @@ await foreach (DocumentStatusResult document in operation.Value) if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else @@ -229,7 +229,7 @@ int docsCancelled = 0; int docsSucceeded = 0; int docsFailed = 0; -await foreach (TranslationStatusResult translationStatus in client.GetTranslationsAsync()) +await foreach (TranslationStatusResult translationStatus in client.GetAllTranslationStatusesAsync()) { if (!translationStatus.HasCompleted) { @@ -287,7 +287,7 @@ await foreach (DocumentStatusResult document in operation.GetValuesAsync()) if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else @@ -346,7 +346,7 @@ foreach (DocumentStatusResult document in operation.GetValues()) if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/api/Azure.AI.Translation.Document.netstandard2.0.cs b/sdk/translation/Azure.AI.Translation.Document/api/Azure.AI.Translation.Document.netstandard2.0.cs index a1f593bdde189..6352347223cfb 100644 --- a/sdk/translation/Azure.AI.Translation.Document/api/Azure.AI.Translation.Document.netstandard2.0.cs +++ b/sdk/translation/Azure.AI.Translation.Document/api/Azure.AI.Translation.Document.netstandard2.0.cs @@ -2,7 +2,7 @@ namespace Azure.AI.Translation.Document { public static partial class BatchDocumentTranslationModelFactory { - public static Azure.AI.Translation.Document.DocumentStatusResult DocumentStatusResult(System.Uri translatedDocumentUri = null, System.Uri sourceDocumentUri = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastModified = default(System.DateTimeOffset), Azure.AI.Translation.Document.TranslationStatus status = default(Azure.AI.Translation.Document.TranslationStatus), string translateTo = null, Azure.AI.Translation.Document.DocumentTranslationError error = null, float progress = 0f, string documentId = null, long charactersCharged = (long)0) { throw null; } + public static Azure.AI.Translation.Document.DocumentStatusResult DocumentStatusResult(System.Uri translatedDocumentUri = null, System.Uri sourceDocumentUri = null, System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset lastModified = default(System.DateTimeOffset), Azure.AI.Translation.Document.TranslationStatus status = default(Azure.AI.Translation.Document.TranslationStatus), string translatedTo = null, Azure.AI.Translation.Document.DocumentTranslationError error = null, float progress = 0f, string documentId = null, long charactersCharged = (long)0) { throw null; } public static Azure.AI.Translation.Document.FileFormat FileFormat(string format = null, System.Collections.Generic.IReadOnlyList fileExtensions = null, System.Collections.Generic.IReadOnlyList contentTypes = null, string defaultFormatVersion = null, System.Collections.Generic.IReadOnlyList formatVersions = null) { throw null; } } public partial class DocumentFilter @@ -23,7 +23,7 @@ internal DocumentStatusResult() { } public System.Uri SourceDocumentUri { get { throw null; } } public Azure.AI.Translation.Document.TranslationStatus Status { get { throw null; } } public System.Uri TranslatedDocumentUri { get { throw null; } } - public string TranslateTo { get { throw null; } } + public string TranslatedTo { get { throw null; } } public float TranslationProgressPercentage { get { throw null; } } } public partial class DocumentTranslationClient @@ -35,14 +35,14 @@ public DocumentTranslationClient(System.Uri endpoint, Azure.Core.TokenCredential public DocumentTranslationClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Translation.Document.DocumentTranslationClientOptions options) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } + public virtual Azure.Pageable GetAllTranslationStatuses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllTranslationStatusesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> GetDocumentFormats(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> GetDocumentFormatsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> GetGlossaryFormats(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> GetGlossaryFormatsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public virtual Azure.Pageable GetTranslations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetTranslationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AI.Translation.Document.DocumentTranslationOperation StartTranslation(Azure.AI.Translation.Document.DocumentTranslationInput input, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AI.Translation.Document.DocumentTranslationOperation StartTranslation(System.Collections.Generic.IEnumerable inputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartTranslationAsync(Azure.AI.Translation.Document.DocumentTranslationInput input, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/translation/Azure.AI.Translation.Document/samples/Sample1_StartTranslation.md b/sdk/translation/Azure.AI.Translation.Document/samples/Sample1_StartTranslation.md index 7e465ff070011..dc8c6666db4e2 100644 --- a/sdk/translation/Azure.AI.Translation.Document/samples/Sample1_StartTranslation.md +++ b/sdk/translation/Azure.AI.Translation.Document/samples/Sample1_StartTranslation.md @@ -50,7 +50,7 @@ await foreach (DocumentStatusResult document in operation.Value) if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/samples/Sample2_PollIndividualDocuments.md b/sdk/translation/Azure.AI.Translation.Document/samples/Sample2_PollIndividualDocuments.md index 93acddbadcccb..37b347410b1f6 100644 --- a/sdk/translation/Azure.AI.Translation.Document/samples/Sample2_PollIndividualDocuments.md +++ b/sdk/translation/Azure.AI.Translation.Document/samples/Sample2_PollIndividualDocuments.md @@ -47,7 +47,7 @@ await foreach (DocumentStatusResult document in operation.GetAllDocumentStatuses if (responseDocumentStatus.Value.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/samples/Sample3_OperationsHistory.md b/sdk/translation/Azure.AI.Translation.Document/samples/Sample3_OperationsHistory.md index 9443636b3d5ab..e08db78b75904 100644 --- a/sdk/translation/Azure.AI.Translation.Document/samples/Sample3_OperationsHistory.md +++ b/sdk/translation/Azure.AI.Translation.Document/samples/Sample3_OperationsHistory.md @@ -26,7 +26,7 @@ int docsCancelled = 0; int docsSucceeded = 0; int docsFailed = 0; -await foreach (TranslationStatusResult translationStatus in client.GetTranslationsAsync()) +await foreach (TranslationStatusResult translationStatus in client.GetAllTranslationStatusesAsync()) { if (!translationStatus.HasCompleted) { diff --git a/sdk/translation/Azure.AI.Translation.Document/samples/Sample4_MultipleInputs.md b/sdk/translation/Azure.AI.Translation.Document/samples/Sample4_MultipleInputs.md index f7ab3bb55cbf1..7ce9c6c6d7588 100644 --- a/sdk/translation/Azure.AI.Translation.Document/samples/Sample4_MultipleInputs.md +++ b/sdk/translation/Azure.AI.Translation.Document/samples/Sample4_MultipleInputs.md @@ -57,7 +57,7 @@ await foreach (DocumentStatusResult document in operation.GetValuesAsync()) if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/src/DocumentStatusResult.cs b/sdk/translation/Azure.AI.Translation.Document/src/DocumentStatusResult.cs index 10c49cb40d765..7d9fdf651a92a 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/DocumentStatusResult.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/DocumentStatusResult.cs @@ -35,7 +35,7 @@ public partial class DocumentStatusResult /// This property will have a value only when the document was successfully processed. /// [CodeGenMember("To")] - public string TranslateTo { get; } + public string TranslatedTo { get; } /// /// The date time when the document was created. diff --git a/sdk/translation/Azure.AI.Translation.Document/src/DocumentTranslationClient.cs b/sdk/translation/Azure.AI.Translation.Document/src/DocumentTranslationClient.cs index 64f615c2b5994..5684374c44132 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/DocumentTranslationClient.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/DocumentTranslationClient.cs @@ -217,11 +217,11 @@ public virtual async Task StartTranslationAsync(Do /// Get the status results for all submitted translation operations. /// /// A controlling the request lifetime. - public virtual Pageable GetTranslations(CancellationToken cancellationToken = default) + public virtual Pageable GetAllTranslationStatuses(CancellationToken cancellationToken = default) { Page FirstPageFunc(int? pageSizeHint) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(DocumentTranslationClient)}.{nameof(GetTranslations)}"); + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(DocumentTranslationClient)}.{nameof(GetAllTranslationStatuses)}"); scope.Start(); try @@ -238,7 +238,7 @@ Page FirstPageFunc(int? pageSizeHint) Page NextPageFunc(string nextLink, int? pageSizeHint) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(DocumentTranslationClient)}.{nameof(GetTranslations)}"); + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(DocumentTranslationClient)}.{nameof(GetAllTranslationStatuses)}"); scope.Start(); try @@ -260,11 +260,11 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// Get the status results for all submitted translation operations. /// /// A controlling the request lifetime. - public virtual AsyncPageable GetTranslationsAsync(CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllTranslationStatusesAsync(CancellationToken cancellationToken = default) { async Task> FirstPageFunc(int? pageSizeHint) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(DocumentTranslationClient)}.{nameof(GetTranslations)}"); + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(DocumentTranslationClient)}.{nameof(GetAllTranslationStatuses)}"); scope.Start(); try @@ -281,7 +281,7 @@ async Task> FirstPageFunc(int? pageSizeHint) async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(DocumentTranslationClient)}.{nameof(GetTranslations)}"); + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(DocumentTranslationClient)}.{nameof(GetAllTranslationStatuses)}"); scope.Start(); try diff --git a/sdk/translation/Azure.AI.Translation.Document/src/Generated/BatchDocumentTranslationModelFactory.cs b/sdk/translation/Azure.AI.Translation.Document/src/Generated/BatchDocumentTranslationModelFactory.cs index ac58313aa0f21..04464861b9c5e 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/Generated/BatchDocumentTranslationModelFactory.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/Generated/BatchDocumentTranslationModelFactory.cs @@ -19,15 +19,15 @@ public static partial class BatchDocumentTranslationModelFactory /// Operation created date time. /// Date time in which the operation's status has been updated. /// List of possible statuses for job or document. - /// To language. + /// To language. /// This contains an outer error with error code, message, details, target and an inner error with more descriptive details. /// Progress of the translation if available. /// Document Id. /// Character charged by the API. /// A new instance for mocking. - public static DocumentStatusResult DocumentStatusResult(Uri translatedDocumentUri = default, Uri sourceDocumentUri = default, DateTimeOffset createdOn = default, DateTimeOffset lastModified = default, TranslationStatus status = default, string translateTo = default, DocumentTranslationError error = default, float progress = default, string documentId = default, long charactersCharged = default) + public static DocumentStatusResult DocumentStatusResult(Uri translatedDocumentUri = default, Uri sourceDocumentUri = default, DateTimeOffset createdOn = default, DateTimeOffset lastModified = default, TranslationStatus status = default, string translatedTo = default, DocumentTranslationError error = default, float progress = default, string documentId = default, long charactersCharged = default) { - return new DocumentStatusResult(translatedDocumentUri, sourceDocumentUri, createdOn, lastModified, status, translateTo, error, progress, documentId, charactersCharged); + return new DocumentStatusResult(translatedDocumentUri, sourceDocumentUri, createdOn, lastModified, status, translatedTo, error, progress, documentId, charactersCharged); } /// Initializes new instance of FileFormat class. diff --git a/sdk/translation/Azure.AI.Translation.Document/src/Generated/Models/DocumentStatusResult.cs b/sdk/translation/Azure.AI.Translation.Document/src/Generated/Models/DocumentStatusResult.cs index a998fc815b31a..d134d758bf25e 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/Generated/Models/DocumentStatusResult.cs +++ b/sdk/translation/Azure.AI.Translation.Document/src/Generated/Models/DocumentStatusResult.cs @@ -17,19 +17,19 @@ public partial class DocumentStatusResult /// Operation created date time. /// Date time in which the operation's status has been updated. /// List of possible statuses for job or document. - /// To language. + /// To language. /// Progress of the translation if available. /// Document Id. - /// , , or is null. - internal DocumentStatusResult(Uri sourceDocumentUri, DateTimeOffset createdOn, DateTimeOffset lastModified, TranslationStatus status, string translateTo, float progress, string documentId) + /// , , or is null. + internal DocumentStatusResult(Uri sourceDocumentUri, DateTimeOffset createdOn, DateTimeOffset lastModified, TranslationStatus status, string translatedTo, float progress, string documentId) { if (sourceDocumentUri == null) { throw new ArgumentNullException(nameof(sourceDocumentUri)); } - if (translateTo == null) + if (translatedTo == null) { - throw new ArgumentNullException(nameof(translateTo)); + throw new ArgumentNullException(nameof(translatedTo)); } if (documentId == null) { @@ -40,7 +40,7 @@ internal DocumentStatusResult(Uri sourceDocumentUri, DateTimeOffset createdOn, D CreatedOn = createdOn; LastModified = lastModified; Status = status; - TranslateTo = translateTo; + TranslatedTo = translatedTo; Progress = progress; DocumentId = documentId; } @@ -51,19 +51,19 @@ internal DocumentStatusResult(Uri sourceDocumentUri, DateTimeOffset createdOn, D /// Operation created date time. /// Date time in which the operation's status has been updated. /// List of possible statuses for job or document. - /// To language. + /// To language. /// This contains an outer error with error code, message, details, target and an inner error with more descriptive details. /// Progress of the translation if available. /// Document Id. /// Character charged by the API. - internal DocumentStatusResult(Uri translatedDocumentUri, Uri sourceDocumentUri, DateTimeOffset createdOn, DateTimeOffset lastModified, TranslationStatus status, string translateTo, DocumentTranslationError error, float progress, string documentId, long charactersCharged) + internal DocumentStatusResult(Uri translatedDocumentUri, Uri sourceDocumentUri, DateTimeOffset createdOn, DateTimeOffset lastModified, TranslationStatus status, string translatedTo, DocumentTranslationError error, float progress, string documentId, long charactersCharged) { TranslatedDocumentUri = translatedDocumentUri; SourceDocumentUri = sourceDocumentUri; CreatedOn = createdOn; LastModified = lastModified; Status = status; - TranslateTo = translateTo; + TranslatedTo = translatedTo; Error = error; Progress = progress; DocumentId = documentId; diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/DocumentTranslationClientLiveTests.cs b/sdk/translation/Azure.AI.Translation.Document/tests/DocumentTranslationClientLiveTests.cs index 419a1b65734f8..d09504da770a3 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/DocumentTranslationClientLiveTests.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/DocumentTranslationClientLiveTests.cs @@ -75,7 +75,7 @@ public async Task GetGlossaryFormatsTest(bool usetokenCredential) [RecordedTest] [TestCase(true)] [TestCase(false)] - public async Task GetTranslationsTest(bool usetokenCredential) + public async Task GetAllTranslationStatusesTest(bool usetokenCredential) { Uri source = await CreateSourceContainerAsync(oneTestDocuments); Uri target = await CreateTargetContainerAsync(); @@ -85,7 +85,7 @@ public async Task GetTranslationsTest(bool usetokenCredential) var input = new DocumentTranslationInput(source, target, "fr"); await client.StartTranslationAsync(input); - List translations = await client.GetTranslationsAsync().ToEnumerableAsync(); + List translations = await client.GetAllTranslationStatusesAsync().ToEnumerableAsync(); Assert.GreaterOrEqual(translations.Count, 1); TranslationStatusResult oneTranslation = translations[0]; diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest(False).json b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetAllTranslationStatusesTest(False).json similarity index 100% rename from sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest(False).json rename to sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetAllTranslationStatusesTest(False).json diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest(False)Async.json b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetAllTranslationStatusesTest(False)Async.json similarity index 100% rename from sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest(False)Async.json rename to sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetAllTranslationStatusesTest(False)Async.json diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest(True).json b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetAllTranslationStatusesTest(True).json similarity index 100% rename from sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest(True).json rename to sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetAllTranslationStatusesTest(True).json diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest(True)Async.json b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetAllTranslationStatusesTest(True)Async.json similarity index 100% rename from sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest(True)Async.json rename to sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetAllTranslationStatusesTest(True)Async.json diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest.json b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest.json deleted file mode 100644 index d09892a955179..0000000000000 --- a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTest.json +++ /dev/null @@ -1,524 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://mariaridoctrans29prim.blob.core.windows.net/source2087956099?restype=container", - "RequestMethod": "PUT", - "RequestHeaders": { - "Authorization": "Sanitized", - "traceparent": "00-34b4bef3cbc68e408c723ace032341a9-fca88e540544794b-00", - "User-Agent": "azsdk-net-Storage.Blobs/12.8.0 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-blob-public-access": "container", - "x-ms-client-request-id": "04802d603315cdbd8a06d93cece51130", - "x-ms-date": "Mon, 24 May 2021 21:24:02 GMT", - "x-ms-return-client-request-id": "true", - "x-ms-version": "2020-04-08" - }, - "RequestBody": null, - "StatusCode": 201, - "ResponseHeaders": { - "Content-Length": "0", - "Date": "Mon, 24 May 2021 21:24:01 GMT", - "ETag": "\u00220x8D91EFA409C9B71\u0022", - "Last-Modified": "Mon, 24 May 2021 21:24:02 GMT", - "Server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "04802d603315cdbd8a06d93cece51130", - "x-ms-request-id": "eb23ffa3-001e-0038-05e3-504c92000000", - "x-ms-version": "2020-04-08" - }, - "ResponseBody": [] - }, - { - "RequestUri": "https://mariaridoctrans29prim.blob.core.windows.net/source2087956099/Document1.txt", - "RequestMethod": "PUT", - "RequestHeaders": { - "Authorization": "Sanitized", - "Content-Length": "27", - "If-None-Match": "*", - "traceparent": "00-49a664b27beb2845a20d72b0e32205fc-49ee3ee2d0598f4a-00", - "User-Agent": "azsdk-net-Storage.Blobs/12.8.0 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "99dabdac3f23897af23fb53cc7bda313", - "x-ms-date": "Mon, 24 May 2021 21:24:02 GMT", - "x-ms-return-client-request-id": "true", - "x-ms-version": "2020-04-08" - }, - "RequestBody": "Rmlyc3QgZW5nbGlzaCB0ZXN0IGRvY3VtZW50", - "StatusCode": 201, - "ResponseHeaders": { - "Content-Length": "0", - "Content-MD5": "zc6asiLoUz/caxlJ6YwKxA==", - "Date": "Mon, 24 May 2021 21:24:01 GMT", - "ETag": "\u00220x8D91EFA40AA1031\u0022", - "Last-Modified": "Mon, 24 May 2021 21:24:02 GMT", - "Server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "99dabdac3f23897af23fb53cc7bda313", - "x-ms-content-crc64": "V7knc5S52gk=", - "x-ms-request-id": "eb23ffbb-001e-0038-19e3-504c92000000", - "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-04-08" - }, - "ResponseBody": [] - }, - { - "RequestUri": "https://mariaridoctrans29prim.blob.core.windows.net/target1899103900?restype=container", - "RequestMethod": "PUT", - "RequestHeaders": { - "Authorization": "Sanitized", - "traceparent": "00-82bd610cc5ec86409e2b9e795e3fd57b-01f41e9bf2d2fb44-00", - "User-Agent": "azsdk-net-Storage.Blobs/12.8.0 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-blob-public-access": "container", - "x-ms-client-request-id": "e39d335e8dbd2e93cf756dd29337abde", - "x-ms-date": "Mon, 24 May 2021 21:24:02 GMT", - "x-ms-return-client-request-id": "true", - "x-ms-version": "2020-04-08" - }, - "RequestBody": null, - "StatusCode": 201, - "ResponseHeaders": { - "Content-Length": "0", - "Date": "Mon, 24 May 2021 21:24:01 GMT", - "ETag": "\u00220x8D91EFA40B1FC09\u0022", - "Last-Modified": "Mon, 24 May 2021 21:24:02 GMT", - "Server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "e39d335e8dbd2e93cf756dd29337abde", - "x-ms-request-id": "eb23ffdf-001e-0038-39e3-504c92000000", - "x-ms-version": "2020-04-08" - }, - "ResponseBody": [] - }, - { - "RequestUri": "https://mariaridoctrans29-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0/batches", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Content-Length": "103", - "Content-Type": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-1d12c35b0883f74fbbc72c1e6ba08bad-5c65f6efe992a346-00", - "User-Agent": "azsdk-net-AI.Translation.Document/1.0.0-alpha.20210524.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "0296cb6d6076b320f611d67d8006cd63", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "inputs": [ - { - "source": { - "sourceUrl": "Sanitized" - }, - "targets": [ - { - "targetUrl": "Sanitized", - "language": "fr" - } - ] - } - ] - }, - "StatusCode": 202, - "ResponseHeaders": { - "apim-request-id": "e4dfc9ab-81d5-4275-959f-6a76ee0683ce", - "Content-Length": "0", - "Date": "Mon, 24 May 2021 21:24:02 GMT", - "Operation-Location": "https://mariaridoctrans29-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/b8f1c2c1-d4d2-4c84-b1c3-3769b13fda06", - "Set-Cookie": [ - "ARRAffinity=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com", - "ARRAffinitySameSite=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com" - ], - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "X-Powered-By": "ASP.NET", - "X-RequestId": "e4dfc9ab-81d5-4275-959f-6a76ee0683ce" - }, - "ResponseBody": [] - }, - { - "RequestUri": "https://mariaridoctrans29-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0/batches", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-eda8e102937ef24698699172ec1fe461-f2eabe8840fe1144-00", - "User-Agent": "azsdk-net-AI.Translation.Document/1.0.0-alpha.20210524.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "b18e9fc54d742fef466b54ca0cb75f07", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "apim-request-id": "eea13d71-6251-44af-8a89-e75ad00f8c5e", - "Cache-Control": [ - "public", - "max-age=1" - ], - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 24 May 2021 21:24:02 GMT", - "ETag": "\u00224FDBCC0AF70D03F8E88E28309BA26C1B82F00248628ABBF17C0448F31DEFE170\u0022", - "Retry-After": "1", - "Set-Cookie": [ - "ARRAffinity=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com", - "ARRAffinitySameSite=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com" - ], - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "Transfer-Encoding": "chunked", - "x-content-type-options": "nosniff", - "X-Powered-By": "ASP.NET", - "X-RequestId": "eea13d71-6251-44af-8a89-e75ad00f8c5e" - }, - "ResponseBody": { - "value": [ - { - "id": "b8f1c2c1-d4d2-4c84-b1c3-3769b13fda06", - "createdDateTimeUtc": "2021-05-24T21:24:02.8533664Z", - "lastActionDateTimeUtc": "2021-05-24T21:24:03.067879Z", - "status": "NotStarted", - "summary": { - "total": 1, - "failed": 0, - "success": 0, - "inProgress": 0, - "notYetStarted": 1, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "4a88cf5a-6c56-4a37-a82f-f50e69aa270e", - "createdDateTimeUtc": "2021-05-18T17:16:40.5861751Z", - "lastActionDateTimeUtc": "2021-05-18T17:16:41.8157719Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "998e924e-7865-4130-b219-10ff047b2618", - "createdDateTimeUtc": "2021-05-18T17:16:39.675925Z", - "lastActionDateTimeUtc": "2021-05-18T17:16:41.0477773Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "6d6d4baf-c81e-4d8a-9274-b3fd7dd753a0", - "createdDateTimeUtc": "2021-05-18T17:05:20.5002265Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:21.0522225Z", - "status": "Failed", - "summary": { - "total": 1, - "failed": 1, - "success": 0, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "1d607ede-d0b5-41c7-84e1-7b3d743e2a48", - "createdDateTimeUtc": "2021-05-18T17:05:17.0026411Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:18.0215402Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "1e9336c2-08f0-4d67-8927-d4ae7b2aa81b", - "createdDateTimeUtc": "2021-05-18T17:05:14.4137152Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:15.0265757Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 24 - } - }, - { - "id": "d3fd0fee-6380-4406-baf1-95d33d22d6e3", - "createdDateTimeUtc": "2021-05-18T17:05:07.6301114Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:12.0230202Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "229727c6-c0f0-49d8-9eae-c542b97b1126", - "createdDateTimeUtc": "2021-05-18T17:04:59.7894086Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:04.9514584Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "d7caa4a2-cd6a-4ecf-b688-92bac5bb6af2", - "createdDateTimeUtc": "2021-05-18T17:04:47.7973823Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:57.8803476Z", - "status": "Succeeded", - "summary": { - "total": 2, - "failed": 0, - "success": 2, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 54 - } - }, - { - "id": "97dd054a-db3f-4fae-933b-b3cacd7528c9", - "createdDateTimeUtc": "2021-05-18T17:04:36.6390065Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:39.9288355Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "4a6581db-6c91-438b-aec7-844632f12ee2", - "createdDateTimeUtc": "2021-05-18T17:04:35.1691359Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:35.3207154Z", - "status": "Failed", - "summary": { - "total": 1, - "failed": 1, - "success": 0, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "f2321e9d-6773-4a0f-98e3-8685dcee6872", - "createdDateTimeUtc": "2021-05-18T17:04:26.2386509Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:27.887757Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "9ff2564e-f58e-4941-a6b2-74b014676e8c", - "createdDateTimeUtc": "2021-05-18T17:04:21.4974969Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:24.8796173Z", - "status": "Failed", - "summary": { - "total": 1, - "failed": 1, - "success": 0, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "0de2f72b-cd84-4101-9928-e7857c0fbd53", - "createdDateTimeUtc": "2021-05-18T17:04:14.5028182Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:17.7418467Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "567f0c80-f355-4ef6-b7ac-b74d63210a94", - "createdDateTimeUtc": "2021-05-18T17:04:09.8123313Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:10.7428928Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 24 - } - }, - { - "id": "3834bb47-c37d-4d02-ad47-4e75bdb47f87", - "createdDateTimeUtc": "2021-05-18T17:03:59.7602966Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:03.6054066Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "dc89be6e-1cfa-4b4c-9ed1-ecb061ef2c65", - "createdDateTimeUtc": "2021-05-18T17:03:45.215021Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:48.8885884Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "cabba550-35bb-403c-bd68-5d813c2e2d8b", - "createdDateTimeUtc": "2021-05-18T17:03:32.4417835Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:39.9911996Z", - "status": "Succeeded", - "summary": { - "total": 2, - "failed": 0, - "success": 2, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 54 - } - }, - { - "id": "4e85f66c-e171-4b28-9ef4-ad5975ed74df", - "createdDateTimeUtc": "2021-05-18T17:03:26.6503481Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:27.864941Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "bfbff018-5abc-4079-ad68-a5eed83add0c", - "createdDateTimeUtc": "2021-05-18T17:03:25.0910184Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:25.3802838Z", - "status": "Failed", - "summary": { - "total": 1, - "failed": 1, - "success": 0, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "3bc0d235-b128-4e6a-83b6-71dfdc757c85", - "createdDateTimeUtc": "2021-05-18T17:03:10.3667712Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:13.072347Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "4afcf6d5-e50e-4892-abce-e305432c9913", - "createdDateTimeUtc": "2021-05-18T17:03:09.8243463Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:13.0653758Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "2b900328-62ff-4687-a845-8a60a3f1ae63", - "createdDateTimeUtc": "2021-05-18T17:03:07.2518801Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:13.073735Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - } - ] - } - } - ], - "Variables": { - "DOCUMENT_TRANSLATION_API_KEY": "Sanitized", - "DOCUMENT_TRANSLATION_CONNECTION_STRING": "DefaultEndpointsProtocol=https;AccountName=mariaridoctrans29prim;AccountKey=Kg==;EndpointSuffix=core.windows.net", - "DOCUMENT_TRANSLATION_ENDPOINT": "https://mariaridoctrans29-doctranslation.cognitiveservices.azure.com", - "RandomSeed": "565318445" - } -} \ No newline at end of file diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTestAsync.json b/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTestAsync.json deleted file mode 100644 index f81860869f540..0000000000000 --- a/sdk/translation/Azure.AI.Translation.Document/tests/SessionRecords/DocumentTranslationClientLiveTests/GetTranslationsTestAsync.json +++ /dev/null @@ -1,525 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://mariaridoctrans29prim.blob.core.windows.net/source276808845?restype=container", - "RequestMethod": "PUT", - "RequestHeaders": { - "Authorization": "Sanitized", - "traceparent": "00-135acc28280f8d4f8724d021f4fa3563-fdb41042b7479e45-00", - "User-Agent": "azsdk-net-Storage.Blobs/12.8.0 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-blob-public-access": "container", - "x-ms-client-request-id": "bb76e629025a60b1f55c7d0e8913bf7a", - "x-ms-date": "Mon, 24 May 2021 21:24:03 GMT", - "x-ms-return-client-request-id": "true", - "x-ms-version": "2020-04-08" - }, - "RequestBody": null, - "StatusCode": 201, - "ResponseHeaders": { - "Content-Length": "0", - "Date": "Mon, 24 May 2021 21:24:02 GMT", - "ETag": "\u00220x8D91EFA416454F0\u0022", - "Last-Modified": "Mon, 24 May 2021 21:24:03 GMT", - "Server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "bb76e629025a60b1f55c7d0e8913bf7a", - "x-ms-request-id": "eb240208-001e-0038-14e3-504c92000000", - "x-ms-version": "2020-04-08" - }, - "ResponseBody": [] - }, - { - "RequestUri": "https://mariaridoctrans29prim.blob.core.windows.net/source276808845/Document1.txt", - "RequestMethod": "PUT", - "RequestHeaders": { - "Authorization": "Sanitized", - "Content-Length": "27", - "If-None-Match": "*", - "traceparent": "00-07dacbb761fef04db12b12c4e81f4dff-48a7ebdc52c16041-00", - "User-Agent": "azsdk-net-Storage.Blobs/12.8.0 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-blob-type": "BlockBlob", - "x-ms-client-request-id": "6e14789f1d7220e5f0476a6df4872698", - "x-ms-date": "Mon, 24 May 2021 21:24:03 GMT", - "x-ms-return-client-request-id": "true", - "x-ms-version": "2020-04-08" - }, - "RequestBody": "Rmlyc3QgZW5nbGlzaCB0ZXN0IGRvY3VtZW50", - "StatusCode": 201, - "ResponseHeaders": { - "Content-Length": "0", - "Content-MD5": "zc6asiLoUz/caxlJ6YwKxA==", - "Date": "Mon, 24 May 2021 21:24:02 GMT", - "ETag": "\u00220x8D91EFA417106CB\u0022", - "Last-Modified": "Mon, 24 May 2021 21:24:03 GMT", - "Server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "6e14789f1d7220e5f0476a6df4872698", - "x-ms-content-crc64": "V7knc5S52gk=", - "x-ms-request-id": "eb24021e-001e-0038-24e3-504c92000000", - "x-ms-request-server-encrypted": "true", - "x-ms-version": "2020-04-08" - }, - "ResponseBody": [] - }, - { - "RequestUri": "https://mariaridoctrans29prim.blob.core.windows.net/target1066258783?restype=container", - "RequestMethod": "PUT", - "RequestHeaders": { - "Authorization": "Sanitized", - "traceparent": "00-7c006b401b9d6b43ad290ccda479009d-55b14e332edb5440-00", - "User-Agent": "azsdk-net-Storage.Blobs/12.8.0 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-blob-public-access": "container", - "x-ms-client-request-id": "a48a8f1635f7a5d3abf29acff4704017", - "x-ms-date": "Mon, 24 May 2021 21:24:03 GMT", - "x-ms-return-client-request-id": "true", - "x-ms-version": "2020-04-08" - }, - "RequestBody": null, - "StatusCode": 201, - "ResponseHeaders": { - "Content-Length": "0", - "Date": "Mon, 24 May 2021 21:24:02 GMT", - "ETag": "\u00220x8D91EFA41765989\u0022", - "Last-Modified": "Mon, 24 May 2021 21:24:03 GMT", - "Server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", - "x-ms-client-request-id": "a48a8f1635f7a5d3abf29acff4704017", - "x-ms-request-id": "eb240236-001e-0038-39e3-504c92000000", - "x-ms-version": "2020-04-08" - }, - "ResponseBody": [] - }, - { - "RequestUri": "https://mariaridoctrans29-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0/batches", - "RequestMethod": "POST", - "RequestHeaders": { - "Accept": "application/json", - "Content-Length": "103", - "Content-Type": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-6d086da6b9bedf4ab96eff5892eeb386-c7afe9aa4bdd6d4a-00", - "User-Agent": "azsdk-net-AI.Translation.Document/1.0.0-alpha.20210524.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "221b7e941a2f000b56ca1297436c6d36", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": { - "inputs": [ - { - "source": { - "sourceUrl": "Sanitized" - }, - "targets": [ - { - "targetUrl": "Sanitized", - "language": "fr" - } - ] - } - ] - }, - "StatusCode": 202, - "ResponseHeaders": { - "apim-request-id": "154e2c6d-e4de-44ab-821b-6547b7adf545", - "Content-Length": "0", - "Date": "Mon, 24 May 2021 21:24:04 GMT", - "Operation-Location": "https://mariaridoctrans29-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/06b617b7-02b6-4210-827c-e6f872088c27", - "Set-Cookie": [ - "ARRAffinity=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com", - "ARRAffinitySameSite=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com" - ], - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "X-Powered-By": "ASP.NET", - "X-RequestId": "154e2c6d-e4de-44ab-821b-6547b7adf545" - }, - "ResponseBody": [] - }, - { - "RequestUri": "https://mariaridoctrans29-doctranslation.cognitiveservices.azure.com/translator/text/batch/v1.0/batches", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Ocp-Apim-Subscription-Key": "Sanitized", - "traceparent": "00-328835f6b99e9b4699e91810e365caa2-e31048c677f5cd4b-00", - "User-Agent": "azsdk-net-AI.Translation.Document/1.0.0-alpha.20210524.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", - "x-ms-client-request-id": "8472afe4d63442a840c9c62b4b50fcd7", - "x-ms-return-client-request-id": "true" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "Age": "0", - "apim-request-id": "c0b5e2d2-f33a-4132-bf62-8b0f2ade6b12", - "Cache-Control": [ - "public", - "max-age=1" - ], - "Content-Length": "6727", - "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 24 May 2021 21:24:04 GMT", - "ETag": "\u00224FDBCC0AF70D03F8E88E28309BA26C1B82F00248628ABBF17C0448F31DEFE170\u0022", - "Retry-After": "1", - "Set-Cookie": [ - "ARRAffinity=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com", - "ARRAffinitySameSite=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com" - ], - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", - "x-content-type-options": "nosniff", - "X-Powered-By": "ASP.NET", - "X-RequestId": "eea13d71-6251-44af-8a89-e75ad00f8c5e" - }, - "ResponseBody": { - "value": [ - { - "id": "b8f1c2c1-d4d2-4c84-b1c3-3769b13fda06", - "createdDateTimeUtc": "2021-05-24T21:24:02.8533664Z", - "lastActionDateTimeUtc": "2021-05-24T21:24:03.067879Z", - "status": "NotStarted", - "summary": { - "total": 1, - "failed": 0, - "success": 0, - "inProgress": 0, - "notYetStarted": 1, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "4a88cf5a-6c56-4a37-a82f-f50e69aa270e", - "createdDateTimeUtc": "2021-05-18T17:16:40.5861751Z", - "lastActionDateTimeUtc": "2021-05-18T17:16:41.8157719Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "998e924e-7865-4130-b219-10ff047b2618", - "createdDateTimeUtc": "2021-05-18T17:16:39.675925Z", - "lastActionDateTimeUtc": "2021-05-18T17:16:41.0477773Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "6d6d4baf-c81e-4d8a-9274-b3fd7dd753a0", - "createdDateTimeUtc": "2021-05-18T17:05:20.5002265Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:21.0522225Z", - "status": "Failed", - "summary": { - "total": 1, - "failed": 1, - "success": 0, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "1d607ede-d0b5-41c7-84e1-7b3d743e2a48", - "createdDateTimeUtc": "2021-05-18T17:05:17.0026411Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:18.0215402Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "1e9336c2-08f0-4d67-8927-d4ae7b2aa81b", - "createdDateTimeUtc": "2021-05-18T17:05:14.4137152Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:15.0265757Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 24 - } - }, - { - "id": "d3fd0fee-6380-4406-baf1-95d33d22d6e3", - "createdDateTimeUtc": "2021-05-18T17:05:07.6301114Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:12.0230202Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "229727c6-c0f0-49d8-9eae-c542b97b1126", - "createdDateTimeUtc": "2021-05-18T17:04:59.7894086Z", - "lastActionDateTimeUtc": "2021-05-18T17:05:04.9514584Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "d7caa4a2-cd6a-4ecf-b688-92bac5bb6af2", - "createdDateTimeUtc": "2021-05-18T17:04:47.7973823Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:57.8803476Z", - "status": "Succeeded", - "summary": { - "total": 2, - "failed": 0, - "success": 2, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 54 - } - }, - { - "id": "97dd054a-db3f-4fae-933b-b3cacd7528c9", - "createdDateTimeUtc": "2021-05-18T17:04:36.6390065Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:39.9288355Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "4a6581db-6c91-438b-aec7-844632f12ee2", - "createdDateTimeUtc": "2021-05-18T17:04:35.1691359Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:35.3207154Z", - "status": "Failed", - "summary": { - "total": 1, - "failed": 1, - "success": 0, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "f2321e9d-6773-4a0f-98e3-8685dcee6872", - "createdDateTimeUtc": "2021-05-18T17:04:26.2386509Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:27.887757Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "9ff2564e-f58e-4941-a6b2-74b014676e8c", - "createdDateTimeUtc": "2021-05-18T17:04:21.4974969Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:24.8796173Z", - "status": "Failed", - "summary": { - "total": 1, - "failed": 1, - "success": 0, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "0de2f72b-cd84-4101-9928-e7857c0fbd53", - "createdDateTimeUtc": "2021-05-18T17:04:14.5028182Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:17.7418467Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "567f0c80-f355-4ef6-b7ac-b74d63210a94", - "createdDateTimeUtc": "2021-05-18T17:04:09.8123313Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:10.7428928Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 24 - } - }, - { - "id": "3834bb47-c37d-4d02-ad47-4e75bdb47f87", - "createdDateTimeUtc": "2021-05-18T17:03:59.7602966Z", - "lastActionDateTimeUtc": "2021-05-18T17:04:03.6054066Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "dc89be6e-1cfa-4b4c-9ed1-ecb061ef2c65", - "createdDateTimeUtc": "2021-05-18T17:03:45.215021Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:48.8885884Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "cabba550-35bb-403c-bd68-5d813c2e2d8b", - "createdDateTimeUtc": "2021-05-18T17:03:32.4417835Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:39.9911996Z", - "status": "Succeeded", - "summary": { - "total": 2, - "failed": 0, - "success": 2, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 54 - } - }, - { - "id": "4e85f66c-e171-4b28-9ef4-ad5975ed74df", - "createdDateTimeUtc": "2021-05-18T17:03:26.6503481Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:27.864941Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "bfbff018-5abc-4079-ad68-a5eed83add0c", - "createdDateTimeUtc": "2021-05-18T17:03:25.0910184Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:25.3802838Z", - "status": "Failed", - "summary": { - "total": 1, - "failed": 1, - "success": 0, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 0 - } - }, - { - "id": "3bc0d235-b128-4e6a-83b6-71dfdc757c85", - "createdDateTimeUtc": "2021-05-18T17:03:10.3667712Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:13.072347Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "4afcf6d5-e50e-4892-abce-e305432c9913", - "createdDateTimeUtc": "2021-05-18T17:03:09.8243463Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:13.0653758Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - }, - { - "id": "2b900328-62ff-4687-a845-8a60a3f1ae63", - "createdDateTimeUtc": "2021-05-18T17:03:07.2518801Z", - "lastActionDateTimeUtc": "2021-05-18T17:03:13.073735Z", - "status": "Succeeded", - "summary": { - "total": 1, - "failed": 0, - "success": 1, - "inProgress": 0, - "notYetStarted": 0, - "cancelled": 0, - "totalCharacterCharged": 27 - } - } - ] - } - } - ], - "Variables": { - "DOCUMENT_TRANSLATION_API_KEY": "Sanitized", - "DOCUMENT_TRANSLATION_CONNECTION_STRING": "DefaultEndpointsProtocol=https;AccountName=mariaridoctrans29prim;AccountKey=Kg==;EndpointSuffix=core.windows.net", - "DOCUMENT_TRANSLATION_ENDPOINT": "https://mariaridoctrans29-doctranslation.cognitiveservices.azure.com", - "RandomSeed": "1583979453" - } -} \ No newline at end of file diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/TranslationOperationLiveTests.cs b/sdk/translation/Azure.AI.Translation.Document/tests/TranslationOperationLiveTests.cs index be6f68f23b648..70e21b2570bbb 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/TranslationOperationLiveTests.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/TranslationOperationLiveTests.cs @@ -219,7 +219,7 @@ public async Task SingleSourceSingleTargetListDocumentsTest() Assert.AreEqual(documentsFromOperationList[0].SourceDocumentUri, documentsFromGetAllList[0].SourceDocumentUri); Assert.AreEqual(documentsFromOperationList[0].TranslatedDocumentUri, documentsFromGetAllList[0].TranslatedDocumentUri); Assert.AreEqual(documentsFromOperationList[0].TranslationProgressPercentage, documentsFromGetAllList[0].TranslationProgressPercentage); - Assert.AreEqual(documentsFromOperationList[0].TranslateTo, documentsFromGetAllList[0].TranslateTo); + Assert.AreEqual(documentsFromOperationList[0].TranslatedTo, documentsFromGetAllList[0].TranslatedTo); Assert.AreEqual(documentsFromOperationList[0].CreatedOn, documentsFromGetAllList[0].CreatedOn); // Ignore because of flaky behavior. Service issue has been created. // https://github.com/Azure/azure-sdk-for-net/issues/20116 @@ -413,7 +413,7 @@ private void CheckDocumentStatusResult(DocumentStatusResult document, string tra Assert.IsNotNull(document.SourceDocumentUri); Assert.IsNotNull(document.TranslatedDocumentUri); Assert.AreEqual(100f, document.TranslationProgressPercentage); - Assert.AreEqual(translateTo, document.TranslateTo); + Assert.AreEqual(translateTo, document.TranslatedTo); Assert.AreNotEqual(new DateTimeOffset(), document.CreatedOn); Assert.AreNotEqual(new DateTimeOffset(), document.LastModified); } diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_MultipleInputs.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_MultipleInputs.cs index 4b48419f5de36..68518224d5855 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_MultipleInputs.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_MultipleInputs.cs @@ -82,7 +82,7 @@ public void MultipleInputs() if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_MultipleInputsAsync.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_MultipleInputsAsync.cs index 5045d5bf6eec9..a151cec0dc7ec 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_MultipleInputsAsync.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_MultipleInputsAsync.cs @@ -55,7 +55,7 @@ public async Task MultipleInputsAsync() if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_OperationsHistory.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_OperationsHistory.cs index bb8922249100d..3b9d4d0edf4c5 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_OperationsHistory.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_OperationsHistory.cs @@ -31,7 +31,7 @@ public void OperationsHistory() TimeSpan pollingInterval = new(1000); - foreach (TranslationStatusResult translationStatus in client.GetTranslations()) + foreach (TranslationStatusResult translationStatus in client.GetAllTranslationStatuses()) { if (!translationStatus.HasCompleted) { diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_OperationsHistoryAsync.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_OperationsHistoryAsync.cs index e55c2f3a4d0dd..c5ed6a575887a 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_OperationsHistoryAsync.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_OperationsHistoryAsync.cs @@ -28,7 +28,7 @@ public async Task OperationsHistoryAsync() int docsSucceeded = 0; int docsFailed = 0; - await foreach (TranslationStatusResult translationStatus in client.GetTranslationsAsync()) + await foreach (TranslationStatusResult translationStatus in client.GetAllTranslationStatusesAsync()) { if (!translationStatus.HasCompleted) { diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_PollIndividualDocuments.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_PollIndividualDocuments.cs index 5a84087731a69..786a592e04fc8 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_PollIndividualDocuments.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_PollIndividualDocuments.cs @@ -50,7 +50,7 @@ public void PollIndividualDocuments() if (responseDocumentStatus.Value.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_PollIndividualDocumentsAsync.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_PollIndividualDocumentsAsync.cs index fb5535dfcec77..4504333be70d7 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_PollIndividualDocumentsAsync.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_PollIndividualDocumentsAsync.cs @@ -51,7 +51,7 @@ public async Task PollIndividualDocumentsAsync() if (responseDocumentStatus.Value.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslation.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslation.cs index dcc12900f8226..dde92fadfbb59 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslation.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslation.cs @@ -65,7 +65,7 @@ public void StartTranslation() if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslationAsync.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslationAsync.cs index 1eac680d0118d..b153dbf12f25c 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslationAsync.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslationAsync.cs @@ -47,7 +47,7 @@ public async Task StartTranslationAsync() if (document.Status == TranslationStatus.Succeeded) { Console.WriteLine($" Translated Document Uri: {document.TranslatedDocumentUri}"); - Console.WriteLine($" Translated to language: {document.TranslateTo}."); + Console.WriteLine($" Translated to language: {document.TranslatedTo}."); Console.WriteLine($" Document source Uri: {document.SourceDocumentUri}"); } else diff --git a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslationWithAzureBlob.cs b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslationWithAzureBlob.cs index f16eb79edb727..e35ec72993c77 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslationWithAzureBlob.cs +++ b/sdk/translation/Azure.AI.Translation.Document/tests/samples/Sample_StartTranslationWithAzureBlob.cs @@ -101,7 +101,7 @@ This sample demonstrates how to use Azure Blob Storage to set up the necessary r { if (document.Status == TranslationStatus.Succeeded) { - Console.WriteLine($"Document at {document.SourceDocumentUri} was translated to {document.TranslateTo} language.You can find translated document at {document.TranslatedDocumentUri}"); + Console.WriteLine($"Document at {document.SourceDocumentUri} was translated to {document.TranslatedTo} language.You can find translated document at {document.TranslatedDocumentUri}"); } else {