diff --git a/sdk/documenttranslation/Azure.AI.DocumentTranslation/src/DocumentTranslationClient.cs b/sdk/documenttranslation/Azure.AI.DocumentTranslation/src/DocumentTranslationClient.cs index da52dd172c5e5..97f7b37fb8e42 100644 --- a/sdk/documenttranslation/Azure.AI.DocumentTranslation/src/DocumentTranslationClient.cs +++ b/sdk/documenttranslation/Azure.AI.DocumentTranslation/src/DocumentTranslationClient.cs @@ -159,7 +159,7 @@ public virtual async Task StartTranslationAsync(Li /// /// /// - public virtual DocumentTranslationOperation StartTranslation(Uri sourceUrl, Uri targetUrl, string targetLanguage, List glossaries, TranslationOperationOptions options, CancellationToken cancellationToken = default) + public virtual DocumentTranslationOperation StartTranslation(Uri sourceUrl, Uri targetUrl, string targetLanguage, List glossaries = default, TranslationOperationOptions options = default, CancellationToken cancellationToken = default) { var source = new SourceConfiguration(sourceUrl.AbsoluteUri) { @@ -207,7 +207,7 @@ public virtual DocumentTranslationOperation StartTranslation(Uri sourceUrl, Uri /// /// /// - public virtual async Task StartTranslationAsync(Uri sourceUrl, Uri targetUrl, string targetLanguage, List glossaries, TranslationOperationOptions options, CancellationToken cancellationToken = default) + public virtual async Task StartTranslationAsync(Uri sourceUrl, Uri targetUrl, string targetLanguage, List glossaries = default, TranslationOperationOptions options = default, CancellationToken cancellationToken = default) { var source = new SourceConfiguration(sourceUrl.AbsoluteUri) { diff --git a/sdk/documenttranslation/Azure.AI.DocumentTranslation/tests/samples/Sample_TranslateOperation.cs b/sdk/documenttranslation/Azure.AI.DocumentTranslation/tests/samples/Sample_TranslateOperation.cs index e5c798e5e911e..c7f67bf8941d5 100644 --- a/sdk/documenttranslation/Azure.AI.DocumentTranslation/tests/samples/Sample_TranslateOperation.cs +++ b/sdk/documenttranslation/Azure.AI.DocumentTranslation/tests/samples/Sample_TranslateOperation.cs @@ -24,17 +24,7 @@ public void TranslateOperation() var client = new DocumentTranslationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); - var glossaries = new List() - { - new TranslationGlossary(glossaryUrl) - }; - - var options = new TranslationOperationOptions - { - StorageType = StorageType.Folder - }; - - DocumentTranslationOperation operation = client.StartTranslation(sourceUrl, targetUrl, "it", glossaries, options); + DocumentTranslationOperation operation = client.StartTranslation(sourceUrl, targetUrl, "it"); TimeSpan pollingInterval = new TimeSpan(1000); diff --git a/sdk/documenttranslation/Azure.AI.DocumentTranslation/tests/samples/Sample_TranslateOperationAsync.cs b/sdk/documenttranslation/Azure.AI.DocumentTranslation/tests/samples/Sample_TranslateOperationAsync.cs index f6a85af24b806..eceef74bc4fe8 100644 --- a/sdk/documenttranslation/Azure.AI.DocumentTranslation/tests/samples/Sample_TranslateOperationAsync.cs +++ b/sdk/documenttranslation/Azure.AI.DocumentTranslation/tests/samples/Sample_TranslateOperationAsync.cs @@ -24,17 +24,7 @@ public async Task TranslateOperationAsync() var client = new DocumentTranslationClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); - var glossaries = new List() - { - new TranslationGlossary(glossaryUrl) - }; - - var options = new TranslationOperationOptions - { - StorageType = StorageType.Folder - }; - - DocumentTranslationOperation operation = client.StartTranslation(sourceUrl, targetUrl, "it", glossaries, options); + DocumentTranslationOperation operation = client.StartTranslation(sourceUrl, targetUrl, "it"); Response> operationResult = await operation.WaitForCompletionAsync();