Skip to content

Commit cd48345

Browse files
author
Bidisha Chakraborty
committed
some changes
1 parent 1f2d302 commit cd48345

File tree

6 files changed

+25
-36
lines changed

6 files changed

+25
-36
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using Azure.Core;
5+
6+
namespace Azure.AI.Language.Documents
7+
{
8+
[CodeGenModel("AILanguageDocumentsClientBuilderExtensions")]
9+
public static partial class LanguageDocumentsClientBuilderExtensions
10+
{
11+
}
12+
}

sdk/cognitivelanguage/Azure.AI.Language.Documents/src/TextAnalysisClient.cs renamed to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/AnalyzeDocumentsClient.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
using System.Threading.Tasks;
1111
using Azure.Core.Pipeline;
1212

13-
namespace Azure.AI.Language.Text
13+
namespace Azure.AI.Language.Documents
1414
{
1515
/// <summary> The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in &lt;a href=\"https://docs.microsoft.com/azure/cognitive-services/language-service/overview\"&gt;https://docs.microsoft.com/azure/cognitive-services/language-service/overview&lt;/a&gt;.0. </summary>
16-
public partial class TextAnalysisClient
16+
public partial class AnalyzeDocumentsClient
1717
{
1818
/// <summary> Initializes a new instance of TextAnalysisClient. </summary>
1919
/// <param name="endpoint"> Supported Cognitive Services endpoint (e.g., https://&lt;resource-name&gt;.cognitiveservices.azure.com). </param>
2020
/// <param name="credential"> A credential used to authenticate to an Azure Service. </param>
2121
/// <param name="options"> The options for configuring the client. </param>
2222
/// <exception cref="ArgumentNullException"> <paramref name="endpoint"/> or <paramref name="credential"/> is null. </exception>
23-
public TextAnalysisClient(Uri endpoint, TokenCredential credential, TextAnalysisClientOptions options)
23+
public AnalyzeDocumentsClient(Uri endpoint, TokenCredential credential, AnalyzeDocumentsClientOptions options)
2424
{
2525
Argument.AssertNotNull(endpoint, nameof(endpoint));
2626
Argument.AssertNotNull(credential, nameof(credential));
27-
options ??= new TextAnalysisClientOptions();
27+
options ??= new AnalyzeDocumentsClientOptions();
2828

2929
var authorizationScope = $"{(string.IsNullOrEmpty(options.Audience?.ToString()) ? TextAudience.AzurePublicCloud : options.Audience)}/.default";
3030

@@ -48,7 +48,7 @@ public virtual Response<AnalyzeTextOperationState> AnalyzeTextOperation(MultiLan
4848
Argument.AssertNotNull(textInput, nameof(textInput));
4949
Argument.AssertNotNull(actions, nameof(actions));
5050

51-
string scopeName = $"{nameof(TextAnalysisClient)}.{nameof(AnalyzeTextOperation)}";
51+
string scopeName = $"{nameof(AnalyzeDocumentsClient)}.{nameof(AnalyzeTextOperation)}";
5252
using var scope = ClientDiagnostics.CreateScope(scopeName);
5353
scope.Start();
5454

@@ -81,7 +81,7 @@ public virtual async Task<Response<AnalyzeTextOperationState>> AnalyzeTextOperat
8181
Argument.AssertNotNull(textInput, nameof(textInput));
8282
Argument.AssertNotNull(actions, nameof(actions));
8383

84-
string scopeName = $"{nameof(TextAnalysisClient)}.{nameof(AnalyzeTextOperation)}";
84+
string scopeName = $"{nameof(AnalyzeDocumentsClient)}.{nameof(AnalyzeTextOperation)}";
8585
using var scope = ClientDiagnostics.CreateScope(scopeName);
8686
scope.Start();
8787

sdk/cognitivelanguage/Azure.AI.Language.Documents/src/TextAnalysisClientOptions.cs renamed to sdk/cognitivelanguage/Azure.AI.Language.Documents/src/AnalyzeDocumentsClientOptions.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33

44
using Azure.Core;
55

6-
namespace Azure.AI.Language.Text
6+
namespace Azure.AI.Language.Documents
77
{
8-
public partial class TextAnalysisClientOptions : ClientOptions
8+
/// <summary>
9+
/// Options that allow configuration of requests sent to the Document Analysis service.
10+
/// </summary>
11+
public partial class DocumentAnalysisClientOptions : ClientOptions
912
{
1013
/// <summary>
1114
/// Gets or sets the audience to use for authentication with Azure Active Directory (AAD). The audience is not considered when using a shared key.

sdk/cognitivelanguage/Azure.AI.Language.Documents/src/TextAnalysisClientBuilderExtensions.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.

sdk/cognitivelanguage/Azure.AI.Language.Documents/src/TextAnalysisModelFactory.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.

sdk/cognitivelanguage/Azure.AI.Language.Documents/tests/Infrastructure/TextAnalysisTestBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected TextAnalysisTestBase(bool isAsync, TextAnalysisClientOptions.ServiceVe
3131
/// <summary>
3232
/// Gets an instrumented client of type <typeparamref name="TClient"/>.
3333
/// </summary>
34-
protected TextAnalysisClient client { get; private set; }
34+
protected AnalyzeDocumentsClient client { get; private set; }
3535

3636
/// <summary>
3737
/// Gets the service version used for this instance of the test fixture.
@@ -46,7 +46,7 @@ public override async Task StartTestRecordingAsync()
4646
await base.StartTestRecordingAsync();
4747

4848
TextAnalysisClientOptions options = new(ServiceVersion);
49-
client = CreateClient<TextAnalysisClient>(
49+
client = CreateClient<AnalyzeDocumentsClient>(
5050
TestEnvironment.Endpoint,
5151
new AzureKeyCredential(TestEnvironment.ApiKey),
5252
InstrumentClientOptions(options));

0 commit comments

Comments
 (0)