Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-ai-vision-imageanalysis] Replace @projectedName("json" -> @encodedName("application/json" #9259

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@

/**
* Initializes a new instance of the asynchronous ImageAnalysisClient type.
*
* <!-- src_embed com.azure.ai.vision.imageanalysis.async-client -->
* <pre>
* &#47;&#47;
* &#47;&#47; Create an asynchronous Image Analysis client.
* &#47;&#47;
* ImageAnalysisAsyncClient client = new ImageAnalysisClientBuilder&#40;&#41;
* .endpoint&#40;endpoint&#41;
* .credential&#40;new KeyCredential&#40;key&#41;&#41;
* .buildAsyncClient&#40;&#41;;
* </pre>
* <!-- end com.azure.ai.vision.imageanalysis.async-client -->
*/
@ServiceClient(builder = ImageAnalysisClientBuilder.class, isAsync = true)
public final class ImageAnalysisAsyncClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@

/**
* Initializes a new instance of the synchronous ImageAnalysisClient type.
*
* <!-- src_embed com.azure.ai.vision.imageanalysis.sync-client -->
* <pre>
* &#47;&#47;
* &#47;&#47; Create a synchronous Image Analysis client.
* &#47;&#47;
* ImageAnalysisClient client = new ImageAnalysisClientBuilder&#40;&#41;
* .endpoint&#40;endpoint&#41;
* .credential&#40;new KeyCredential&#40;key&#41;&#41;
* .buildClient&#40;&#41;;
* </pre>
* <!-- end com.azure.ai.vision.imageanalysis.sync-client -->
*/
@ServiceClient(builder = ImageAnalysisClientBuilder.class)
public final class ImageAnalysisClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,6 @@

/**
* A builder for creating a new instance of the ImageAnalysisClient type.
*
* <!-- src_embed com.azure.ai.vision.imageanalysis.sync-client -->
* <pre>
* &#47;&#47;
* &#47;&#47; Create a synchronous Image Analysis client.
* &#47;&#47;
* ImageAnalysisClient client = new ImageAnalysisClientBuilder&#40;&#41;
* .endpoint&#40;endpoint&#41;
* .credential&#40;new KeyCredential&#40;key&#41;&#41;
* .buildClient&#40;&#41;;
* </pre>
* <!-- end com.azure.ai.vision.imageanalysis.sync-client -->
*
* <!-- src_embed com.azure.ai.vision.imageanalysis.async-client -->
* <pre>
* &#47;&#47;
* &#47;&#47; Create an asynchronous Image Analysis client.
* &#47;&#47;
* ImageAnalysisAsyncClient client = new ImageAnalysisClientBuilder&#40;&#41;
* .endpoint&#40;endpoint&#41;
* .credential&#40;new KeyCredential&#40;key&#41;&#41;
* .buildAsyncClient&#40;&#41;;
* </pre>
* <!-- end com.azure.ai.vision.imageanalysis.async-client -->
*
*/
@ServiceClientBuilder(serviceClients = { ImageAnalysisClient.class, ImageAnalysisAsyncClient.class })
public final class ImageAnalysisClientBuilder
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.ai.vision.imageanalysis.generated;

// The Java test files under 'generated' package are generated for your reference.
// If you wish to modify these files, please copy them out of the 'generated' package, and modify there.
// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test.

import com.azure.ai.vision.imageanalysis.ImageAnalysisClient;
import com.azure.ai.vision.imageanalysis.ImageAnalysisClientBuilder;
import com.azure.core.http.HttpClient;
import com.azure.core.http.policy.HttpLogDetailLevel;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.test.TestMode;
import com.azure.core.test.TestProxyTestBase;
import com.azure.core.util.Configuration;

class ImageAnalysisClientTestBase extends TestProxyTestBase {
protected ImageAnalysisClient imageAnalysisClient;

@Override
protected void beforeTest() {
ImageAnalysisClientBuilder imageAnalysisClientbuilder = new ImageAnalysisClientBuilder()
.endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint"))
.httpClient(HttpClient.createDefault())
.httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC));
if (getTestMode() == TestMode.PLAYBACK) {
imageAnalysisClientbuilder.httpClient(interceptorManager.getPlaybackClient());
} else if (getTestMode() == TestMode.RECORD) {
imageAnalysisClientbuilder.addPolicy(interceptorManager.getRecordPolicy());
}
imageAnalysisClient = imageAnalysisClientbuilder.buildClient();

}
}
7 changes: 3 additions & 4 deletions sdk/vision/azure-ai-vision-imageanalysis/tsp-location.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
repo: Azure/azure-rest-api-specs
directory: specification/ai/ImageAnalysis
additionalDirectories: []
commit: 3cf7400ba3d65978bef86e9c4197a5e7f7bf5277

commit: a718913e51a489e2ed6fa6a5966e5291b8018435
repo: Azure/azure-rest-api-specs
additionalDirectories: