-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TA] CodeGen based on 3.1-preview.3 (#17182)
- only codegen and fixes after codegen, there is no new implementation added.
- Loading branch information
Showing
220 changed files
with
3,971 additions
and
1,024 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...s/src/main/java/com/azure/ai/textanalytics/implementation/TextAnalyticsClientBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
|
||
package com.azure.ai.textanalytics.implementation; | ||
|
||
import com.azure.core.annotation.ServiceClientBuilder; | ||
import com.azure.core.http.HttpPipeline; | ||
import com.azure.core.http.HttpPipelineBuilder; | ||
import com.azure.core.http.policy.CookiePolicy; | ||
import com.azure.core.http.policy.RetryPolicy; | ||
import com.azure.core.http.policy.UserAgentPolicy; | ||
|
||
/** | ||
* A builder for creating a new instance of the TextAnalyticsClient type. | ||
*/ | ||
@ServiceClientBuilder(serviceClients = {TextAnalyticsClientImpl.class}) | ||
public final class TextAnalyticsClientBuilder { | ||
/* | ||
* Supported Cognitive Services endpoints (protocol and hostname, for | ||
* example: https://westus.api.cognitive.microsoft.com). | ||
*/ | ||
private String endpoint; | ||
|
||
/** | ||
* Sets Supported Cognitive Services endpoints (protocol and hostname, for example: | ||
* https://westus.api.cognitive.microsoft.com). | ||
* | ||
* @param endpoint the endpoint value. | ||
* @return the TextAnalyticsClientBuilder. | ||
*/ | ||
public TextAnalyticsClientBuilder endpoint(String endpoint) { | ||
this.endpoint = endpoint; | ||
return this; | ||
} | ||
|
||
/* | ||
* The HTTP pipeline to send requests through | ||
*/ | ||
private HttpPipeline pipeline; | ||
|
||
/** | ||
* Sets The HTTP pipeline to send requests through. | ||
* | ||
* @param pipeline the pipeline value. | ||
* @return the TextAnalyticsClientBuilder. | ||
*/ | ||
public TextAnalyticsClientBuilder pipeline(HttpPipeline pipeline) { | ||
this.pipeline = pipeline; | ||
return this; | ||
} | ||
|
||
/** | ||
* Builds an instance of TextAnalyticsClientImpl with the provided parameters. | ||
* | ||
* @return an instance of TextAnalyticsClientImpl. | ||
*/ | ||
public TextAnalyticsClientImpl buildClient() { | ||
if (pipeline == null) { | ||
this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), | ||
new CookiePolicy()).build(); | ||
} | ||
TextAnalyticsClientImpl client = new TextAnalyticsClientImpl(pipeline); | ||
client.setEndpoint(this.endpoint); | ||
return client; | ||
} | ||
} |
Oops, something went wrong.