Skip to content

Commit

Permalink
tsp, fix on missing test/sample (after projection) (#2736)
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft committed May 6, 2024
1 parent ef472c0 commit 609065d
Show file tree
Hide file tree
Showing 54 changed files with 6,016 additions and 5,123 deletions.
2 changes: 1 addition & 1 deletion azure-dataplane-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.14.2</version>
<version>1.15.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

package com.azure.ai.formrecognizer.documentanalysis.dpg;

import com.azure.ai.formrecognizer.documentanalysis.dpg.implementation.FormRecognizerClientImpl;
import com.azure.ai.formrecognizer.documentanalysis.dpg.implementation.DocumentModelsImpl;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
Expand All @@ -23,24 +23,22 @@
/**
* Initializes a new instance of the asynchronous FormRecognizerClient type.
*/
@ServiceClient(builder = FormRecognizerClientBuilder.class, isAsync = true)
public final class FormRecognizerAsyncClient {
@ServiceClient(builder = DocumentModelsClientBuilder.class, isAsync = true)
public final class DocumentModelsAsyncClient {
@Generated
private final FormRecognizerClientImpl serviceClient;
private final DocumentModelsImpl serviceClient;

/**
* Initializes an instance of FormRecognizerAsyncClient class.
* Initializes an instance of DocumentModelsAsyncClient class.
*
* @param serviceClient the service client implementation.
*/
@Generated
FormRecognizerAsyncClient(FormRecognizerClientImpl serviceClient) {
DocumentModelsAsyncClient(DocumentModelsImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* Analyze document
*
* Analyzes document with document model.
* <p><strong>Query Parameters</strong></p>
* <table border="1">
Expand Down Expand Up @@ -78,8 +76,6 @@ public PollerFlux<BinaryData, BinaryData> beginAnalyzeDocument(String modelId, S
}

/**
* Get analyze result
*
* Gets the result of document analysis.
* <p><strong>Response Body Schema</strong></p>
*
Expand Down Expand Up @@ -299,14 +295,12 @@ public PollerFlux<BinaryData, BinaryData> beginAnalyzeDocument(String modelId, S
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getAnalyzeDocumentResultWithResponse(String modelId, String resultId,
public Mono<Response<BinaryData>> getAnalyzeResultWithResponse(String modelId, String resultId,
RequestOptions requestOptions) {
return this.serviceClient.getAnalyzeDocumentResultWithResponseAsync(modelId, resultId, requestOptions);
return this.serviceClient.getAnalyzeResultWithResponseAsync(modelId, resultId, requestOptions);
}

/**
* Build document model
*
* Builds a custom document analysis model.
* <p><strong>Request Body Schema</strong></p>
*
Expand Down Expand Up @@ -335,14 +329,11 @@ public Mono<Response<BinaryData>> getAnalyzeDocumentResultWithResponse(String mo
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public PollerFlux<BinaryData, BinaryData> beginBuildDocumentModel(BinaryData buildRequest,
RequestOptions requestOptions) {
return this.serviceClient.beginBuildDocumentModelAsync(buildRequest, requestOptions);
public PollerFlux<BinaryData, BinaryData> beginBuildModel(BinaryData buildRequest, RequestOptions requestOptions) {
return this.serviceClient.beginBuildModelAsync(buildRequest, requestOptions);
}

/**
* Compose document model
*
* Creates a new document model from document types of existing document models.
* <p><strong>Request Body Schema</strong></p>
*
Expand Down Expand Up @@ -371,14 +362,12 @@ public PollerFlux<BinaryData, BinaryData> beginBuildDocumentModel(BinaryData bui
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public PollerFlux<BinaryData, BinaryData> beginComposeDocumentModel(BinaryData composeRequest,
public PollerFlux<BinaryData, BinaryData> beginComposeModel(BinaryData composeRequest,
RequestOptions requestOptions) {
return this.serviceClient.beginComposeDocumentModelAsync(composeRequest, requestOptions);
return this.serviceClient.beginComposeModelAsync(composeRequest, requestOptions);
}

/**
* Generate copy authorization
*
* Generates authorization to copy a document model to this location with specified modelId and optional
* description.
* <p><strong>Request Body Schema</strong></p>
Expand Down Expand Up @@ -417,14 +406,12 @@ public PollerFlux<BinaryData, BinaryData> beginComposeDocumentModel(BinaryData c
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> authorizeCopyDocumentModelWithResponse(BinaryData authorizeCopyRequest,
public Mono<Response<BinaryData>> authorizeModelCopyWithResponse(BinaryData authorizeCopyRequest,
RequestOptions requestOptions) {
return this.serviceClient.authorizeCopyDocumentModelWithResponseAsync(authorizeCopyRequest, requestOptions);
return this.serviceClient.authorizeModelCopyWithResponseAsync(authorizeCopyRequest, requestOptions);
}

/**
* Copy document model
*
* Copies document model to the target resource, region, and modelId.
* <p><strong>Request Body Schema</strong></p>
*
Expand All @@ -450,98 +437,12 @@ public Mono<Response<BinaryData>> authorizeCopyDocumentModelWithResponse(BinaryD
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public PollerFlux<BinaryData, BinaryData> beginCopyDocumentModelTo(String modelId, BinaryData copyToRequest,
public PollerFlux<BinaryData, BinaryData> beginCopyModelTo(String modelId, BinaryData copyToRequest,
RequestOptions requestOptions) {
return this.serviceClient.beginCopyDocumentModelToAsync(modelId, copyToRequest, requestOptions);
return this.serviceClient.beginCopyModelToAsync(modelId, copyToRequest, requestOptions);
}

/**
* List operations
*
* Lists all operations.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>{@code
* {
* operationId: String (Required)
* status: String(notStarted/running/failed/succeeded/canceled) (Required)
* percentCompleted: Integer (Optional)
* createdDateTime: OffsetDateTime (Required)
* lastUpdatedDateTime: OffsetDateTime (Required)
* kind: String(documentModelBuild/documentModelCompose/documentModelCopyTo) (Required)
* resourceLocation: String (Required)
* apiVersion: String (Optional)
* tags (Optional): {
* String: String (Required)
* }
* }
* }</pre>
*
* @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.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return list Operations response object as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<BinaryData> getOperations(RequestOptions requestOptions) {
return this.serviceClient.getOperationsAsync(requestOptions);
}

/**
* Get operation
*
* Gets operation info.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>{@code
* {
* kind: String (Required)
* operationId: String (Required)
* status: String(notStarted/running/failed/succeeded/canceled) (Required)
* percentCompleted: Integer (Optional)
* createdDateTime: OffsetDateTime (Required)
* lastUpdatedDateTime: OffsetDateTime (Required)
* resourceLocation: String (Required)
* apiVersion: String (Optional)
* tags (Optional): {
* String: String (Required)
* }
* error (Optional): {
* code: String (Required)
* message: String (Required)
* target: String (Optional)
* details (Optional): [
* (recursive schema, see above)
* ]
* innererror (Optional): {
* code: String (Required)
* message: String (Optional)
* innererror (Optional): (recursive schema, see innererror above)
* }
* }
* }
* }</pre>
*
* @param operationId Unique operation ID.
* @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.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return operation info along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getOperationWithResponse(String operationId, RequestOptions requestOptions) {
return this.serviceClient.getOperationWithResponseAsync(operationId, requestOptions);
}

/**
* List document models
*
* List all document models.
* <p><strong>Response Body Schema</strong></p>
*
Expand All @@ -566,13 +467,11 @@ public Mono<Response<BinaryData>> getOperationWithResponse(String operationId, R
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<BinaryData> getDocumentModels(RequestOptions requestOptions) {
return this.serviceClient.getDocumentModelsAsync(requestOptions);
public PagedFlux<BinaryData> listModels(RequestOptions requestOptions) {
return this.serviceClient.listModelsAsync(requestOptions);
}

/**
* Get document model
*
* Gets detailed document model information.
* <p><strong>Response Body Schema</strong></p>
*
Expand Down Expand Up @@ -618,13 +517,11 @@ public PagedFlux<BinaryData> getDocumentModels(RequestOptions requestOptions) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getDocumentModelWithResponse(String modelId, RequestOptions requestOptions) {
return this.serviceClient.getDocumentModelWithResponseAsync(modelId, requestOptions);
public Mono<Response<BinaryData>> getModelWithResponse(String modelId, RequestOptions requestOptions) {
return this.serviceClient.getModelWithResponseAsync(modelId, requestOptions);
}

/**
* Delete document model
*
* Deletes document model.
*
* @param modelId Unique document model name.
Expand All @@ -637,36 +534,7 @@ public Mono<Response<BinaryData>> getDocumentModelWithResponse(String modelId, R
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> deleteDocumentModelWithResponse(String modelId, RequestOptions requestOptions) {
return this.serviceClient.deleteDocumentModelWithResponseAsync(modelId, requestOptions);
}

/**
* Get resource info
*
* Return information about the current resource.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>{@code
* {
* customDocumentModels (Required): {
* count: int (Required)
* limit: int (Required)
* }
* }
* }</pre>
*
* @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.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return general information regarding the current resource along with {@link Response} on successful completion
* of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> getResourceDetailsWithResponse(RequestOptions requestOptions) {
return this.serviceClient.getResourceDetailsWithResponseAsync(requestOptions);
public Mono<Response<Void>> deleteModelWithResponse(String modelId, RequestOptions requestOptions) {
return this.serviceClient.deleteModelWithResponseAsync(modelId, requestOptions);
}
}
Loading

0 comments on commit 609065d

Please sign in to comment.