Skip to content

Commit

Permalink
[Automation] Generate SDK based on TypeSpec 0.16.3 (Azure#40469)
Browse files Browse the repository at this point in the history
* [Automation] Generate SDK based on TypeSpec 0.16.3

* remove "endpoint" validation in openai

* Delete sdk/informaticadatamanagement/azure-resourcemanager-informaticadatamanagement/src/test/java/com/azure/resourcemanager/informaticadatamanagement/generated/ServerlessRuntimesStartFailedServerlessRuntimeWithResponseMockTests.java

---------

Co-authored-by: Weidong Xu <weidxu@microsoft.com>
  • Loading branch information
azure-sdk and weidongxu-microsoft authored Jun 4, 2024
1 parent c2e8f8e commit 83026f6
Show file tree
Hide file tree
Showing 23 changed files with 212 additions and 87 deletions.
14 changes: 7 additions & 7 deletions eng/emitter-package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-java": "0.16.2"
"@azure-tools/typespec-java": "0.16.3"
},
"devDependencies": {
"@azure-tools/typespec-azure-core": "0.42.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ public BatchClientBuilder retryPolicy(RetryPolicy retryPolicy) {
*/
@Generated
private BatchClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
BatchServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : BatchServiceVersion.getLatest();
Expand Down Expand Up @@ -342,4 +343,11 @@ public BatchClient buildClient() {
}

private static final ClientLogger LOGGER = new ClientLogger(BatchClientBuilder.class);

@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ public JobRouterAdministrationClientBuilder retryPolicy(RetryPolicy retryPolicy)
*/
@Generated
private JobRouterAdministrationClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
JobRouterServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : JobRouterServiceVersion.getLatest();
Expand Down Expand Up @@ -368,4 +369,11 @@ private HttpPipelinePolicy createHttpPipelineAuthPolicy() {
new IllegalStateException("Missing credential information while building a client."));
}
}

@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public JobRouterClientBuilder retryPolicy(RetryPolicy retryPolicy) {
*/
@Generated
private JobRouterClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
JobRouterServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : JobRouterServiceVersion.getLatest();
Expand Down Expand Up @@ -366,4 +367,11 @@ private HttpPipelinePolicy createHttpPipelineAuthPolicy() {
new IllegalStateException("Missing credential information while building a client."));
}
}

@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ public BlocklistClientBuilder retryPolicy(RetryPolicy retryPolicy) {
*/
@Generated
private BlocklistClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
ContentSafetyServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : ContentSafetyServiceVersion.getLatest();
Expand Down Expand Up @@ -344,4 +345,11 @@ public BlocklistClient buildClient() {
}

private static final ClientLogger LOGGER = new ClientLogger(BlocklistClientBuilder.class);

@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ public ContentSafetyClientBuilder retryPolicy(RetryPolicy retryPolicy) {
*/
@Generated
private ContentSafetyClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
ContentSafetyServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : ContentSafetyServiceVersion.getLatest();
Expand Down Expand Up @@ -344,4 +345,11 @@ public ContentSafetyClient buildClient() {
}

private static final ClientLogger LOGGER = new ClientLogger(ContentSafetyClientBuilder.class);

@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ public DocumentIntelligenceAdministrationClientBuilder retryPolicy(RetryPolicy r
*/
@Generated
private DocumentIntelligenceAdministrationClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
DocumentIntelligenceServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : DocumentIntelligenceServiceVersion.getLatest();
Expand All @@ -290,6 +291,13 @@ private DocumentIntelligenceAdministrationClientImpl buildInnerClient() {
return client;
}

@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}

@Generated
private HttpPipeline createHttpPipeline() {
Configuration buildConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ public DocumentIntelligenceClientBuilder retryPolicy(RetryPolicy retryPolicy) {
*/
@Generated
private DocumentIntelligenceClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
DocumentIntelligenceServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : DocumentIntelligenceServiceVersion.getLatest();
Expand All @@ -283,6 +284,13 @@ private DocumentIntelligenceClientImpl buildInnerClient() {
return client;
}

@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}

@Generated
private HttpPipeline createHttpPipeline() {
Configuration buildConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ public EventGridClientBuilder retryPolicy(RetryPolicy retryPolicy) {
*/
@Generated
private EventGridClientImpl buildInnerClient() {
this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
EventGridServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : EventGridServiceVersion.getLatest();
Expand Down Expand Up @@ -345,4 +346,11 @@ public EventGridClient buildClient() {
}

private static final ClientLogger LOGGER = new ClientLogger(EventGridClientBuilder.class);

@Generated
private void validateClient() {
// This method is invoked from 'buildInnerClient'/'buildClient' method.
// Developer can customize this method, to validate that the necessary conditions are met for the new client.
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public final class FaceAsyncClient {
* ]
* }</pre>
*
* @param request The request parameter.
* @param findSimilarRequest The findSimilarRequest parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -106,8 +106,9 @@ public final class FaceAsyncClient {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> findSimilarWithResponse(BinaryData request, RequestOptions requestOptions) {
return this.serviceClient.findSimilarWithResponseAsync(request, requestOptions);
public Mono<Response<BinaryData>> findSimilarWithResponse(BinaryData findSimilarRequest,
RequestOptions requestOptions) {
return this.serviceClient.findSimilarWithResponseAsync(findSimilarRequest, requestOptions);
}

/**
Expand Down Expand Up @@ -138,7 +139,7 @@ public Mono<Response<BinaryData>> findSimilarWithResponse(BinaryData request, Re
* }
* }</pre>
*
* @param request The request parameter.
* @param verifyFaceToFaceRequest The verifyFaceToFaceRequest parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -148,8 +149,9 @@ public Mono<Response<BinaryData>> findSimilarWithResponse(BinaryData request, Re
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> verifyFaceToFaceWithResponse(BinaryData request, RequestOptions requestOptions) {
return this.serviceClient.verifyFaceToFaceWithResponseAsync(request, requestOptions);
public Mono<Response<BinaryData>> verifyFaceToFaceWithResponse(BinaryData verifyFaceToFaceRequest,
RequestOptions requestOptions) {
return this.serviceClient.verifyFaceToFaceWithResponseAsync(verifyFaceToFaceRequest, requestOptions);
}

/**
Expand Down Expand Up @@ -190,7 +192,7 @@ public Mono<Response<BinaryData>> verifyFaceToFaceWithResponse(BinaryData reques
* }
* }</pre>
*
* @param request The request parameter.
* @param groupRequest The groupRequest parameter.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand All @@ -201,8 +203,8 @@ public Mono<Response<BinaryData>> verifyFaceToFaceWithResponse(BinaryData reques
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> groupWithResponse(BinaryData request, RequestOptions requestOptions) {
return this.serviceClient.groupWithResponseAsync(request, requestOptions);
public Mono<Response<BinaryData>> groupWithResponse(BinaryData groupRequest, RequestOptions requestOptions) {
return this.serviceClient.groupWithResponseAsync(groupRequest, requestOptions);
}

/**
Expand Down Expand Up @@ -241,11 +243,11 @@ public Mono<List<FaceFindSimilarResult>> findSimilar(String faceId, List<String>
Integer maxNumOfCandidatesReturned, FindSimilarMatchMode mode) {
// Generated convenience method for findSimilarWithResponse
RequestOptions requestOptions = new RequestOptions();
FindSimilarRequest requestObj
FindSimilarRequest findSimilarRequestObj
= new FindSimilarRequest(faceId, faceIds).setMaxNumOfCandidatesReturned(maxNumOfCandidatesReturned)
.setMode(mode);
BinaryData request = BinaryData.fromObject(requestObj);
return findSimilarWithResponse(request, requestOptions).flatMap(FluxUtil::toMono)
BinaryData findSimilarRequest = BinaryData.fromObject(findSimilarRequestObj);
return findSimilarWithResponse(findSimilarRequest, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_FACE_FIND_SIMILAR_RESULT));
}

Expand Down Expand Up @@ -281,9 +283,9 @@ public Mono<List<FaceFindSimilarResult>> findSimilar(String faceId, List<String>
public Mono<List<FaceFindSimilarResult>> findSimilar(String faceId, List<String> faceIds) {
// Generated convenience method for findSimilarWithResponse
RequestOptions requestOptions = new RequestOptions();
FindSimilarRequest requestObj = new FindSimilarRequest(faceId, faceIds);
BinaryData request = BinaryData.fromObject(requestObj);
return findSimilarWithResponse(request, requestOptions).flatMap(FluxUtil::toMono)
FindSimilarRequest findSimilarRequestObj = new FindSimilarRequest(faceId, faceIds);
BinaryData findSimilarRequest = BinaryData.fromObject(findSimilarRequestObj);
return findSimilarWithResponse(findSimilarRequest, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(TYPE_REFERENCE_LIST_FACE_FIND_SIMILAR_RESULT));
}

Expand Down Expand Up @@ -313,9 +315,9 @@ public Mono<List<FaceFindSimilarResult>> findSimilar(String faceId, List<String>
public Mono<FaceVerificationResult> verifyFaceToFace(String faceId1, String faceId2) {
// Generated convenience method for verifyFaceToFaceWithResponse
RequestOptions requestOptions = new RequestOptions();
VerifyFaceToFaceRequest requestObj = new VerifyFaceToFaceRequest(faceId1, faceId2);
BinaryData request = BinaryData.fromObject(requestObj);
return verifyFaceToFaceWithResponse(request, requestOptions).flatMap(FluxUtil::toMono)
VerifyFaceToFaceRequest verifyFaceToFaceRequestObj = new VerifyFaceToFaceRequest(faceId1, faceId2);
BinaryData verifyFaceToFaceRequest = BinaryData.fromObject(verifyFaceToFaceRequestObj);
return verifyFaceToFaceWithResponse(verifyFaceToFaceRequest, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(FaceVerificationResult.class));
}

Expand Down Expand Up @@ -347,9 +349,9 @@ public Mono<FaceVerificationResult> verifyFaceToFace(String faceId1, String face
public Mono<FaceGroupingResult> group(List<String> faceIds) {
// Generated convenience method for groupWithResponse
RequestOptions requestOptions = new RequestOptions();
GroupRequest requestObj = new GroupRequest(faceIds);
BinaryData request = BinaryData.fromObject(requestObj);
return groupWithResponse(request, requestOptions).flatMap(FluxUtil::toMono)
GroupRequest groupRequestObj = new GroupRequest(faceIds);
BinaryData groupRequest = BinaryData.fromObject(groupRequestObj);
return groupWithResponse(groupRequest, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(FaceGroupingResult.class));
}

Expand Down
Loading

0 comments on commit 83026f6

Please sign in to comment.