Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
feat: add LEFT_CHEEK_CENTER and RIGHT_CHEEK_CENTER FaceAnnotation Lan…
Browse files Browse the repository at this point in the history
…dmark Types (#394)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/a39c5539-a594-4b12-9b6b-f4b118636e7f/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 356556588
Source-Link: googleapis/googleapis@9b95bf0
PiperOrigin-RevId: 356341083
Source-Link: googleapis/googleapis@8d8c008

docs: generate sample code in the Java microgenerator
  • Loading branch information
yoshi-automation committed Feb 16, 2021
1 parent 15e3220 commit f760842
Show file tree
Hide file tree
Showing 35 changed files with 4,225 additions and 387 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* List<AnnotateImageRequest> requests = new ArrayList<>();
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
* }
* }</pre>
*
* <p>Note: close() needs to be called on the ImageAnnotatorClient object to clean up resources such
* as threads. In the example above, try-with-resources is used, which automatically calls close().
*
Expand Down Expand Up @@ -153,6 +160,15 @@ public final OperationsClient getOperationsClient() {
/**
* Run image detection and annotation for a batch of images.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* List<AnnotateImageRequest> requests = new ArrayList<>();
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests);
* }
* }</pre>
*
* @param requests Required. Individual image annotation requests for this batch.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand All @@ -167,6 +183,19 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(
/**
* Run image detection and annotation for a batch of images.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* BatchAnnotateImagesRequest request =
* BatchAnnotateImagesRequest.newBuilder()
* .addAllRequests(new ArrayList<AnnotateImageRequest>())
* .setParent("parent-995424086")
* .build();
* BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(request);
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand All @@ -179,6 +208,20 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
* Run image detection and annotation for a batch of images.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* BatchAnnotateImagesRequest request =
* BatchAnnotateImagesRequest.newBuilder()
* .addAllRequests(new ArrayList<AnnotateImageRequest>())
* .setParent("parent-995424086")
* .build();
* ApiFuture<BatchAnnotateImagesResponse> future =
* imageAnnotatorClient.batchAnnotateImagesCallable().futureCall(request);
* // Do something.
* BatchAnnotateImagesResponse response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<BatchAnnotateImagesRequest, BatchAnnotateImagesResponse>
batchAnnotateImagesCallable() {
Expand All @@ -194,6 +237,15 @@ public final BatchAnnotateImagesResponse batchAnnotateImages(BatchAnnotateImages
* AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and
* perform detection and annotation for each image extracted.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* List<AnnotateFileRequest> requests = new ArrayList<>();
* BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(requests);
* }
* }</pre>
*
* @param requests Required. The list of file annotation requests. Right now we support only one
* AnnotateFileRequest in BatchAnnotateFilesRequest.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
Expand All @@ -213,6 +265,19 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(List<AnnotateFileRequ
* AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and
* perform detection and annotation for each image extracted.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* BatchAnnotateFilesRequest request =
* BatchAnnotateFilesRequest.newBuilder()
* .addAllRequests(new ArrayList<AnnotateFileRequest>())
* .setParent("parent-995424086")
* .build();
* BatchAnnotateFilesResponse response = imageAnnotatorClient.batchAnnotateFiles(request);
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand All @@ -230,6 +295,20 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* perform detection and annotation for each image extracted.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* BatchAnnotateFilesRequest request =
* BatchAnnotateFilesRequest.newBuilder()
* .addAllRequests(new ArrayList<AnnotateFileRequest>())
* .setParent("parent-995424086")
* .build();
* ApiFuture<BatchAnnotateFilesResponse> future =
* imageAnnotatorClient.batchAnnotateFilesCallable().futureCall(request);
* // Do something.
* BatchAnnotateFilesResponse response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<BatchAnnotateFilesRequest, BatchAnnotateFilesResponse>
batchAnnotateFilesCallable() {
Expand All @@ -247,6 +326,17 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* <p>This service will write image annotation outputs to json files in customer GCS bucket, each
* json file containing BatchAnnotateImagesResponse proto.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* List<AnnotateImageRequest> requests = new ArrayList<>();
* OutputConfig outputConfig = OutputConfig.newBuilder().build();
* AsyncBatchAnnotateImagesResponse response =
* imageAnnotatorClient.asyncBatchAnnotateImagesAsync(requests, outputConfig).get();
* }
* }</pre>
*
* @param requests Required. Individual image annotation requests for this batch.
* @param outputConfig Required. The desired output location and metadata (e.g. format).
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
Expand All @@ -273,6 +363,21 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* <p>This service will write image annotation outputs to json files in customer GCS bucket, each
* json file containing BatchAnnotateImagesResponse proto.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* AsyncBatchAnnotateImagesRequest request =
* AsyncBatchAnnotateImagesRequest.newBuilder()
* .addAllRequests(new ArrayList<AnnotateImageRequest>())
* .setOutputConfig(OutputConfig.newBuilder().build())
* .setParent("parent-995424086")
* .build();
* AsyncBatchAnnotateImagesResponse response =
* imageAnnotatorClient.asyncBatchAnnotateImagesAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand All @@ -293,6 +398,21 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* json file containing BatchAnnotateImagesResponse proto.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* AsyncBatchAnnotateImagesRequest request =
* AsyncBatchAnnotateImagesRequest.newBuilder()
* .addAllRequests(new ArrayList<AnnotateImageRequest>())
* .setOutputConfig(OutputConfig.newBuilder().build())
* .setParent("parent-995424086")
* .build();
* OperationFuture<AsyncBatchAnnotateImagesResponse, OperationMetadata> future =
* imageAnnotatorClient.asyncBatchAnnotateImagesOperationCallable().futureCall(request);
* // Do something.
* AsyncBatchAnnotateImagesResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<
AsyncBatchAnnotateImagesRequest, AsyncBatchAnnotateImagesResponse, OperationMetadata>
Expand All @@ -312,6 +432,21 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* json file containing BatchAnnotateImagesResponse proto.
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* AsyncBatchAnnotateImagesRequest request =
* AsyncBatchAnnotateImagesRequest.newBuilder()
* .addAllRequests(new ArrayList<AnnotateImageRequest>())
* .setOutputConfig(OutputConfig.newBuilder().build())
* .setParent("parent-995424086")
* .build();
* ApiFuture<Operation> future =
* imageAnnotatorClient.asyncBatchAnnotateImagesCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<AsyncBatchAnnotateImagesRequest, Operation>
asyncBatchAnnotateImagesCallable() {
Expand All @@ -326,6 +461,16 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse`
* (results).
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* List<AsyncAnnotateFileRequest> requests = new ArrayList<>();
* AsyncBatchAnnotateFilesResponse response =
* imageAnnotatorClient.asyncBatchAnnotateFilesAsync(requests).get();
* }
* }</pre>
*
* @param requests Required. Individual async file annotation requests for this batch.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand All @@ -344,6 +489,20 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse`
* (results).
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* AsyncBatchAnnotateFilesRequest request =
* AsyncBatchAnnotateFilesRequest.newBuilder()
* .addAllRequests(new ArrayList<AsyncAnnotateFileRequest>())
* .setParent("parent-995424086")
* .build();
* AsyncBatchAnnotateFilesResponse response =
* imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get();
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand All @@ -361,6 +520,20 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* (results).
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* AsyncBatchAnnotateFilesRequest request =
* AsyncBatchAnnotateFilesRequest.newBuilder()
* .addAllRequests(new ArrayList<AsyncAnnotateFileRequest>())
* .setParent("parent-995424086")
* .build();
* OperationFuture<AsyncBatchAnnotateFilesResponse, OperationMetadata> future =
* imageAnnotatorClient.asyncBatchAnnotateFilesOperationCallable().futureCall(request);
* // Do something.
* AsyncBatchAnnotateFilesResponse response = future.get();
* }
* }</pre>
*/
public final OperationCallable<
AsyncBatchAnnotateFilesRequest, AsyncBatchAnnotateFilesResponse, OperationMetadata>
Expand All @@ -377,6 +550,20 @@ public final BatchAnnotateFilesResponse batchAnnotateFiles(BatchAnnotateFilesReq
* (results).
*
* <p>Sample code:
*
* <pre>{@code
* try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) {
* AsyncBatchAnnotateFilesRequest request =
* AsyncBatchAnnotateFilesRequest.newBuilder()
* .addAllRequests(new ArrayList<AsyncAnnotateFileRequest>())
* .setParent("parent-995424086")
* .build();
* ApiFuture<Operation> future =
* imageAnnotatorClient.asyncBatchAnnotateFilesCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<AsyncBatchAnnotateFilesRequest, Operation>
asyncBatchAnnotateFilesCallable() {
Expand Down
Loading

0 comments on commit f760842

Please sign in to comment.