From 4270ff73f1ae1b504f55714720d0c74677a52523 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 12 Dec 2024 20:02:16 +0000 Subject: [PATCH] CodeGen from PR 31861 in Azure/azure-rest-api-specs Merge 03e39aaee83eb36af93e892a0f7beda050372fa0 into 85ed8fc06e19c902c95b531cbd8a643428d5f28d --- .../Docs/DocumentIntelligenceClient.xml | 26 ++++++++++++++----- .../Samples_DocumentIntelligenceClient.cs | 26 ++++++++++++++----- .../tsp-location.yaml | 3 ++- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceClient.xml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceClient.xml index 53806dc8782b..d9b805ed41ea 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceClient.xml +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/src/Generated/Docs/DocumentIntelligenceClient.xml @@ -69,7 +69,8 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout"); +AnalyzeDocumentOptions analyzeRequest = new AnalyzeDocumentOptions(); +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout", analyzeRequest); AnalyzeResult responseData = operation.Value; ]]> This sample shows how to call AnalyzeDocumentAsync. @@ -78,7 +79,8 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "customModel"); +AnalyzeDocumentOptions analyzeRequest = new AnalyzeDocumentOptions(); +Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "customModel", analyzeRequest); AnalyzeResult responseData = operation.Value; ]]> @@ -90,7 +92,8 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "prebuilt-layout"); +AnalyzeDocumentOptions analyzeRequest = new AnalyzeDocumentOptions(); +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "prebuilt-layout", analyzeRequest); AnalyzeResult responseData = operation.Value; ]]> This sample shows how to call AnalyzeDocument. @@ -99,7 +102,8 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "customModel"); +AnalyzeDocumentOptions analyzeRequest = new AnalyzeDocumentOptions(); +Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "customModel", analyzeRequest); AnalyzeResult responseData = operation.Value; ]]> @@ -205,7 +209,12 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "customModel"); +AnalyzeBatchDocumentsOptions analyzeBatchRequest = new AnalyzeBatchDocumentsOptions(new Uri("https://myStorageAccount.blob.core.windows.net/myOutputContainer?mySasToken")) +{ + ResultPrefix = "trainingDocsResult/", + OverwriteExisting = true, +}; +Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "customModel", analyzeBatchRequest); AnalyzeBatchResult responseData = operation.Value; ]]> @@ -217,7 +226,12 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); -Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "customModel"); +AnalyzeBatchDocumentsOptions analyzeBatchRequest = new AnalyzeBatchDocumentsOptions(new Uri("https://myStorageAccount.blob.core.windows.net/myOutputContainer?mySasToken")) +{ + ResultPrefix = "trainingDocsResult/", + OverwriteExisting = true, +}; +Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "customModel", analyzeBatchRequest); AnalyzeBatchResult responseData = operation.Value; ]]> diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceClient.cs b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceClient.cs index d6c69416868a..e29cdfefe64f 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceClient.cs +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tests/Generated/Samples/Samples_DocumentIntelligenceClient.cs @@ -134,7 +134,8 @@ public void Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFr AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "prebuilt-layout"); + AnalyzeDocumentOptions analyzeRequest = new AnalyzeDocumentOptions(); + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "prebuilt-layout", analyzeRequest); AnalyzeResult responseData = operation.Value; } @@ -146,7 +147,8 @@ public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocu AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout"); + AnalyzeDocumentOptions analyzeRequest = new AnalyzeDocumentOptions(); + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "prebuilt-layout", analyzeRequest); AnalyzeResult responseData = operation.Value; } @@ -208,7 +210,8 @@ public void Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocumentFr AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "customModel"); + AnalyzeDocumentOptions analyzeRequest = new AnalyzeDocumentOptions(); + Operation operation = client.AnalyzeDocument(WaitUntil.Completed, "customModel", analyzeRequest); AnalyzeResult responseData = operation.Value; } @@ -220,7 +223,8 @@ public async Task Example_DocumentIntelligenceClient_AnalyzeDocument_AnalyzeDocu AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "customModel"); + AnalyzeDocumentOptions analyzeRequest = new AnalyzeDocumentOptions(); + Operation operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, "customModel", analyzeRequest); AnalyzeResult responseData = operation.Value; } @@ -288,7 +292,12 @@ public void Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_AnalyzeBatc AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "customModel"); + AnalyzeBatchDocumentsOptions analyzeBatchRequest = new AnalyzeBatchDocumentsOptions(new Uri("https://myStorageAccount.blob.core.windows.net/myOutputContainer?mySasToken")) + { + ResultPrefix = "trainingDocsResult/", + OverwriteExisting = true, + }; + Operation operation = client.AnalyzeBatchDocuments(WaitUntil.Completed, "customModel", analyzeBatchRequest); AnalyzeBatchResult responseData = operation.Value; } @@ -300,7 +309,12 @@ public async Task Example_DocumentIntelligenceClient_AnalyzeBatchDocuments_Analy AzureKeyCredential credential = new AzureKeyCredential(""); DocumentIntelligenceClient client = new DocumentIntelligenceClient(endpoint, credential); - Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "customModel"); + AnalyzeBatchDocumentsOptions analyzeBatchRequest = new AnalyzeBatchDocumentsOptions(new Uri("https://myStorageAccount.blob.core.windows.net/myOutputContainer?mySasToken")) + { + ResultPrefix = "trainingDocsResult/", + OverwriteExisting = true, + }; + Operation operation = await client.AnalyzeBatchDocumentsAsync(WaitUntil.Completed, "customModel", analyzeBatchRequest); AnalyzeBatchResult responseData = operation.Value; } diff --git a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml index fee49d5f99e4..de0ae23da065 100644 --- a/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml +++ b/sdk/documentintelligence/Azure.AI.DocumentIntelligence/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/ai/DocumentIntelligence -commit: 1caf268a55260f68057065bd2c37a83d2c000db5 +commit: d1b33701d3d8bffd84d314913e26617896ec8606 repo: Azure/azure-rest-api-specs +additionalDirectories: