diff --git a/google-api-grpc/grpc-google-cloud-vision-v1p4beta1/pom.xml b/google-api-grpc/grpc-google-cloud-vision-v1p4beta1/pom.xml
new file mode 100644
index 000000000000..378472ca8931
--- /dev/null
+++ b/google-api-grpc/grpc-google-cloud-vision-v1p4beta1/pom.xml
@@ -0,0 +1,31 @@
+
+ * Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The + * ImageAnnotator service returns detected entities from the images. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/vision/v1p4beta1/image_annotator.proto") +public final class ImageAnnotatorGrpc { + + private ImageAnnotatorGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1p4beta1.ImageAnnotator"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getBatchAnnotateImagesMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse> + METHOD_BATCH_ANNOTATE_IMAGES = getBatchAnnotateImagesMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse> + getBatchAnnotateImagesMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse> + getBatchAnnotateImagesMethod() { + return getBatchAnnotateImagesMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse> + getBatchAnnotateImagesMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest, + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse> + getBatchAnnotateImagesMethod; + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) == null) { + synchronized (ImageAnnotatorGrpc.class) { + if ((getBatchAnnotateImagesMethod = ImageAnnotatorGrpc.getBatchAnnotateImagesMethod) + == null) { + ImageAnnotatorGrpc.getBatchAnnotateImagesMethod = + getBatchAnnotateImagesMethod = + io.grpc.MethodDescriptor + .
+ * Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The + * ImageAnnotator service returns detected entities from the images. + *+ */ + public abstract static class ImageAnnotatorImplBase implements io.grpc.BindableService { + + /** + * + * + *
+ * Run image detection and annotation for a batch of images. + *+ */ + public void batchAnnotateImages( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver
+ * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * This service will extract at most the first 10 frames (gif) or pages + * (pdf or tiff) from each file provided and perform detection and annotation + * for each image extracted. + *+ */ + public void batchAnnotateFiles( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver
+ * Run asynchronous image detection and annotation for a list of images. + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + *+ */ + public void asyncBatchAnnotateImages( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver
+ * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + *+ */ + public void asyncBatchAnnotateFiles( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver
+ * Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The + * ImageAnnotator service returns detected entities from the images. + *+ */ + public static final class ImageAnnotatorStub + extends io.grpc.stub.AbstractStub
+ * Run image detection and annotation for a batch of images. + *+ */ + public void batchAnnotateImages( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver
+ * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * This service will extract at most the first 10 frames (gif) or pages + * (pdf or tiff) from each file provided and perform detection and annotation + * for each image extracted. + *+ */ + public void batchAnnotateFiles( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver
+ * Run asynchronous image detection and annotation for a list of images. + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + *+ */ + public void asyncBatchAnnotateImages( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request, + io.grpc.stub.StreamObserver
+ * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + *+ */ + public void asyncBatchAnnotateFiles( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request, + io.grpc.stub.StreamObserver
+ * Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The + * ImageAnnotator service returns detected entities from the images. + *+ */ + public static final class ImageAnnotatorBlockingStub + extends io.grpc.stub.AbstractStub
+ * Run image detection and annotation for a batch of images. + *+ */ + public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse batchAnnotateImages( + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request) { + return blockingUnaryCall( + getChannel(), getBatchAnnotateImagesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * This service will extract at most the first 10 frames (gif) or pages + * (pdf or tiff) from each file provided and perform detection and annotation + * for each image extracted. + *+ */ + public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse batchAnnotateFiles( + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request) { + return blockingUnaryCall( + getChannel(), getBatchAnnotateFilesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Run asynchronous image detection and annotation for a list of images. + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + *+ */ + public com.google.longrunning.Operation asyncBatchAnnotateImages( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest request) { + return blockingUnaryCall( + getChannel(), getAsyncBatchAnnotateImagesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + *+ */ + public com.google.longrunning.Operation asyncBatchAnnotateFiles( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest request) { + return blockingUnaryCall( + getChannel(), getAsyncBatchAnnotateFilesMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+ * Service that performs Google Cloud Vision API detection tasks over client + * images, such as face, landmark, logo, label, and text detection. The + * ImageAnnotator service returns detected entities from the images. + *+ */ + public static final class ImageAnnotatorFutureStub + extends io.grpc.stub.AbstractStub
+ * Run image detection and annotation for a batch of images. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse> + batchAnnotateImages(com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchAnnotateImagesMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Service that performs image detection and annotation for a batch of files. + * Now only "application/pdf", "image/tiff" and "image/gif" are supported. + * This service will extract at most the first 10 frames (gif) or pages + * (pdf or tiff) from each file provided and perform detection and annotation + * for each image extracted. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse> + batchAnnotateFiles(com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest request) { + return futureUnaryCall( + getChannel().newCall(getBatchAnnotateFilesMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Run asynchronous image detection and annotation for a list of images. + * Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + * This service will write image annotation outputs to json files in customer + * GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Run asynchronous image detection and annotation for a list of generic + * files, such as PDF files, which may contain multiple pages and multiple + * images per page. Progress and results can be retrieved through the + * `google.longrunning.Operations` interface. + * `Operation.metadata` contains `OperationMetadata` (metadata). + * `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * - The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named + * `projects/*/locations/*/productSets/*`, which acts as a way to put different + * products into groups to limit identification. + * In parallel, + * - The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, named + * `projects/*/locations/*/products/*` + * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/vision/v1p4beta1/product_search_service.proto") +public final class ProductSearchGrpc { + + private ProductSearchGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.vision.v1p4beta1.ProductSearch"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateProductSetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest, + com.google.cloud.vision.v1p4beta1.ProductSet> + METHOD_CREATE_PRODUCT_SET = getCreateProductSetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest, + com.google.cloud.vision.v1p4beta1.ProductSet> + getCreateProductSetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest, + com.google.cloud.vision.v1p4beta1.ProductSet> + getCreateProductSetMethod() { + return getCreateProductSetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest, + com.google.cloud.vision.v1p4beta1.ProductSet> + getCreateProductSetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest, + com.google.cloud.vision.v1p4beta1.ProductSet> + getCreateProductSetMethod; + if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { + synchronized (ProductSearchGrpc.class) { + if ((getCreateProductSetMethod = ProductSearchGrpc.getCreateProductSetMethod) == null) { + ProductSearchGrpc.getCreateProductSetMethod = + getCreateProductSetMethod = + io.grpc.MethodDescriptor + .
+ * Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * - The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named + * `projects/*/locations/*/productSets/*`, which acts as a way to put different + * products into groups to limit identification. + * In parallel, + * - The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, named + * `projects/*/locations/*/products/*` + * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + *+ */ + public abstract static class ProductSearchImplBase implements io.grpc.BindableService { + + /** + * + * + *
+ * Creates and returns a new ProductSet resource. + * Possible errors: + * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + * 4096 characters. + *+ */ + public void createProductSet( + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Lists ProductSets in an unspecified order. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + *+ */ + public void listProductSets( + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request, + io.grpc.stub.StreamObserver
+ * Gets information associated with a ProductSet. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + *+ */ + public void getProductSet( + com.google.cloud.vision.v1p4beta1.GetProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + *+ */ + public void updateProductSet( + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * The actual image files are not deleted from Google Cloud Storage. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + *+ */ + public void deleteProductSet( + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Creates and returns a new product resource. + * Possible errors: + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + *+ */ + public void createProduct( + com.google.cloud.vision.v1p4beta1.CreateProductRequest request, + io.grpc.stub.StreamObserver
+ * Lists products in an unspecified order. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *+ */ + public void listProducts( + com.google.cloud.vision.v1p4beta1.ListProductsRequest request, + io.grpc.stub.StreamObserver
+ * Gets information associated with a Product. + * Possible errors: + * * Returns NOT_FOUND if the Product does not exist. + *+ */ + public void getProduct( + com.google.cloud.vision.v1p4beta1.GetProductRequest request, + io.grpc.stub.StreamObserver
+ * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * Possible errors: + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + *+ */ + public void updateProduct( + com.google.cloud.vision.v1p4beta1.UpdateProductRequest request, + io.grpc.stub.StreamObserver
+ * Permanently deletes a product and its reference images. + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * Possible errors: + * * Returns NOT_FOUND if the product does not exist. + *+ */ + public void deleteProduct( + com.google.cloud.vision.v1p4beta1.DeleteProductRequest request, + io.grpc.stub.StreamObserver
+ * Creates and returns a new ReferenceImage resource. + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * Possible errors: + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *+ */ + public void createReferenceImage( + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request, + io.grpc.stub.StreamObserver
+ * Permanently deletes a reference image. + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * The actual image files are not deleted from Google Cloud Storage. + * Possible errors: + * * Returns NOT_FOUND if the reference image does not exist. + *+ */ + public void deleteReferenceImage( + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request, + io.grpc.stub.StreamObserver
+ * Lists reference images. + * Possible errors: + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + *+ */ + public void listReferenceImages( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request, + io.grpc.stub.StreamObserver
+ * Gets information associated with a ReferenceImage. + * Possible errors: + * * Returns NOT_FOUND if the specified image does not exist. + *+ */ + public void getReferenceImage( + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request, + io.grpc.stub.StreamObserver
+ * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * One Product can be added to at most 100 ProductSets. + * Possible errors: + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *+ */ + public void addProductToProductSet( + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Removes a Product from the specified ProductSet. + * Possible errors: + * * Returns NOT_FOUND If the Product is not found under the ProductSet. + *+ */ + public void removeProductFromProductSet( + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *+ */ + public void listProductsInProductSet( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListProductsInProductSetMethodHelper(), responseObserver); + } + + /** + * + * + *
+ * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + *+ */ + public void importProductSets( + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request, + io.grpc.stub.StreamObserver
+ * Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * - The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named + * `projects/*/locations/*/productSets/*`, which acts as a way to put different + * products into groups to limit identification. + * In parallel, + * - The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, named + * `projects/*/locations/*/products/*` + * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + *+ */ + public static final class ProductSearchStub extends io.grpc.stub.AbstractStub
+ * Creates and returns a new ProductSet resource. + * Possible errors: + * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + * 4096 characters. + *+ */ + public void createProductSet( + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Lists ProductSets in an unspecified order. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + *+ */ + public void listProductSets( + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request, + io.grpc.stub.StreamObserver
+ * Gets information associated with a ProductSet. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + *+ */ + public void getProductSet( + com.google.cloud.vision.v1p4beta1.GetProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + *+ */ + public void updateProductSet( + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * The actual image files are not deleted from Google Cloud Storage. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + *+ */ + public void deleteProductSet( + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Creates and returns a new product resource. + * Possible errors: + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + *+ */ + public void createProduct( + com.google.cloud.vision.v1p4beta1.CreateProductRequest request, + io.grpc.stub.StreamObserver
+ * Lists products in an unspecified order. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *+ */ + public void listProducts( + com.google.cloud.vision.v1p4beta1.ListProductsRequest request, + io.grpc.stub.StreamObserver
+ * Gets information associated with a Product. + * Possible errors: + * * Returns NOT_FOUND if the Product does not exist. + *+ */ + public void getProduct( + com.google.cloud.vision.v1p4beta1.GetProductRequest request, + io.grpc.stub.StreamObserver
+ * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * Possible errors: + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + *+ */ + public void updateProduct( + com.google.cloud.vision.v1p4beta1.UpdateProductRequest request, + io.grpc.stub.StreamObserver
+ * Permanently deletes a product and its reference images. + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * Possible errors: + * * Returns NOT_FOUND if the product does not exist. + *+ */ + public void deleteProduct( + com.google.cloud.vision.v1p4beta1.DeleteProductRequest request, + io.grpc.stub.StreamObserver
+ * Creates and returns a new ReferenceImage resource. + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * Possible errors: + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *+ */ + public void createReferenceImage( + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request, + io.grpc.stub.StreamObserver
+ * Permanently deletes a reference image. + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * The actual image files are not deleted from Google Cloud Storage. + * Possible errors: + * * Returns NOT_FOUND if the reference image does not exist. + *+ */ + public void deleteReferenceImage( + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request, + io.grpc.stub.StreamObserver
+ * Lists reference images. + * Possible errors: + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + *+ */ + public void listReferenceImages( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request, + io.grpc.stub.StreamObserver
+ * Gets information associated with a ReferenceImage. + * Possible errors: + * * Returns NOT_FOUND if the specified image does not exist. + *+ */ + public void getReferenceImage( + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request, + io.grpc.stub.StreamObserver
+ * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * One Product can be added to at most 100 ProductSets. + * Possible errors: + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *+ */ + public void addProductToProductSet( + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Removes a Product from the specified ProductSet. + * Possible errors: + * * Returns NOT_FOUND If the Product is not found under the ProductSet. + *+ */ + public void removeProductFromProductSet( + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request, + io.grpc.stub.StreamObserver
+ * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *+ */ + public void listProductsInProductSet( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListProductsInProductSetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+ * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + *+ */ + public void importProductSets( + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request, + io.grpc.stub.StreamObserver
+ * Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * - The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named + * `projects/*/locations/*/productSets/*`, which acts as a way to put different + * products into groups to limit identification. + * In parallel, + * - The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, named + * `projects/*/locations/*/products/*` + * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + *+ */ + public static final class ProductSearchBlockingStub + extends io.grpc.stub.AbstractStub
+ * Creates and returns a new ProductSet resource. + * Possible errors: + * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + * 4096 characters. + *+ */ + public com.google.cloud.vision.v1p4beta1.ProductSet createProductSet( + com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request) { + return blockingUnaryCall( + getChannel(), getCreateProductSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists ProductSets in an unspecified order. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + *+ */ + public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse listProductSets( + com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request) { + return blockingUnaryCall( + getChannel(), getListProductSetsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets information associated with a ProductSet. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + *+ */ + public com.google.cloud.vision.v1p4beta1.ProductSet getProductSet( + com.google.cloud.vision.v1p4beta1.GetProductSetRequest request) { + return blockingUnaryCall( + getChannel(), getGetProductSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + *+ */ + public com.google.cloud.vision.v1p4beta1.ProductSet updateProductSet( + com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateProductSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * The actual image files are not deleted from Google Cloud Storage. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + *+ */ + public com.google.protobuf.Empty deleteProductSet( + com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteProductSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates and returns a new product resource. + * Possible errors: + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + *+ */ + public com.google.cloud.vision.v1p4beta1.Product createProduct( + com.google.cloud.vision.v1p4beta1.CreateProductRequest request) { + return blockingUnaryCall( + getChannel(), getCreateProductMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists products in an unspecified order. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *+ */ + public com.google.cloud.vision.v1p4beta1.ListProductsResponse listProducts( + com.google.cloud.vision.v1p4beta1.ListProductsRequest request) { + return blockingUnaryCall( + getChannel(), getListProductsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets information associated with a Product. + * Possible errors: + * * Returns NOT_FOUND if the Product does not exist. + *+ */ + public com.google.cloud.vision.v1p4beta1.Product getProduct( + com.google.cloud.vision.v1p4beta1.GetProductRequest request) { + return blockingUnaryCall( + getChannel(), getGetProductMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * Possible errors: + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + *+ */ + public com.google.cloud.vision.v1p4beta1.Product updateProduct( + com.google.cloud.vision.v1p4beta1.UpdateProductRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateProductMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Permanently deletes a product and its reference images. + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * Possible errors: + * * Returns NOT_FOUND if the product does not exist. + *+ */ + public com.google.protobuf.Empty deleteProduct( + com.google.cloud.vision.v1p4beta1.DeleteProductRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteProductMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Creates and returns a new ReferenceImage resource. + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * Possible errors: + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *+ */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage createReferenceImage( + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request) { + return blockingUnaryCall( + getChannel(), getCreateReferenceImageMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Permanently deletes a reference image. + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * The actual image files are not deleted from Google Cloud Storage. + * Possible errors: + * * Returns NOT_FOUND if the reference image does not exist. + *+ */ + public com.google.protobuf.Empty deleteReferenceImage( + com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteReferenceImageMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists reference images. + * Possible errors: + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + *+ */ + public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse listReferenceImages( + com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request) { + return blockingUnaryCall( + getChannel(), getListReferenceImagesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Gets information associated with a ReferenceImage. + * Possible errors: + * * Returns NOT_FOUND if the specified image does not exist. + *+ */ + public com.google.cloud.vision.v1p4beta1.ReferenceImage getReferenceImage( + com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request) { + return blockingUnaryCall( + getChannel(), getGetReferenceImageMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * One Product can be added to at most 100 ProductSets. + * Possible errors: + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *+ */ + public com.google.protobuf.Empty addProductToProductSet( + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest request) { + return blockingUnaryCall( + getChannel(), getAddProductToProductSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Removes a Product from the specified ProductSet. + * Possible errors: + * * Returns NOT_FOUND If the Product is not found under the ProductSet. + *+ */ + public com.google.protobuf.Empty removeProductFromProductSet( + com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest request) { + return blockingUnaryCall( + getChannel(), getRemoveProductFromProductSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *+ */ + public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse + listProductsInProductSet( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request) { + return blockingUnaryCall( + getChannel(), getListProductsInProductSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+ * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + *+ */ + public com.google.longrunning.Operation importProductSets( + com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest request) { + return blockingUnaryCall( + getChannel(), getImportProductSetsMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+ * Manages Products and ProductSets of reference images for use in product + * search. It uses the following resource model: + * - The API has a collection of [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named + * `projects/*/locations/*/productSets/*`, which acts as a way to put different + * products into groups to limit identification. + * In parallel, + * - The API has a collection of [Product][google.cloud.vision.v1p4beta1.Product] resources, named + * `projects/*/locations/*/products/*` + * - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, named + * `projects/*/locations/*/products/*/referenceImages/*` + *+ */ + public static final class ProductSearchFutureStub + extends io.grpc.stub.AbstractStub
+ * Creates and returns a new ProductSet resource. + * Possible errors: + * * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + * 4096 characters. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ProductSet> + createProductSet(com.google.cloud.vision.v1p4beta1.CreateProductSetRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateProductSetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Lists ProductSets in an unspecified order. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + * than 1. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ListProductSetsResponse> + listProductSets(com.google.cloud.vision.v1p4beta1.ListProductSetsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListProductSetsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Gets information associated with a ProductSet. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ProductSet> + getProductSet(com.google.cloud.vision.v1p4beta1.GetProductSetRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetProductSetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Makes changes to a ProductSet resource. + * Only display_name can be updated currently. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but + * missing from the request or longer than 4096 characters. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ProductSet> + updateProductSet(com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateProductSetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Permanently deletes a ProductSet. Products and ReferenceImages in the + * ProductSet are not deleted. + * The actual image files are not deleted from Google Cloud Storage. + * Possible errors: + * * Returns NOT_FOUND if the ProductSet does not exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Creates and returns a new product resource. + * Possible errors: + * * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is missing or invalid. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.Product> + createProduct(com.google.cloud.vision.v1p4beta1.CreateProductRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateProductMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Lists products in an unspecified order. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ListProductsResponse> + listProducts(com.google.cloud.vision.v1p4beta1.ListProductsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListProductsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Gets information associated with a Product. + * Possible errors: + * * Returns NOT_FOUND if the Product does not exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.Product> + getProduct(com.google.cloud.vision.v1p4beta1.GetProductRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetProductMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Makes changes to a Product resource. + * Only the `display_name`, `description`, and `labels` fields can be updated + * right now. + * If labels are updated, the change will not be reflected in queries until + * the next index time. + * Possible errors: + * * Returns NOT_FOUND if the Product does not exist. + * * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + * missing from the request or longer than 4096 characters. + * * Returns INVALID_ARGUMENT if description is present in update_mask but is + * longer than 4096 characters. + * * Returns INVALID_ARGUMENT if product_category is present in update_mask. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.Product> + updateProduct(com.google.cloud.vision.v1p4beta1.UpdateProductRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateProductMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Permanently deletes a product and its reference images. + * Metadata of the product and all its images will be deleted right away, but + * search queries against ProductSets containing the product may still work + * until all related caches are refreshed. + * Possible errors: + * * Returns NOT_FOUND if the product does not exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Creates and returns a new ReferenceImage resource. + * The `bounding_poly` field is optional. If `bounding_poly` is not specified, + * the system will try to detect regions of interest in the image that are + * compatible with the product_category on the parent product. If it is + * specified, detection is ALWAYS skipped. The system converts polygons into + * non-rotated rectangles. + * Note that the pipeline will resize the image if the image resolution is too + * large to process (above 50MP). + * Possible errors: + * * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + * characters. + * * Returns INVALID_ARGUMENT if the product does not exist. + * * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + * compatible with the parent product's product_category is detected. + * * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ReferenceImage> + createReferenceImage( + com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateReferenceImageMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Permanently deletes a reference image. + * The image metadata will be deleted right away, but search queries + * against ProductSets containing the image may still work until all related + * caches are refreshed. + * The actual image files are not deleted from Google Cloud Storage. + * Possible errors: + * * Returns NOT_FOUND if the reference image does not exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Lists reference images. + * Possible errors: + * * Returns NOT_FOUND if the parent product does not exist. + * * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + * than 1. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse> + listReferenceImages(com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListReferenceImagesMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Gets information associated with a ReferenceImage. + * Possible errors: + * * Returns NOT_FOUND if the specified image does not exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ReferenceImage> + getReferenceImage(com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetReferenceImageMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+ * Adds a Product to the specified ProductSet. If the Product is already + * present, no change is made. + * One Product can be added to at most 100 ProductSets. + * Possible errors: + * * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Removes a Product from the specified ProductSet. + * Possible errors: + * * Returns NOT_FOUND If the Product is not found under the ProductSet. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Lists the Products in a ProductSet, in an unspecified order. If the + * ProductSet does not exist, the products field of the response will be + * empty. + * Possible errors: + * * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + *+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse> + listProductsInProductSet( + com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest request) { + return futureUnaryCall( + getChannel().newCall(getListProductsInProductSetMethodHelper(), getCallOptions()), + request); + } + + /** + * + * + *
+ * Asynchronous API that imports a list of reference images to specified + * product sets based on a list of image information. + * The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + * progress and results of the request. + * `Operation.metadata` contains `BatchOperationMetadata`. (progress) + * `Operation.response` contains `ImportProductSetsResponse`. (results) + * The input source of this method is a csv file on Google Cloud Storage. + * For the format of the csv file please see + * [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * Request message for the `AddProductToProductSet` method. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} + */ +public final class AddProductToProductSetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) + AddProductToProductSetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddProductToProductSetRequest.newBuilder() to construct. + private AddProductToProductSetRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AddProductToProductSetRequest() { + name_ = ""; + product_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AddProductToProductSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + product_ = s; + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto + .internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ProductSearchServiceProto + .internal_static_google_cloud_vision_v1p4beta1_AddProductToProductSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.class, + com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PRODUCT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object product_;
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ public java.lang.String getProduct() {
+ java.lang.Object ref = product_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ product_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ public com.google.protobuf.ByteString getProductBytes() {
+ java.lang.Object ref = product_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ product_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!getProductBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!getProductBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest other =
+ (com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) obj;
+
+ boolean result = true;
+ result = result && getName().equals(other.getName());
+ result = result && getProduct().equals(other.getProduct());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + PRODUCT_FIELD_NUMBER;
+ hash = (53 * hash) + getProduct().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request message for the `AddProductToProductSet` method. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object product_ = "";
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ public java.lang.String getProduct() {
+ java.lang.Object ref = product_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ product_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ public com.google.protobuf.ByteString getProductBytes() {
+ java.lang.Object ref = product_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ product_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ public Builder setProduct(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ product_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ public Builder clearProduct() {
+
+ product_ = getDefaultInstance().getProduct();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ public Builder setProductBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ product_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest)
+ private static final com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest();
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The resource name for the ProductSet to modify. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + *+ * + *
string name = 1;
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ java.lang.String getProduct();
+ /**
+ *
+ *
+ * + * The resource name for the Product to be added to this ProductSet. + * Format is: + * `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` + *+ * + *
string product = 2;
+ */
+ com.google.protobuf.ByteString getProductBytes();
+}
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java
new file mode 100644
index 000000000000..0b50c97d8e32
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java
@@ -0,0 +1,1771 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/vision/v1p4beta1/image_annotator.proto
+
+package com.google.cloud.vision.v1p4beta1;
+
+/**
+ *
+ *
+ * + * A request to annotate one single file, e.g. a PDF, TIFF or GIF file. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileRequest} + */ +public final class AnnotateFileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateFileRequest) + AnnotateFileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateFileRequest.newBuilder() to construct. + private AnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AnnotateFileRequest() { + features_ = java.util.Collections.emptyList(); + pages_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateFileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = + input.readMessage( + com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + features_ = new java.util.ArrayList
+ * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public boolean hasInputConfig() {
+ return inputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() {
+ return getInputConfig();
+ }
+
+ public static final int FEATURES_FIELD_NUMBER = 2;
+ private java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList() {
+ return features_;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public int getFeaturesCount() {
+ return features_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) {
+ return features_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index) {
+ return features_.get(index);
+ }
+
+ public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3;
+ private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_;
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public boolean hasImageContext() {
+ return imageContext_ != null;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() {
+ return getImageContext();
+ }
+
+ public static final int PAGES_FIELD_NUMBER = 4;
+ private java.util.List+ * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public java.util.List+ * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public int getPagesCount() {
+ return pages_.size();
+ }
+ /**
+ *
+ *
+ * + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public int getPages(int index) {
+ return pages_.get(index);
+ }
+
+ private int pagesMemoizedSerializedSize = -1;
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ getSerializedSize();
+ if (inputConfig_ != null) {
+ output.writeMessage(1, getInputConfig());
+ }
+ for (int i = 0; i < features_.size(); i++) {
+ output.writeMessage(2, features_.get(i));
+ }
+ if (imageContext_ != null) {
+ output.writeMessage(3, getImageContext());
+ }
+ if (getPagesList().size() > 0) {
+ output.writeUInt32NoTag(34);
+ output.writeUInt32NoTag(pagesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < pages_.size(); i++) {
+ output.writeInt32NoTag(pages_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (inputConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputConfig());
+ }
+ for (int i = 0; i < features_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, features_.get(i));
+ }
+ if (imageContext_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImageContext());
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < pages_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(pages_.get(i));
+ }
+ size += dataSize;
+ if (!getPagesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
+ }
+ pagesMemoizedSerializedSize = dataSize;
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AnnotateFileRequest other =
+ (com.google.cloud.vision.v1p4beta1.AnnotateFileRequest) obj;
+
+ boolean result = true;
+ result = result && (hasInputConfig() == other.hasInputConfig());
+ if (hasInputConfig()) {
+ result = result && getInputConfig().equals(other.getInputConfig());
+ }
+ result = result && getFeaturesList().equals(other.getFeaturesList());
+ result = result && (hasImageContext() == other.hasImageContext());
+ if (hasImageContext()) {
+ result = result && getImageContext().equals(other.getImageContext());
+ }
+ result = result && getPagesList().equals(other.getPagesList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasInputConfig()) {
+ hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getInputConfig().hashCode();
+ }
+ if (getFeaturesCount() > 0) {
+ hash = (37 * hash) + FEATURES_FIELD_NUMBER;
+ hash = (53 * hash) + getFeaturesList().hashCode();
+ }
+ if (hasImageContext()) {
+ hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER;
+ hash = (53 * hash) + getImageContext().hashCode();
+ }
+ if (getPagesCount() > 0) {
+ hash = (37 * hash) + PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + getPagesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AnnotateFileRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * A request to annotate one single file, e.g. a PDF, TIFF or GIF file. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public boolean hasInputConfig() {
+ return inputConfigBuilder_ != null || inputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() {
+ if (inputConfigBuilder_ == null) {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ } else {
+ return inputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) {
+ if (inputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ inputConfig_ = value;
+ onChanged();
+ } else {
+ inputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder setInputConfig(
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) {
+ if (inputConfigBuilder_ == null) {
+ inputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ inputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) {
+ if (inputConfigBuilder_ == null) {
+ if (inputConfig_ != null) {
+ inputConfig_ =
+ com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ inputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ inputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder clearInputConfig() {
+ if (inputConfigBuilder_ == null) {
+ inputConfig_ = null;
+ onChanged();
+ } else {
+ inputConfig_ = null;
+ inputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() {
+
+ onChanged();
+ return getInputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() {
+ if (inputConfigBuilder_ != null) {
+ return inputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.InputConfig,
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>
+ getInputConfigFieldBuilder() {
+ if (inputConfigBuilder_ == null) {
+ inputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.InputConfig,
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>(
+ getInputConfig(), getParentForChildren(), isClean());
+ inputConfig_ = null;
+ }
+ return inputConfigBuilder_;
+ }
+
+ private java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public int getFeaturesCount() {
+ if (featuresBuilder_ == null) {
+ return features_.size();
+ } else {
+ return featuresBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) {
+ if (featuresBuilder_ == null) {
+ return features_.get(index);
+ } else {
+ return featuresBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder setFeatures(int index, com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.set(index, value);
+ onChanged();
+ } else {
+ featuresBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder setFeatures(
+ int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.add(value);
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(int index, com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.add(index, value);
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.add(builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(
+ int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addAllFeatures(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.Feature> values) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, features_);
+ onChanged();
+ } else {
+ featuresBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder clearFeatures() {
+ if (featuresBuilder_ == null) {
+ features_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ featuresBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder removeFeatures(int index) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.remove(index);
+ onChanged();
+ } else {
+ featuresBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder(int index) {
+ return getFeaturesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index) {
+ if (featuresBuilder_ == null) {
+ return features_.get(index);
+ } else {
+ return featuresBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList() {
+ if (featuresBuilder_ != null) {
+ return featuresBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(features_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() {
+ return getFeaturesFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder(int index) {
+ return getFeaturesFieldBuilder()
+ .addBuilder(index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public boolean hasImageContext() {
+ return imageContextBuilder_ != null || imageContext_ != null;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() {
+ if (imageContextBuilder_ == null) {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ } else {
+ return imageContextBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) {
+ if (imageContextBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ imageContext_ = value;
+ onChanged();
+ } else {
+ imageContextBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder setImageContext(
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) {
+ if (imageContextBuilder_ == null) {
+ imageContext_ = builderForValue.build();
+ onChanged();
+ } else {
+ imageContextBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) {
+ if (imageContextBuilder_ == null) {
+ if (imageContext_ != null) {
+ imageContext_ =
+ com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ imageContext_ = value;
+ }
+ onChanged();
+ } else {
+ imageContextBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder clearImageContext() {
+ if (imageContextBuilder_ == null) {
+ imageContext_ = null;
+ onChanged();
+ } else {
+ imageContext_ = null;
+ imageContextBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() {
+
+ onChanged();
+ return getImageContextFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() {
+ if (imageContextBuilder_ != null) {
+ return imageContextBuilder_.getMessageOrBuilder();
+ } else {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageContext,
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>
+ getImageContextFieldBuilder() {
+ if (imageContextBuilder_ == null) {
+ imageContextBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageContext,
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>(
+ getImageContext(), getParentForChildren(), isClean());
+ imageContext_ = null;
+ }
+ return imageContextBuilder_;
+ }
+
+ private java.util.List+ * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public java.util.List+ * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public int getPagesCount() {
+ return pages_.size();
+ }
+ /**
+ *
+ *
+ * + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public int getPages(int index) {
+ return pages_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public Builder setPages(int index, int value) {
+ ensurePagesIsMutable();
+ pages_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public Builder addPages(int value) {
+ ensurePagesIsMutable();
+ pages_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public Builder addAllPages(java.lang.Iterable extends java.lang.Integer> values) {
+ ensurePagesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pages_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ public Builder clearPages() {
+ pages_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateFileRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileRequest)
+ private static final com.google.cloud.vision.v1p4beta1.AnnotateFileRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateFileRequest();
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ boolean hasInputConfig();
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig();
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index);
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ int getFeaturesCount();
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList();
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ boolean hasImageContext();
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageContext getImageContext();
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder();
+
+ /**
+ *
+ *
+ * + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ java.util.List+ * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ int getPagesCount();
+ /**
+ *
+ *
+ * + * Pages of the file to perform image annotation. + * Pages starts from 1, we assume the first page of the file is page 1. + * At most 5 pages are supported per request. Pages can be negative. + * Page 1 means the first page. + * Page 2 means the second page. + * Page -1 means the last page. + * Page -2 means the second to the last page. + * If the file is GIF instead of PDF or TIFF, page refers to GIF frames. + * If this field is empty, by default the service performs image annotation + * for the first 5 pages of the file. + *+ * + *
repeated int32 pages = 4;
+ */
+ int getPages(int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java
new file mode 100644
index 000000000000..461962b0f86a
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java
@@ -0,0 +1,1299 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/vision/v1p4beta1/image_annotator.proto
+
+package com.google.cloud.vision.v1p4beta1;
+
+/**
+ *
+ *
+ * + * Response to a single file annotation request. A file may contain one or more + * images, which individually have their own responses. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileResponse} + */ +public final class AnnotateFileResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateFileResponse) + AnnotateFileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateFileResponse.newBuilder() to construct. + private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AnnotateFileResponse() { + responses_ = java.util.Collections.emptyList(); + totalPages_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = + input.readMessage( + com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + responses_ = + new java.util.ArrayList< + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse>(); + mutable_bitField0_ |= 0x00000002; + } + responses_.add( + input.readMessage( + com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.parser(), + extensionRegistry)); + break; + } + case 24: + { + totalPages_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto + .internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto + .internal_static_google_cloud_vision_v1p4beta1_AnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.class, + com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder.class); + } + + private int bitField0_; + public static final int INPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; + /** + * + * + *
+ * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public boolean hasInputConfig() {
+ return inputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() {
+ return getInputConfig();
+ }
+
+ public static final int RESPONSES_FIELD_NUMBER = 2;
+ private java.util.List+ * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public java.util.List+ * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>
+ getResponsesOrBuilderList() {
+ return responses_;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public int getResponsesCount() {
+ return responses_.size();
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) {
+ return responses_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder(
+ int index) {
+ return responses_.get(index);
+ }
+
+ public static final int TOTAL_PAGES_FIELD_NUMBER = 3;
+ private int totalPages_;
+ /**
+ *
+ *
+ * + * This field gives the total number of pages in the file. + *+ * + *
int32 total_pages = 3;
+ */
+ public int getTotalPages() {
+ return totalPages_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (inputConfig_ != null) {
+ output.writeMessage(1, getInputConfig());
+ }
+ for (int i = 0; i < responses_.size(); i++) {
+ output.writeMessage(2, responses_.get(i));
+ }
+ if (totalPages_ != 0) {
+ output.writeInt32(3, totalPages_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (inputConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputConfig());
+ }
+ for (int i = 0; i < responses_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, responses_.get(i));
+ }
+ if (totalPages_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalPages_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateFileResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AnnotateFileResponse other =
+ (com.google.cloud.vision.v1p4beta1.AnnotateFileResponse) obj;
+
+ boolean result = true;
+ result = result && (hasInputConfig() == other.hasInputConfig());
+ if (hasInputConfig()) {
+ result = result && getInputConfig().equals(other.getInputConfig());
+ }
+ result = result && getResponsesList().equals(other.getResponsesList());
+ result = result && (getTotalPages() == other.getTotalPages());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasInputConfig()) {
+ hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getInputConfig().hashCode();
+ }
+ if (getResponsesCount() > 0) {
+ hash = (37 * hash) + RESPONSES_FIELD_NUMBER;
+ hash = (53 * hash) + getResponsesList().hashCode();
+ }
+ hash = (37 * hash) + TOTAL_PAGES_FIELD_NUMBER;
+ hash = (53 * hash) + getTotalPages();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AnnotateFileResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Response to a single file annotation request. A file may contain one or more + * images, which individually have their own responses. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateFileResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public boolean hasInputConfig() {
+ return inputConfigBuilder_ != null || inputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() {
+ if (inputConfigBuilder_ == null) {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ } else {
+ return inputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) {
+ if (inputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ inputConfig_ = value;
+ onChanged();
+ } else {
+ inputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder setInputConfig(
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) {
+ if (inputConfigBuilder_ == null) {
+ inputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ inputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) {
+ if (inputConfigBuilder_ == null) {
+ if (inputConfig_ != null) {
+ inputConfig_ =
+ com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ inputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ inputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder clearInputConfig() {
+ if (inputConfigBuilder_ == null) {
+ inputConfig_ = null;
+ onChanged();
+ } else {
+ inputConfig_ = null;
+ inputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() {
+
+ onChanged();
+ return getInputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() {
+ if (inputConfigBuilder_ != null) {
+ return inputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.InputConfig,
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>
+ getInputConfigFieldBuilder() {
+ if (inputConfigBuilder_ == null) {
+ inputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.InputConfig,
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>(
+ getInputConfig(), getParentForChildren(), isClean());
+ inputConfig_ = null;
+ }
+ return inputConfigBuilder_;
+ }
+
+ private java.util.List+ * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public java.util.List+ * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public int getResponsesCount() {
+ if (responsesBuilder_ == null) {
+ return responses_.size();
+ } else {
+ return responsesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index) {
+ if (responsesBuilder_ == null) {
+ return responses_.get(index);
+ } else {
+ return responsesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder setResponses(
+ int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) {
+ if (responsesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResponsesIsMutable();
+ responses_.set(index, value);
+ onChanged();
+ } else {
+ responsesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder setResponses(
+ int index,
+ com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ responses_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ responsesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder addResponses(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) {
+ if (responsesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResponsesIsMutable();
+ responses_.add(value);
+ onChanged();
+ } else {
+ responsesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder addResponses(
+ int index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse value) {
+ if (responsesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResponsesIsMutable();
+ responses_.add(index, value);
+ onChanged();
+ } else {
+ responsesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder addResponses(
+ com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ responses_.add(builderForValue.build());
+ onChanged();
+ } else {
+ responsesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder addResponses(
+ int index,
+ com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder builderForValue) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ responses_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ responsesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder addAllResponses(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.AnnotateImageResponse>
+ values) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, responses_);
+ onChanged();
+ } else {
+ responsesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder clearResponses() {
+ if (responsesBuilder_ == null) {
+ responses_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ responsesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public Builder removeResponses(int index) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ responses_.remove(index);
+ onChanged();
+ } else {
+ responsesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder getResponsesBuilder(
+ int index) {
+ return getResponsesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder(
+ int index) {
+ if (responsesBuilder_ == null) {
+ return responses_.get(index);
+ } else {
+ return responsesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>
+ getResponsesOrBuilderList() {
+ if (responsesBuilder_ != null) {
+ return responsesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(responses_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder() {
+ return getResponsesFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addResponsesBuilder(
+ int index) {
+ return getResponsesFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ public java.util.List+ * This field gives the total number of pages in the file. + *+ * + *
int32 total_pages = 3;
+ */
+ public int getTotalPages() {
+ return totalPages_;
+ }
+ /**
+ *
+ *
+ * + * This field gives the total number of pages in the file. + *+ * + *
int32 total_pages = 3;
+ */
+ public Builder setTotalPages(int value) {
+
+ totalPages_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * This field gives the total number of pages in the file. + *+ * + *
int32 total_pages = 3;
+ */
+ public Builder clearTotalPages() {
+
+ totalPages_ = 0;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateFileResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileResponse)
+ private static final com.google.cloud.vision.v1p4beta1.AnnotateFileResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateFileResponse();
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateFileResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ boolean hasInputConfig();
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig();
+ /**
+ *
+ *
+ * + * Information about the file for which this response is generated. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ java.util.List+ * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getResponses(int index);
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ int getResponsesCount();
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>
+ getResponsesOrBuilderList();
+ /**
+ *
+ *
+ * + * Individual responses to images found within the file. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AnnotateImageResponse responses = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder getResponsesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * This field gives the total number of pages in the file. + *+ * + *
int32 total_pages = 3;
+ */
+ int getTotalPages();
+}
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java
new file mode 100644
index 000000000000..c08533736809
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java
@@ -0,0 +1,1464 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/vision/v1p4beta1/image_annotator.proto
+
+package com.google.cloud.vision.v1p4beta1;
+
+/**
+ *
+ *
+ * + * Request for performing Google Cloud Vision API tasks over a user-provided + * image, with user-requested features, and with context information. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageRequest} + */ +public final class AnnotateImageRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateImageRequest) + AnnotateImageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateImageRequest.newBuilder() to construct. + private AnnotateImageRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AnnotateImageRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.vision.v1p4beta1.Image.Builder subBuilder = null; + if (image_ != null) { + subBuilder = image_.toBuilder(); + } + image_ = + input.readMessage( + com.google.cloud.vision.v1p4beta1.Image.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(image_); + image_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + features_ = new java.util.ArrayList
+ * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public boolean hasImage() {
+ return image_ != null;
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.Image getImage() {
+ return image_ == null ? com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance() : image_;
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder() {
+ return getImage();
+ }
+
+ public static final int FEATURES_FIELD_NUMBER = 2;
+ private java.util.List+ * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList() {
+ return features_;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public int getFeaturesCount() {
+ return features_.size();
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) {
+ return features_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index) {
+ return features_.get(index);
+ }
+
+ public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3;
+ private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_;
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public boolean hasImageContext() {
+ return imageContext_ != null;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() {
+ return getImageContext();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (image_ != null) {
+ output.writeMessage(1, getImage());
+ }
+ for (int i = 0; i < features_.size(); i++) {
+ output.writeMessage(2, features_.get(i));
+ }
+ if (imageContext_ != null) {
+ output.writeMessage(3, getImageContext());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (image_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getImage());
+ }
+ for (int i = 0; i < features_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, features_.get(i));
+ }
+ if (imageContext_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImageContext());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AnnotateImageRequest other =
+ (com.google.cloud.vision.v1p4beta1.AnnotateImageRequest) obj;
+
+ boolean result = true;
+ result = result && (hasImage() == other.hasImage());
+ if (hasImage()) {
+ result = result && getImage().equals(other.getImage());
+ }
+ result = result && getFeaturesList().equals(other.getFeaturesList());
+ result = result && (hasImageContext() == other.hasImageContext());
+ if (hasImageContext()) {
+ result = result && getImageContext().equals(other.getImageContext());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasImage()) {
+ hash = (37 * hash) + IMAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getImage().hashCode();
+ }
+ if (getFeaturesCount() > 0) {
+ hash = (37 * hash) + FEATURES_FIELD_NUMBER;
+ hash = (53 * hash) + getFeaturesList().hashCode();
+ }
+ if (hasImageContext()) {
+ hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER;
+ hash = (53 * hash) + getImageContext().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AnnotateImageRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Request for performing Google Cloud Vision API tasks over a user-provided + * image, with user-requested features, and with context information. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public boolean hasImage() {
+ return imageBuilder_ != null || image_ != null;
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.Image getImage() {
+ if (imageBuilder_ == null) {
+ return image_ == null
+ ? com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance()
+ : image_;
+ } else {
+ return imageBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public Builder setImage(com.google.cloud.vision.v1p4beta1.Image value) {
+ if (imageBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ image_ = value;
+ onChanged();
+ } else {
+ imageBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public Builder setImage(com.google.cloud.vision.v1p4beta1.Image.Builder builderForValue) {
+ if (imageBuilder_ == null) {
+ image_ = builderForValue.build();
+ onChanged();
+ } else {
+ imageBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public Builder mergeImage(com.google.cloud.vision.v1p4beta1.Image value) {
+ if (imageBuilder_ == null) {
+ if (image_ != null) {
+ image_ =
+ com.google.cloud.vision.v1p4beta1.Image.newBuilder(image_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ image_ = value;
+ }
+ onChanged();
+ } else {
+ imageBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public Builder clearImage() {
+ if (imageBuilder_ == null) {
+ image_ = null;
+ onChanged();
+ } else {
+ image_ = null;
+ imageBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.Image.Builder getImageBuilder() {
+
+ onChanged();
+ return getImageFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder() {
+ if (imageBuilder_ != null) {
+ return imageBuilder_.getMessageOrBuilder();
+ } else {
+ return image_ == null
+ ? com.google.cloud.vision.v1p4beta1.Image.getDefaultInstance()
+ : image_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.Image,
+ com.google.cloud.vision.v1p4beta1.Image.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageOrBuilder>
+ getImageFieldBuilder() {
+ if (imageBuilder_ == null) {
+ imageBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.Image,
+ com.google.cloud.vision.v1p4beta1.Image.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageOrBuilder>(
+ getImage(), getParentForChildren(), isClean());
+ image_ = null;
+ }
+ return imageBuilder_;
+ }
+
+ private java.util.List+ * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public int getFeaturesCount() {
+ if (featuresBuilder_ == null) {
+ return features_.size();
+ } else {
+ return featuresBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) {
+ if (featuresBuilder_ == null) {
+ return features_.get(index);
+ } else {
+ return featuresBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder setFeatures(int index, com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.set(index, value);
+ onChanged();
+ } else {
+ featuresBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder setFeatures(
+ int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.add(value);
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(int index, com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.add(index, value);
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.add(builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(
+ int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addAllFeatures(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.Feature> values) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, features_);
+ onChanged();
+ } else {
+ featuresBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder clearFeatures() {
+ if (featuresBuilder_ == null) {
+ features_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ featuresBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder removeFeatures(int index) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.remove(index);
+ onChanged();
+ } else {
+ featuresBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder(int index) {
+ return getFeaturesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index) {
+ if (featuresBuilder_ == null) {
+ return features_.get(index);
+ } else {
+ return featuresBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList() {
+ if (featuresBuilder_ != null) {
+ return featuresBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(features_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() {
+ return getFeaturesFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder(int index) {
+ return getFeaturesFieldBuilder()
+ .addBuilder(index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public boolean hasImageContext() {
+ return imageContextBuilder_ != null || imageContext_ != null;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() {
+ if (imageContextBuilder_ == null) {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ } else {
+ return imageContextBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) {
+ if (imageContextBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ imageContext_ = value;
+ onChanged();
+ } else {
+ imageContextBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder setImageContext(
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) {
+ if (imageContextBuilder_ == null) {
+ imageContext_ = builderForValue.build();
+ onChanged();
+ } else {
+ imageContextBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) {
+ if (imageContextBuilder_ == null) {
+ if (imageContext_ != null) {
+ imageContext_ =
+ com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ imageContext_ = value;
+ }
+ onChanged();
+ } else {
+ imageContextBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder clearImageContext() {
+ if (imageContextBuilder_ == null) {
+ imageContext_ = null;
+ onChanged();
+ } else {
+ imageContext_ = null;
+ imageContextBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() {
+
+ onChanged();
+ return getImageContextFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() {
+ if (imageContextBuilder_ != null) {
+ return imageContextBuilder_.getMessageOrBuilder();
+ } else {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageContext,
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>
+ getImageContextFieldBuilder() {
+ if (imageContextBuilder_ == null) {
+ imageContextBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageContext,
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>(
+ getImageContext(), getParentForChildren(), isClean());
+ imageContext_ = null;
+ }
+ return imageContextBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateImageRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateImageRequest)
+ private static final com.google.cloud.vision.v1p4beta1.AnnotateImageRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateImageRequest();
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ boolean hasImage();
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.Image getImage();
+ /**
+ *
+ *
+ * + * The image to be processed. + *+ * + *
.google.cloud.vision.v1p4beta1.Image image = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder();
+
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ java.util.List+ * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index);
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ int getFeaturesCount();
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList();
+ /**
+ *
+ *
+ * + * Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ boolean hasImageContext();
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageContext getImageContext();
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java
new file mode 100644
index 000000000000..364ff420f825
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java
@@ -0,0 +1,5775 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/vision/v1p4beta1/image_annotator.proto
+
+package com.google.cloud.vision.v1p4beta1;
+
+/**
+ *
+ *
+ * + * Response to an image annotation request. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageResponse} + */ +public final class AnnotateImageResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AnnotateImageResponse) + AnnotateImageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotateImageResponse.newBuilder() to construct. + private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AnnotateImageResponse() { + faceAnnotations_ = java.util.Collections.emptyList(); + landmarkAnnotations_ = java.util.Collections.emptyList(); + logoAnnotations_ = java.util.Collections.emptyList(); + labelAnnotations_ = java.util.Collections.emptyList(); + localizedObjectAnnotations_ = java.util.Collections.emptyList(); + textAnnotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotateImageResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + faceAnnotations_ = + new java.util.ArrayList
+ * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public java.util.List+ * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder>
+ getFaceAnnotationsOrBuilderList() {
+ return faceAnnotations_;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public int getFaceAnnotationsCount() {
+ return faceAnnotations_.size();
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index) {
+ return faceAnnotations_.get(index);
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder(
+ int index) {
+ return faceAnnotations_.get(index);
+ }
+
+ public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2;
+ private java.util.List+ * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ public java.util.List+ * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLandmarkAnnotationsOrBuilderList() {
+ return landmarkAnnotations_;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ public int getLandmarkAnnotationsCount() {
+ return landmarkAnnotations_.size();
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index) {
+ return landmarkAnnotations_.get(index);
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder
+ getLandmarkAnnotationsOrBuilder(int index) {
+ return landmarkAnnotations_.get(index);
+ }
+
+ public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3;
+ private java.util.List+ * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public java.util.List+ * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLogoAnnotationsOrBuilderList() {
+ return logoAnnotations_;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public int getLogoAnnotationsCount() {
+ return logoAnnotations_.size();
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index) {
+ return logoAnnotations_.get(index);
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder(
+ int index) {
+ return logoAnnotations_.get(index);
+ }
+
+ public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4;
+ private java.util.List+ * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public java.util.List+ * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLabelAnnotationsOrBuilderList() {
+ return labelAnnotations_;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public int getLabelAnnotationsCount() {
+ return labelAnnotations_.size();
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index) {
+ return labelAnnotations_.get(index);
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder(
+ int index) {
+ return labelAnnotations_.get(index);
+ }
+
+ public static final int LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER = 22;
+ private java.util.List+ * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public java.util.List+ * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public java.util.List<
+ ? extends com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder>
+ getLocalizedObjectAnnotationsOrBuilderList() {
+ return localizedObjectAnnotations_;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public int getLocalizedObjectAnnotationsCount() {
+ return localizedObjectAnnotations_.size();
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(
+ int index) {
+ return localizedObjectAnnotations_.get(index);
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder
+ getLocalizedObjectAnnotationsOrBuilder(int index) {
+ return localizedObjectAnnotations_.get(index);
+ }
+
+ public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5;
+ private java.util.List+ * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public java.util.List+ * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getTextAnnotationsOrBuilderList() {
+ return textAnnotations_;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public int getTextAnnotationsCount() {
+ return textAnnotations_.size();
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index) {
+ return textAnnotations_.get(index);
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder(
+ int index) {
+ return textAnnotations_.get(index);
+ }
+
+ public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12;
+ private com.google.cloud.vision.v1p4beta1.TextAnnotation fullTextAnnotation_;
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public boolean hasFullTextAnnotation() {
+ return fullTextAnnotation_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation() {
+ return fullTextAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance()
+ : fullTextAnnotation_;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder
+ getFullTextAnnotationOrBuilder() {
+ return getFullTextAnnotation();
+ }
+
+ public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6;
+ private com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safeSearchAnnotation_;
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public boolean hasSafeSearchAnnotation() {
+ return safeSearchAnnotation_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation() {
+ return safeSearchAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance()
+ : safeSearchAnnotation_;
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder
+ getSafeSearchAnnotationOrBuilder() {
+ return getSafeSearchAnnotation();
+ }
+
+ public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8;
+ private com.google.cloud.vision.v1p4beta1.ImageProperties imagePropertiesAnnotation_;
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public boolean hasImagePropertiesAnnotation() {
+ return imagePropertiesAnnotation_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation() {
+ return imagePropertiesAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance()
+ : imagePropertiesAnnotation_;
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder
+ getImagePropertiesAnnotationOrBuilder() {
+ return getImagePropertiesAnnotation();
+ }
+
+ public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11;
+ private com.google.cloud.vision.v1p4beta1.CropHintsAnnotation cropHintsAnnotation_;
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public boolean hasCropHintsAnnotation() {
+ return cropHintsAnnotation_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation() {
+ return cropHintsAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance()
+ : cropHintsAnnotation_;
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder
+ getCropHintsAnnotationOrBuilder() {
+ return getCropHintsAnnotation();
+ }
+
+ public static final int WEB_DETECTION_FIELD_NUMBER = 13;
+ private com.google.cloud.vision.v1p4beta1.WebDetection webDetection_;
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public boolean hasWebDetection() {
+ return webDetection_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection() {
+ return webDetection_ == null
+ ? com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance()
+ : webDetection_;
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() {
+ return getWebDetection();
+ }
+
+ public static final int PRODUCT_SEARCH_RESULTS_FIELD_NUMBER = 14;
+ private com.google.cloud.vision.v1p4beta1.ProductSearchResults productSearchResults_;
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public boolean hasProductSearchResults() {
+ return productSearchResults_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults() {
+ return productSearchResults_ == null
+ ? com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance()
+ : productSearchResults_;
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder
+ getProductSearchResultsOrBuilder() {
+ return getProductSearchResults();
+ }
+
+ public static final int ERROR_FIELD_NUMBER = 9;
+ private com.google.rpc.Status error_;
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public boolean hasError() {
+ return error_ != null;
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public com.google.rpc.Status getError() {
+ return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
+ return getError();
+ }
+
+ public static final int CONTEXT_FIELD_NUMBER = 21;
+ private com.google.cloud.vision.v1p4beta1.ImageAnnotationContext context_;
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public boolean hasContext() {
+ return context_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext() {
+ return context_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance()
+ : context_;
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() {
+ return getContext();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < faceAnnotations_.size(); i++) {
+ output.writeMessage(1, faceAnnotations_.get(i));
+ }
+ for (int i = 0; i < landmarkAnnotations_.size(); i++) {
+ output.writeMessage(2, landmarkAnnotations_.get(i));
+ }
+ for (int i = 0; i < logoAnnotations_.size(); i++) {
+ output.writeMessage(3, logoAnnotations_.get(i));
+ }
+ for (int i = 0; i < labelAnnotations_.size(); i++) {
+ output.writeMessage(4, labelAnnotations_.get(i));
+ }
+ for (int i = 0; i < textAnnotations_.size(); i++) {
+ output.writeMessage(5, textAnnotations_.get(i));
+ }
+ if (safeSearchAnnotation_ != null) {
+ output.writeMessage(6, getSafeSearchAnnotation());
+ }
+ if (imagePropertiesAnnotation_ != null) {
+ output.writeMessage(8, getImagePropertiesAnnotation());
+ }
+ if (error_ != null) {
+ output.writeMessage(9, getError());
+ }
+ if (cropHintsAnnotation_ != null) {
+ output.writeMessage(11, getCropHintsAnnotation());
+ }
+ if (fullTextAnnotation_ != null) {
+ output.writeMessage(12, getFullTextAnnotation());
+ }
+ if (webDetection_ != null) {
+ output.writeMessage(13, getWebDetection());
+ }
+ if (productSearchResults_ != null) {
+ output.writeMessage(14, getProductSearchResults());
+ }
+ if (context_ != null) {
+ output.writeMessage(21, getContext());
+ }
+ for (int i = 0; i < localizedObjectAnnotations_.size(); i++) {
+ output.writeMessage(22, localizedObjectAnnotations_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < faceAnnotations_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, faceAnnotations_.get(i));
+ }
+ for (int i = 0; i < landmarkAnnotations_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(2, landmarkAnnotations_.get(i));
+ }
+ for (int i = 0; i < logoAnnotations_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, logoAnnotations_.get(i));
+ }
+ for (int i = 0; i < labelAnnotations_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labelAnnotations_.get(i));
+ }
+ for (int i = 0; i < textAnnotations_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, textAnnotations_.get(i));
+ }
+ if (safeSearchAnnotation_ != null) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSafeSearchAnnotation());
+ }
+ if (imagePropertiesAnnotation_ != null) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 8, getImagePropertiesAnnotation());
+ }
+ if (error_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getError());
+ }
+ if (cropHintsAnnotation_ != null) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCropHintsAnnotation());
+ }
+ if (fullTextAnnotation_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getFullTextAnnotation());
+ }
+ if (webDetection_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getWebDetection());
+ }
+ if (productSearchResults_ != null) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(14, getProductSearchResults());
+ }
+ if (context_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getContext());
+ }
+ for (int i = 0; i < localizedObjectAnnotations_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 22, localizedObjectAnnotations_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AnnotateImageResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AnnotateImageResponse other =
+ (com.google.cloud.vision.v1p4beta1.AnnotateImageResponse) obj;
+
+ boolean result = true;
+ result = result && getFaceAnnotationsList().equals(other.getFaceAnnotationsList());
+ result = result && getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList());
+ result = result && getLogoAnnotationsList().equals(other.getLogoAnnotationsList());
+ result = result && getLabelAnnotationsList().equals(other.getLabelAnnotationsList());
+ result =
+ result
+ && getLocalizedObjectAnnotationsList()
+ .equals(other.getLocalizedObjectAnnotationsList());
+ result = result && getTextAnnotationsList().equals(other.getTextAnnotationsList());
+ result = result && (hasFullTextAnnotation() == other.hasFullTextAnnotation());
+ if (hasFullTextAnnotation()) {
+ result = result && getFullTextAnnotation().equals(other.getFullTextAnnotation());
+ }
+ result = result && (hasSafeSearchAnnotation() == other.hasSafeSearchAnnotation());
+ if (hasSafeSearchAnnotation()) {
+ result = result && getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation());
+ }
+ result = result && (hasImagePropertiesAnnotation() == other.hasImagePropertiesAnnotation());
+ if (hasImagePropertiesAnnotation()) {
+ result =
+ result && getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation());
+ }
+ result = result && (hasCropHintsAnnotation() == other.hasCropHintsAnnotation());
+ if (hasCropHintsAnnotation()) {
+ result = result && getCropHintsAnnotation().equals(other.getCropHintsAnnotation());
+ }
+ result = result && (hasWebDetection() == other.hasWebDetection());
+ if (hasWebDetection()) {
+ result = result && getWebDetection().equals(other.getWebDetection());
+ }
+ result = result && (hasProductSearchResults() == other.hasProductSearchResults());
+ if (hasProductSearchResults()) {
+ result = result && getProductSearchResults().equals(other.getProductSearchResults());
+ }
+ result = result && (hasError() == other.hasError());
+ if (hasError()) {
+ result = result && getError().equals(other.getError());
+ }
+ result = result && (hasContext() == other.hasContext());
+ if (hasContext()) {
+ result = result && getContext().equals(other.getContext());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getFaceAnnotationsCount() > 0) {
+ hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getFaceAnnotationsList().hashCode();
+ }
+ if (getLandmarkAnnotationsCount() > 0) {
+ hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getLandmarkAnnotationsList().hashCode();
+ }
+ if (getLogoAnnotationsCount() > 0) {
+ hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getLogoAnnotationsList().hashCode();
+ }
+ if (getLabelAnnotationsCount() > 0) {
+ hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getLabelAnnotationsList().hashCode();
+ }
+ if (getLocalizedObjectAnnotationsCount() > 0) {
+ hash = (37 * hash) + LOCALIZED_OBJECT_ANNOTATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getLocalizedObjectAnnotationsList().hashCode();
+ }
+ if (getTextAnnotationsCount() > 0) {
+ hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getTextAnnotationsList().hashCode();
+ }
+ if (hasFullTextAnnotation()) {
+ hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER;
+ hash = (53 * hash) + getFullTextAnnotation().hashCode();
+ }
+ if (hasSafeSearchAnnotation()) {
+ hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER;
+ hash = (53 * hash) + getSafeSearchAnnotation().hashCode();
+ }
+ if (hasImagePropertiesAnnotation()) {
+ hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER;
+ hash = (53 * hash) + getImagePropertiesAnnotation().hashCode();
+ }
+ if (hasCropHintsAnnotation()) {
+ hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER;
+ hash = (53 * hash) + getCropHintsAnnotation().hashCode();
+ }
+ if (hasWebDetection()) {
+ hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER;
+ hash = (53 * hash) + getWebDetection().hashCode();
+ }
+ if (hasProductSearchResults()) {
+ hash = (37 * hash) + PRODUCT_SEARCH_RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getProductSearchResults().hashCode();
+ }
+ if (hasError()) {
+ hash = (37 * hash) + ERROR_FIELD_NUMBER;
+ hash = (53 * hash) + getError().hashCode();
+ }
+ if (hasContext()) {
+ hash = (37 * hash) + CONTEXT_FIELD_NUMBER;
+ hash = (53 * hash) + getContext().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AnnotateImageResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Response to an image annotation request. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AnnotateImageResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public java.util.List+ * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public int getFaceAnnotationsCount() {
+ if (faceAnnotationsBuilder_ == null) {
+ return faceAnnotations_.size();
+ } else {
+ return faceAnnotationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index) {
+ if (faceAnnotationsBuilder_ == null) {
+ return faceAnnotations_.get(index);
+ } else {
+ return faceAnnotationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder setFaceAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation value) {
+ if (faceAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFaceAnnotationsIsMutable();
+ faceAnnotations_.set(index, value);
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder setFaceAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) {
+ if (faceAnnotationsBuilder_ == null) {
+ ensureFaceAnnotationsIsMutable();
+ faceAnnotations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder addFaceAnnotations(com.google.cloud.vision.v1p4beta1.FaceAnnotation value) {
+ if (faceAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFaceAnnotationsIsMutable();
+ faceAnnotations_.add(value);
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder addFaceAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation value) {
+ if (faceAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFaceAnnotationsIsMutable();
+ faceAnnotations_.add(index, value);
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder addFaceAnnotations(
+ com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) {
+ if (faceAnnotationsBuilder_ == null) {
+ ensureFaceAnnotationsIsMutable();
+ faceAnnotations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder addFaceAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder builderForValue) {
+ if (faceAnnotationsBuilder_ == null) {
+ ensureFaceAnnotationsIsMutable();
+ faceAnnotations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder addAllFaceAnnotations(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.FaceAnnotation> values) {
+ if (faceAnnotationsBuilder_ == null) {
+ ensureFaceAnnotationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, faceAnnotations_);
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder clearFaceAnnotations() {
+ if (faceAnnotationsBuilder_ == null) {
+ faceAnnotations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public Builder removeFaceAnnotations(int index) {
+ if (faceAnnotationsBuilder_ == null) {
+ ensureFaceAnnotationsIsMutable();
+ faceAnnotations_.remove(index);
+ onChanged();
+ } else {
+ faceAnnotationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder(
+ int index) {
+ return getFaceAnnotationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder(
+ int index) {
+ if (faceAnnotationsBuilder_ == null) {
+ return faceAnnotations_.get(index);
+ } else {
+ return faceAnnotationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder>
+ getFaceAnnotationsOrBuilderList() {
+ if (faceAnnotationsBuilder_ != null) {
+ return faceAnnotationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(faceAnnotations_);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() {
+ return getFaceAnnotationsFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder(
+ int index) {
+ return getFaceAnnotationsFieldBuilder()
+ .addBuilder(index, com.google.cloud.vision.v1p4beta1.FaceAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ public java.util.List+ * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public java.util.List+ * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public int getLandmarkAnnotationsCount() {
+ if (landmarkAnnotationsBuilder_ == null) {
+ return landmarkAnnotations_.size();
+ } else {
+ return landmarkAnnotationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ return landmarkAnnotations_.get(index);
+ } else {
+ return landmarkAnnotationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder setLandmarkAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLandmarkAnnotationsIsMutable();
+ landmarkAnnotations_.set(index, value);
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder setLandmarkAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ ensureLandmarkAnnotationsIsMutable();
+ landmarkAnnotations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder addLandmarkAnnotations(
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLandmarkAnnotationsIsMutable();
+ landmarkAnnotations_.add(value);
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder addLandmarkAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLandmarkAnnotationsIsMutable();
+ landmarkAnnotations_.add(index, value);
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder addLandmarkAnnotations(
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ ensureLandmarkAnnotationsIsMutable();
+ landmarkAnnotations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder addLandmarkAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ ensureLandmarkAnnotationsIsMutable();
+ landmarkAnnotations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder addAllLandmarkAnnotations(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.EntityAnnotation> values) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ ensureLandmarkAnnotationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, landmarkAnnotations_);
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder clearLandmarkAnnotations() {
+ if (landmarkAnnotationsBuilder_ == null) {
+ landmarkAnnotations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public Builder removeLandmarkAnnotations(int index) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ ensureLandmarkAnnotationsIsMutable();
+ landmarkAnnotations_.remove(index);
+ onChanged();
+ } else {
+ landmarkAnnotationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder(
+ int index) {
+ return getLandmarkAnnotationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder
+ getLandmarkAnnotationsOrBuilder(int index) {
+ if (landmarkAnnotationsBuilder_ == null) {
+ return landmarkAnnotations_.get(index);
+ } else {
+ return landmarkAnnotationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLandmarkAnnotationsOrBuilderList() {
+ if (landmarkAnnotationsBuilder_ != null) {
+ return landmarkAnnotationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(landmarkAnnotations_);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder
+ addLandmarkAnnotationsBuilder() {
+ return getLandmarkAnnotationsFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder(
+ int index) {
+ return getLandmarkAnnotationsFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ *
+ */
+ public java.util.List+ * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public java.util.List+ * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public int getLogoAnnotationsCount() {
+ if (logoAnnotationsBuilder_ == null) {
+ return logoAnnotations_.size();
+ } else {
+ return logoAnnotationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index) {
+ if (logoAnnotationsBuilder_ == null) {
+ return logoAnnotations_.get(index);
+ } else {
+ return logoAnnotationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder setLogoAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (logoAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLogoAnnotationsIsMutable();
+ logoAnnotations_.set(index, value);
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder setLogoAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (logoAnnotationsBuilder_ == null) {
+ ensureLogoAnnotationsIsMutable();
+ logoAnnotations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder addLogoAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (logoAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLogoAnnotationsIsMutable();
+ logoAnnotations_.add(value);
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder addLogoAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (logoAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLogoAnnotationsIsMutable();
+ logoAnnotations_.add(index, value);
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder addLogoAnnotations(
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (logoAnnotationsBuilder_ == null) {
+ ensureLogoAnnotationsIsMutable();
+ logoAnnotations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder addLogoAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (logoAnnotationsBuilder_ == null) {
+ ensureLogoAnnotationsIsMutable();
+ logoAnnotations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder addAllLogoAnnotations(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.EntityAnnotation> values) {
+ if (logoAnnotationsBuilder_ == null) {
+ ensureLogoAnnotationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logoAnnotations_);
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder clearLogoAnnotations() {
+ if (logoAnnotationsBuilder_ == null) {
+ logoAnnotations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public Builder removeLogoAnnotations(int index) {
+ if (logoAnnotationsBuilder_ == null) {
+ ensureLogoAnnotationsIsMutable();
+ logoAnnotations_.remove(index);
+ onChanged();
+ } else {
+ logoAnnotationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder(
+ int index) {
+ return getLogoAnnotationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder(
+ int index) {
+ if (logoAnnotationsBuilder_ == null) {
+ return logoAnnotations_.get(index);
+ } else {
+ return logoAnnotationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLogoAnnotationsOrBuilderList() {
+ if (logoAnnotationsBuilder_ != null) {
+ return logoAnnotationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(logoAnnotations_);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() {
+ return getLogoAnnotationsFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder(
+ int index) {
+ return getLogoAnnotationsFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ public java.util.List+ * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public java.util.List+ * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public int getLabelAnnotationsCount() {
+ if (labelAnnotationsBuilder_ == null) {
+ return labelAnnotations_.size();
+ } else {
+ return labelAnnotationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index) {
+ if (labelAnnotationsBuilder_ == null) {
+ return labelAnnotations_.get(index);
+ } else {
+ return labelAnnotationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder setLabelAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (labelAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelAnnotationsIsMutable();
+ labelAnnotations_.set(index, value);
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder setLabelAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (labelAnnotationsBuilder_ == null) {
+ ensureLabelAnnotationsIsMutable();
+ labelAnnotations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder addLabelAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (labelAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelAnnotationsIsMutable();
+ labelAnnotations_.add(value);
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder addLabelAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (labelAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelAnnotationsIsMutable();
+ labelAnnotations_.add(index, value);
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder addLabelAnnotations(
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (labelAnnotationsBuilder_ == null) {
+ ensureLabelAnnotationsIsMutable();
+ labelAnnotations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder addLabelAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (labelAnnotationsBuilder_ == null) {
+ ensureLabelAnnotationsIsMutable();
+ labelAnnotations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder addAllLabelAnnotations(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.EntityAnnotation> values) {
+ if (labelAnnotationsBuilder_ == null) {
+ ensureLabelAnnotationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labelAnnotations_);
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder clearLabelAnnotations() {
+ if (labelAnnotationsBuilder_ == null) {
+ labelAnnotations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public Builder removeLabelAnnotations(int index) {
+ if (labelAnnotationsBuilder_ == null) {
+ ensureLabelAnnotationsIsMutable();
+ labelAnnotations_.remove(index);
+ onChanged();
+ } else {
+ labelAnnotationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder(
+ int index) {
+ return getLabelAnnotationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder(
+ int index) {
+ if (labelAnnotationsBuilder_ == null) {
+ return labelAnnotations_.get(index);
+ } else {
+ return labelAnnotationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLabelAnnotationsOrBuilderList() {
+ if (labelAnnotationsBuilder_ != null) {
+ return labelAnnotationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(labelAnnotations_);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() {
+ return getLabelAnnotationsFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder(
+ int index) {
+ return getLabelAnnotationsFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ public java.util.List+ * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public java.util.List+ * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public int getLocalizedObjectAnnotationsCount() {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ return localizedObjectAnnotations_.size();
+ } else {
+ return localizedObjectAnnotationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
+ getLocalizedObjectAnnotations(int index) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ return localizedObjectAnnotations_.get(index);
+ } else {
+ return localizedObjectAnnotationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder setLocalizedObjectAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocalizedObjectAnnotationsIsMutable();
+ localizedObjectAnnotations_.set(index, value);
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder setLocalizedObjectAnnotations(
+ int index,
+ com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ ensureLocalizedObjectAnnotationsIsMutable();
+ localizedObjectAnnotations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder addLocalizedObjectAnnotations(
+ com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocalizedObjectAnnotationsIsMutable();
+ localizedObjectAnnotations_.add(value);
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder addLocalizedObjectAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation value) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLocalizedObjectAnnotationsIsMutable();
+ localizedObjectAnnotations_.add(index, value);
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder addLocalizedObjectAnnotations(
+ com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ ensureLocalizedObjectAnnotationsIsMutable();
+ localizedObjectAnnotations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder addLocalizedObjectAnnotations(
+ int index,
+ com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder builderForValue) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ ensureLocalizedObjectAnnotationsIsMutable();
+ localizedObjectAnnotations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder addAllLocalizedObjectAnnotations(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation>
+ values) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ ensureLocalizedObjectAnnotationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, localizedObjectAnnotations_);
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder clearLocalizedObjectAnnotations() {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ localizedObjectAnnotations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public Builder removeLocalizedObjectAnnotations(int index) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ ensureLocalizedObjectAnnotationsIsMutable();
+ localizedObjectAnnotations_.remove(index);
+ onChanged();
+ } else {
+ localizedObjectAnnotationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder
+ getLocalizedObjectAnnotationsBuilder(int index) {
+ return getLocalizedObjectAnnotationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder
+ getLocalizedObjectAnnotationsOrBuilder(int index) {
+ if (localizedObjectAnnotationsBuilder_ == null) {
+ return localizedObjectAnnotations_.get(index);
+ } else {
+ return localizedObjectAnnotationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public java.util.List<
+ ? extends com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder>
+ getLocalizedObjectAnnotationsOrBuilderList() {
+ if (localizedObjectAnnotationsBuilder_ != null) {
+ return localizedObjectAnnotationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(localizedObjectAnnotations_);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder
+ addLocalizedObjectAnnotationsBuilder() {
+ return getLocalizedObjectAnnotationsFieldBuilder()
+ .addBuilder(
+ com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder
+ addLocalizedObjectAnnotationsBuilder(int index) {
+ return getLocalizedObjectAnnotationsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ public java.util.List+ * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public java.util.List+ * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public int getTextAnnotationsCount() {
+ if (textAnnotationsBuilder_ == null) {
+ return textAnnotations_.size();
+ } else {
+ return textAnnotationsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index) {
+ if (textAnnotationsBuilder_ == null) {
+ return textAnnotations_.get(index);
+ } else {
+ return textAnnotationsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder setTextAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (textAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTextAnnotationsIsMutable();
+ textAnnotations_.set(index, value);
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder setTextAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (textAnnotationsBuilder_ == null) {
+ ensureTextAnnotationsIsMutable();
+ textAnnotations_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder addTextAnnotations(com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (textAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTextAnnotationsIsMutable();
+ textAnnotations_.add(value);
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder addTextAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation value) {
+ if (textAnnotationsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTextAnnotationsIsMutable();
+ textAnnotations_.add(index, value);
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder addTextAnnotations(
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (textAnnotationsBuilder_ == null) {
+ ensureTextAnnotationsIsMutable();
+ textAnnotations_.add(builderForValue.build());
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder addTextAnnotations(
+ int index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder builderForValue) {
+ if (textAnnotationsBuilder_ == null) {
+ ensureTextAnnotationsIsMutable();
+ textAnnotations_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder addAllTextAnnotations(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.EntityAnnotation> values) {
+ if (textAnnotationsBuilder_ == null) {
+ ensureTextAnnotationsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textAnnotations_);
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder clearTextAnnotations() {
+ if (textAnnotationsBuilder_ == null) {
+ textAnnotations_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000020);
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public Builder removeTextAnnotations(int index) {
+ if (textAnnotationsBuilder_ == null) {
+ ensureTextAnnotationsIsMutable();
+ textAnnotations_.remove(index);
+ onChanged();
+ } else {
+ textAnnotationsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder getTextAnnotationsBuilder(
+ int index) {
+ return getTextAnnotationsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder(
+ int index) {
+ if (textAnnotationsBuilder_ == null) {
+ return textAnnotations_.get(index);
+ } else {
+ return textAnnotationsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getTextAnnotationsOrBuilderList() {
+ if (textAnnotationsBuilder_ != null) {
+ return textAnnotationsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(textAnnotations_);
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() {
+ return getTextAnnotationsFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addTextAnnotationsBuilder(
+ int index) {
+ return getTextAnnotationsFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.vision.v1p4beta1.EntityAnnotation.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ public java.util.List+ * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public boolean hasFullTextAnnotation() {
+ return fullTextAnnotationBuilder_ != null || fullTextAnnotation_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation() {
+ if (fullTextAnnotationBuilder_ == null) {
+ return fullTextAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance()
+ : fullTextAnnotation_;
+ } else {
+ return fullTextAnnotationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public Builder setFullTextAnnotation(com.google.cloud.vision.v1p4beta1.TextAnnotation value) {
+ if (fullTextAnnotationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ fullTextAnnotation_ = value;
+ onChanged();
+ } else {
+ fullTextAnnotationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public Builder setFullTextAnnotation(
+ com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder builderForValue) {
+ if (fullTextAnnotationBuilder_ == null) {
+ fullTextAnnotation_ = builderForValue.build();
+ onChanged();
+ } else {
+ fullTextAnnotationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p4beta1.TextAnnotation value) {
+ if (fullTextAnnotationBuilder_ == null) {
+ if (fullTextAnnotation_ != null) {
+ fullTextAnnotation_ =
+ com.google.cloud.vision.v1p4beta1.TextAnnotation.newBuilder(fullTextAnnotation_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ fullTextAnnotation_ = value;
+ }
+ onChanged();
+ } else {
+ fullTextAnnotationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public Builder clearFullTextAnnotation() {
+ if (fullTextAnnotationBuilder_ == null) {
+ fullTextAnnotation_ = null;
+ onChanged();
+ } else {
+ fullTextAnnotation_ = null;
+ fullTextAnnotationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() {
+
+ onChanged();
+ return getFullTextAnnotationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ public com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder
+ getFullTextAnnotationOrBuilder() {
+ if (fullTextAnnotationBuilder_ != null) {
+ return fullTextAnnotationBuilder_.getMessageOrBuilder();
+ } else {
+ return fullTextAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.TextAnnotation.getDefaultInstance()
+ : fullTextAnnotation_;
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.TextAnnotation,
+ com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder,
+ com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder>
+ getFullTextAnnotationFieldBuilder() {
+ if (fullTextAnnotationBuilder_ == null) {
+ fullTextAnnotationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.TextAnnotation,
+ com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder,
+ com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder>(
+ getFullTextAnnotation(), getParentForChildren(), isClean());
+ fullTextAnnotation_ = null;
+ }
+ return fullTextAnnotationBuilder_;
+ }
+
+ private com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safeSearchAnnotation_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation,
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder,
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder>
+ safeSearchAnnotationBuilder_;
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public boolean hasSafeSearchAnnotation() {
+ return safeSearchAnnotationBuilder_ != null || safeSearchAnnotation_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation() {
+ if (safeSearchAnnotationBuilder_ == null) {
+ return safeSearchAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance()
+ : safeSearchAnnotation_;
+ } else {
+ return safeSearchAnnotationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public Builder setSafeSearchAnnotation(
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation value) {
+ if (safeSearchAnnotationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ safeSearchAnnotation_ = value;
+ onChanged();
+ } else {
+ safeSearchAnnotationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public Builder setSafeSearchAnnotation(
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder builderForValue) {
+ if (safeSearchAnnotationBuilder_ == null) {
+ safeSearchAnnotation_ = builderForValue.build();
+ onChanged();
+ } else {
+ safeSearchAnnotationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public Builder mergeSafeSearchAnnotation(
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation value) {
+ if (safeSearchAnnotationBuilder_ == null) {
+ if (safeSearchAnnotation_ != null) {
+ safeSearchAnnotation_ =
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.newBuilder(
+ safeSearchAnnotation_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ safeSearchAnnotation_ = value;
+ }
+ onChanged();
+ } else {
+ safeSearchAnnotationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public Builder clearSafeSearchAnnotation() {
+ if (safeSearchAnnotationBuilder_ == null) {
+ safeSearchAnnotation_ = null;
+ onChanged();
+ } else {
+ safeSearchAnnotation_ = null;
+ safeSearchAnnotationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder
+ getSafeSearchAnnotationBuilder() {
+
+ onChanged();
+ return getSafeSearchAnnotationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder
+ getSafeSearchAnnotationOrBuilder() {
+ if (safeSearchAnnotationBuilder_ != null) {
+ return safeSearchAnnotationBuilder_.getMessageOrBuilder();
+ } else {
+ return safeSearchAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.getDefaultInstance()
+ : safeSearchAnnotation_;
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation,
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder,
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder>
+ getSafeSearchAnnotationFieldBuilder() {
+ if (safeSearchAnnotationBuilder_ == null) {
+ safeSearchAnnotationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation,
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder,
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder>(
+ getSafeSearchAnnotation(), getParentForChildren(), isClean());
+ safeSearchAnnotation_ = null;
+ }
+ return safeSearchAnnotationBuilder_;
+ }
+
+ private com.google.cloud.vision.v1p4beta1.ImageProperties imagePropertiesAnnotation_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageProperties,
+ com.google.cloud.vision.v1p4beta1.ImageProperties.Builder,
+ com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder>
+ imagePropertiesAnnotationBuilder_;
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public boolean hasImagePropertiesAnnotation() {
+ return imagePropertiesAnnotationBuilder_ != null || imagePropertiesAnnotation_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation() {
+ if (imagePropertiesAnnotationBuilder_ == null) {
+ return imagePropertiesAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance()
+ : imagePropertiesAnnotation_;
+ } else {
+ return imagePropertiesAnnotationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public Builder setImagePropertiesAnnotation(
+ com.google.cloud.vision.v1p4beta1.ImageProperties value) {
+ if (imagePropertiesAnnotationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ imagePropertiesAnnotation_ = value;
+ onChanged();
+ } else {
+ imagePropertiesAnnotationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public Builder setImagePropertiesAnnotation(
+ com.google.cloud.vision.v1p4beta1.ImageProperties.Builder builderForValue) {
+ if (imagePropertiesAnnotationBuilder_ == null) {
+ imagePropertiesAnnotation_ = builderForValue.build();
+ onChanged();
+ } else {
+ imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public Builder mergeImagePropertiesAnnotation(
+ com.google.cloud.vision.v1p4beta1.ImageProperties value) {
+ if (imagePropertiesAnnotationBuilder_ == null) {
+ if (imagePropertiesAnnotation_ != null) {
+ imagePropertiesAnnotation_ =
+ com.google.cloud.vision.v1p4beta1.ImageProperties.newBuilder(
+ imagePropertiesAnnotation_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ imagePropertiesAnnotation_ = value;
+ }
+ onChanged();
+ } else {
+ imagePropertiesAnnotationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public Builder clearImagePropertiesAnnotation() {
+ if (imagePropertiesAnnotationBuilder_ == null) {
+ imagePropertiesAnnotation_ = null;
+ onChanged();
+ } else {
+ imagePropertiesAnnotation_ = null;
+ imagePropertiesAnnotationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageProperties.Builder
+ getImagePropertiesAnnotationBuilder() {
+
+ onChanged();
+ return getImagePropertiesAnnotationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder
+ getImagePropertiesAnnotationOrBuilder() {
+ if (imagePropertiesAnnotationBuilder_ != null) {
+ return imagePropertiesAnnotationBuilder_.getMessageOrBuilder();
+ } else {
+ return imagePropertiesAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageProperties.getDefaultInstance()
+ : imagePropertiesAnnotation_;
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageProperties,
+ com.google.cloud.vision.v1p4beta1.ImageProperties.Builder,
+ com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder>
+ getImagePropertiesAnnotationFieldBuilder() {
+ if (imagePropertiesAnnotationBuilder_ == null) {
+ imagePropertiesAnnotationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageProperties,
+ com.google.cloud.vision.v1p4beta1.ImageProperties.Builder,
+ com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder>(
+ getImagePropertiesAnnotation(), getParentForChildren(), isClean());
+ imagePropertiesAnnotation_ = null;
+ }
+ return imagePropertiesAnnotationBuilder_;
+ }
+
+ private com.google.cloud.vision.v1p4beta1.CropHintsAnnotation cropHintsAnnotation_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation,
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder,
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder>
+ cropHintsAnnotationBuilder_;
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public boolean hasCropHintsAnnotation() {
+ return cropHintsAnnotationBuilder_ != null || cropHintsAnnotation_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation() {
+ if (cropHintsAnnotationBuilder_ == null) {
+ return cropHintsAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance()
+ : cropHintsAnnotation_;
+ } else {
+ return cropHintsAnnotationBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public Builder setCropHintsAnnotation(
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation value) {
+ if (cropHintsAnnotationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ cropHintsAnnotation_ = value;
+ onChanged();
+ } else {
+ cropHintsAnnotationBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public Builder setCropHintsAnnotation(
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder builderForValue) {
+ if (cropHintsAnnotationBuilder_ == null) {
+ cropHintsAnnotation_ = builderForValue.build();
+ onChanged();
+ } else {
+ cropHintsAnnotationBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public Builder mergeCropHintsAnnotation(
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation value) {
+ if (cropHintsAnnotationBuilder_ == null) {
+ if (cropHintsAnnotation_ != null) {
+ cropHintsAnnotation_ =
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.newBuilder(cropHintsAnnotation_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ cropHintsAnnotation_ = value;
+ }
+ onChanged();
+ } else {
+ cropHintsAnnotationBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public Builder clearCropHintsAnnotation() {
+ if (cropHintsAnnotationBuilder_ == null) {
+ cropHintsAnnotation_ = null;
+ onChanged();
+ } else {
+ cropHintsAnnotation_ = null;
+ cropHintsAnnotationBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder
+ getCropHintsAnnotationBuilder() {
+
+ onChanged();
+ return getCropHintsAnnotationFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ public com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder
+ getCropHintsAnnotationOrBuilder() {
+ if (cropHintsAnnotationBuilder_ != null) {
+ return cropHintsAnnotationBuilder_.getMessageOrBuilder();
+ } else {
+ return cropHintsAnnotation_ == null
+ ? com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.getDefaultInstance()
+ : cropHintsAnnotation_;
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation,
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder,
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder>
+ getCropHintsAnnotationFieldBuilder() {
+ if (cropHintsAnnotationBuilder_ == null) {
+ cropHintsAnnotationBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation,
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder,
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder>(
+ getCropHintsAnnotation(), getParentForChildren(), isClean());
+ cropHintsAnnotation_ = null;
+ }
+ return cropHintsAnnotationBuilder_;
+ }
+
+ private com.google.cloud.vision.v1p4beta1.WebDetection webDetection_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.WebDetection,
+ com.google.cloud.vision.v1p4beta1.WebDetection.Builder,
+ com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder>
+ webDetectionBuilder_;
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public boolean hasWebDetection() {
+ return webDetectionBuilder_ != null || webDetection_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection() {
+ if (webDetectionBuilder_ == null) {
+ return webDetection_ == null
+ ? com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance()
+ : webDetection_;
+ } else {
+ return webDetectionBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public Builder setWebDetection(com.google.cloud.vision.v1p4beta1.WebDetection value) {
+ if (webDetectionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ webDetection_ = value;
+ onChanged();
+ } else {
+ webDetectionBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public Builder setWebDetection(
+ com.google.cloud.vision.v1p4beta1.WebDetection.Builder builderForValue) {
+ if (webDetectionBuilder_ == null) {
+ webDetection_ = builderForValue.build();
+ onChanged();
+ } else {
+ webDetectionBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public Builder mergeWebDetection(com.google.cloud.vision.v1p4beta1.WebDetection value) {
+ if (webDetectionBuilder_ == null) {
+ if (webDetection_ != null) {
+ webDetection_ =
+ com.google.cloud.vision.v1p4beta1.WebDetection.newBuilder(webDetection_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ webDetection_ = value;
+ }
+ onChanged();
+ } else {
+ webDetectionBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public Builder clearWebDetection() {
+ if (webDetectionBuilder_ == null) {
+ webDetection_ = null;
+ onChanged();
+ } else {
+ webDetection_ = null;
+ webDetectionBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public com.google.cloud.vision.v1p4beta1.WebDetection.Builder getWebDetectionBuilder() {
+
+ onChanged();
+ return getWebDetectionFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ public com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() {
+ if (webDetectionBuilder_ != null) {
+ return webDetectionBuilder_.getMessageOrBuilder();
+ } else {
+ return webDetection_ == null
+ ? com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance()
+ : webDetection_;
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.WebDetection,
+ com.google.cloud.vision.v1p4beta1.WebDetection.Builder,
+ com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder>
+ getWebDetectionFieldBuilder() {
+ if (webDetectionBuilder_ == null) {
+ webDetectionBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.WebDetection,
+ com.google.cloud.vision.v1p4beta1.WebDetection.Builder,
+ com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder>(
+ getWebDetection(), getParentForChildren(), isClean());
+ webDetection_ = null;
+ }
+ return webDetectionBuilder_;
+ }
+
+ private com.google.cloud.vision.v1p4beta1.ProductSearchResults productSearchResults_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults,
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder,
+ com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder>
+ productSearchResultsBuilder_;
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public boolean hasProductSearchResults() {
+ return productSearchResultsBuilder_ != null || productSearchResults_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults() {
+ if (productSearchResultsBuilder_ == null) {
+ return productSearchResults_ == null
+ ? com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance()
+ : productSearchResults_;
+ } else {
+ return productSearchResultsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public Builder setProductSearchResults(
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults value) {
+ if (productSearchResultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ productSearchResults_ = value;
+ onChanged();
+ } else {
+ productSearchResultsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public Builder setProductSearchResults(
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder builderForValue) {
+ if (productSearchResultsBuilder_ == null) {
+ productSearchResults_ = builderForValue.build();
+ onChanged();
+ } else {
+ productSearchResultsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public Builder mergeProductSearchResults(
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults value) {
+ if (productSearchResultsBuilder_ == null) {
+ if (productSearchResults_ != null) {
+ productSearchResults_ =
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults.newBuilder(
+ productSearchResults_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ productSearchResults_ = value;
+ }
+ onChanged();
+ } else {
+ productSearchResultsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public Builder clearProductSearchResults() {
+ if (productSearchResultsBuilder_ == null) {
+ productSearchResults_ = null;
+ onChanged();
+ } else {
+ productSearchResults_ = null;
+ productSearchResultsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder
+ getProductSearchResultsBuilder() {
+
+ onChanged();
+ return getProductSearchResultsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ public com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder
+ getProductSearchResultsOrBuilder() {
+ if (productSearchResultsBuilder_ != null) {
+ return productSearchResultsBuilder_.getMessageOrBuilder();
+ } else {
+ return productSearchResults_ == null
+ ? com.google.cloud.vision.v1p4beta1.ProductSearchResults.getDefaultInstance()
+ : productSearchResults_;
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults,
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder,
+ com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder>
+ getProductSearchResultsFieldBuilder() {
+ if (productSearchResultsBuilder_ == null) {
+ productSearchResultsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults,
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder,
+ com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder>(
+ getProductSearchResults(), getParentForChildren(), isClean());
+ productSearchResults_ = null;
+ }
+ return productSearchResultsBuilder_;
+ }
+
+ private com.google.rpc.Status error_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ errorBuilder_;
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public boolean hasError() {
+ return errorBuilder_ != null || error_ != null;
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public com.google.rpc.Status getError() {
+ if (errorBuilder_ == null) {
+ return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
+ } else {
+ return errorBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public Builder setError(com.google.rpc.Status value) {
+ if (errorBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ error_ = value;
+ onChanged();
+ } else {
+ errorBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public Builder setError(com.google.rpc.Status.Builder builderForValue) {
+ if (errorBuilder_ == null) {
+ error_ = builderForValue.build();
+ onChanged();
+ } else {
+ errorBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public Builder mergeError(com.google.rpc.Status value) {
+ if (errorBuilder_ == null) {
+ if (error_ != null) {
+ error_ = com.google.rpc.Status.newBuilder(error_).mergeFrom(value).buildPartial();
+ } else {
+ error_ = value;
+ }
+ onChanged();
+ } else {
+ errorBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public Builder clearError() {
+ if (errorBuilder_ == null) {
+ error_ = null;
+ onChanged();
+ } else {
+ error_ = null;
+ errorBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public com.google.rpc.Status.Builder getErrorBuilder() {
+
+ onChanged();
+ return getErrorFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() {
+ if (errorBuilder_ != null) {
+ return errorBuilder_.getMessageOrBuilder();
+ } else {
+ return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_;
+ }
+ }
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
+ getErrorFieldBuilder() {
+ if (errorBuilder_ == null) {
+ errorBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.rpc.Status,
+ com.google.rpc.Status.Builder,
+ com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean());
+ error_ = null;
+ }
+ return errorBuilder_;
+ }
+
+ private com.google.cloud.vision.v1p4beta1.ImageAnnotationContext context_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext,
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder>
+ contextBuilder_;
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public boolean hasContext() {
+ return contextBuilder_ != null || context_ != null;
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext() {
+ if (contextBuilder_ == null) {
+ return context_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance()
+ : context_;
+ } else {
+ return contextBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public Builder setContext(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext value) {
+ if (contextBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ context_ = value;
+ onChanged();
+ } else {
+ contextBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public Builder setContext(
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder builderForValue) {
+ if (contextBuilder_ == null) {
+ context_ = builderForValue.build();
+ onChanged();
+ } else {
+ contextBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public Builder mergeContext(com.google.cloud.vision.v1p4beta1.ImageAnnotationContext value) {
+ if (contextBuilder_ == null) {
+ if (context_ != null) {
+ context_ =
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.newBuilder(context_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ context_ = value;
+ }
+ onChanged();
+ } else {
+ contextBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public Builder clearContext() {
+ if (contextBuilder_ == null) {
+ context_ = null;
+ onChanged();
+ } else {
+ context_ = null;
+ contextBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder getContextBuilder() {
+
+ onChanged();
+ return getContextFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder() {
+ if (contextBuilder_ != null) {
+ return contextBuilder_.getMessageOrBuilder();
+ } else {
+ return context_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.getDefaultInstance()
+ : context_;
+ }
+ }
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext,
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder>
+ getContextFieldBuilder() {
+ if (contextBuilder_ == null) {
+ contextBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext,
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder>(
+ getContext(), getParentForChildren(), isClean());
+ context_ = null;
+ }
+ return contextBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AnnotateImageResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateImageResponse)
+ private static final com.google.cloud.vision.v1p4beta1.AnnotateImageResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AnnotateImageResponse();
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AnnotateImageResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ java.util.List+ * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.FaceAnnotation getFaceAnnotations(int index);
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ int getFaceAnnotationsCount();
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder>
+ getFaceAnnotationsOrBuilderList();
+ /**
+ *
+ *
+ * + * If present, face detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.FaceAnnotation face_annotations = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ java.util.List+ * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation getLandmarkAnnotations(int index);
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ int getLandmarkAnnotationsCount();
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLandmarkAnnotationsOrBuilderList();
+ /**
+ *
+ *
+ * + * If present, landmark detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation landmark_annotations = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder(
+ int index);
+
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ java.util.List+ * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation getLogoAnnotations(int index);
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ int getLogoAnnotationsCount();
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLogoAnnotationsOrBuilderList();
+ /**
+ *
+ *
+ * + * If present, logo detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation logo_annotations = 3;
+ */
+ com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder(
+ int index);
+
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ java.util.List+ * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation getLabelAnnotations(int index);
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ int getLabelAnnotationsCount();
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getLabelAnnotationsOrBuilderList();
+ /**
+ *
+ *
+ * + * If present, label detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation label_annotations = 4;
+ */
+ com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder(
+ int index);
+
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ java.util.List+ * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation getLocalizedObjectAnnotations(
+ int index);
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ int getLocalizedObjectAnnotationsCount();
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder>
+ getLocalizedObjectAnnotationsOrBuilderList();
+ /**
+ *
+ *
+ * + * If present, localized object detection has completed successfully. + * This will be sorted descending by confidence score. + *+ * + *
+ * repeated .google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation localized_object_annotations = 22;
+ *
+ */
+ com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder
+ getLocalizedObjectAnnotationsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ java.util.List+ * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ com.google.cloud.vision.v1p4beta1.EntityAnnotation getTextAnnotations(int index);
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ int getTextAnnotationsCount();
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>
+ getTextAnnotationsOrBuilderList();
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection has completed successfully. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.EntityAnnotation text_annotations = 5;
+ */
+ com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder(
+ int index);
+
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ boolean hasFullTextAnnotation();
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ com.google.cloud.vision.v1p4beta1.TextAnnotation getFullTextAnnotation();
+ /**
+ *
+ *
+ * + * If present, text (OCR) detection or document (OCR) text detection has + * completed successfully. + * This annotation provides the structural hierarchy for the OCR detected + * text. + *+ * + *
.google.cloud.vision.v1p4beta1.TextAnnotation full_text_annotation = 12;
+ */
+ com.google.cloud.vision.v1p4beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder();
+
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ boolean hasSafeSearchAnnotation();
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation getSafeSearchAnnotation();
+ /**
+ *
+ *
+ * + * If present, safe-search annotation has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safe_search_annotation = 6;
+ */
+ com.google.cloud.vision.v1p4beta1.SafeSearchAnnotationOrBuilder
+ getSafeSearchAnnotationOrBuilder();
+
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ boolean hasImagePropertiesAnnotation();
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageProperties getImagePropertiesAnnotation();
+ /**
+ *
+ *
+ * + * If present, image properties were extracted successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageProperties image_properties_annotation = 8;
+ */
+ com.google.cloud.vision.v1p4beta1.ImagePropertiesOrBuilder
+ getImagePropertiesAnnotationOrBuilder();
+
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ boolean hasCropHintsAnnotation();
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotation getCropHintsAnnotation();
+ /**
+ *
+ *
+ * + * If present, crop hints have completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.CropHintsAnnotation crop_hints_annotation = 11;
+ */
+ com.google.cloud.vision.v1p4beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder();
+
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ boolean hasWebDetection();
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ com.google.cloud.vision.v1p4beta1.WebDetection getWebDetection();
+ /**
+ *
+ *
+ * + * If present, web detection has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.WebDetection web_detection = 13;
+ */
+ com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOrBuilder();
+
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ boolean hasProductSearchResults();
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ com.google.cloud.vision.v1p4beta1.ProductSearchResults getProductSearchResults();
+ /**
+ *
+ *
+ * + * If present, product search has completed successfully. + *+ * + *
.google.cloud.vision.v1p4beta1.ProductSearchResults product_search_results = 14;
+ */
+ com.google.cloud.vision.v1p4beta1.ProductSearchResultsOrBuilder
+ getProductSearchResultsOrBuilder();
+
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ boolean hasError();
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ com.google.rpc.Status getError();
+ /**
+ *
+ *
+ * + * If set, represents the error message for the operation. + * Note that filled-in image annotations are guaranteed to be + * correct, even when `error` is set. + *+ * + *
.google.rpc.Status error = 9;
+ */
+ com.google.rpc.StatusOrBuilder getErrorOrBuilder();
+
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ boolean hasContext();
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContext getContext();
+ /**
+ *
+ *
+ * + * If present, contextual information is needed to understand where this image + * comes from. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageAnnotationContext context = 21;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getContextOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java
new file mode 100644
index 000000000000..51e52d97d2cc
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java
@@ -0,0 +1,1732 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/vision/v1p4beta1/image_annotator.proto
+
+package com.google.cloud.vision.v1p4beta1;
+
+/**
+ *
+ *
+ * + * An offline file annotation request. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} + */ +public final class AsyncAnnotateFileRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) + AsyncAnnotateFileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileRequest.newBuilder() to construct. + private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AsyncAnnotateFileRequest() { + features_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AsyncAnnotateFileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.vision.v1p4beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = + input.readMessage( + com.google.cloud.vision.v1p4beta1.InputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + features_ = new java.util.ArrayList
+ * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public boolean hasInputConfig() {
+ return inputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() {
+ return getInputConfig();
+ }
+
+ public static final int FEATURES_FIELD_NUMBER = 2;
+ private java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList() {
+ return features_;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public int getFeaturesCount() {
+ return features_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) {
+ return features_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index) {
+ return features_.get(index);
+ }
+
+ public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3;
+ private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_;
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public boolean hasImageContext() {
+ return imageContext_ != null;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() {
+ return getImageContext();
+ }
+
+ public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4;
+ private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_;
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public boolean hasOutputConfig() {
+ return outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() {
+ return outputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance()
+ : outputConfig_;
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() {
+ return getOutputConfig();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (inputConfig_ != null) {
+ output.writeMessage(1, getInputConfig());
+ }
+ for (int i = 0; i < features_.size(); i++) {
+ output.writeMessage(2, features_.get(i));
+ }
+ if (imageContext_ != null) {
+ output.writeMessage(3, getImageContext());
+ }
+ if (outputConfig_ != null) {
+ output.writeMessage(4, getOutputConfig());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (inputConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputConfig());
+ }
+ for (int i = 0; i < features_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, features_.get(i));
+ }
+ if (imageContext_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImageContext());
+ }
+ if (outputConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOutputConfig());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest other =
+ (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) obj;
+
+ boolean result = true;
+ result = result && (hasInputConfig() == other.hasInputConfig());
+ if (hasInputConfig()) {
+ result = result && getInputConfig().equals(other.getInputConfig());
+ }
+ result = result && getFeaturesList().equals(other.getFeaturesList());
+ result = result && (hasImageContext() == other.hasImageContext());
+ if (hasImageContext()) {
+ result = result && getImageContext().equals(other.getImageContext());
+ }
+ result = result && (hasOutputConfig() == other.hasOutputConfig());
+ if (hasOutputConfig()) {
+ result = result && getOutputConfig().equals(other.getOutputConfig());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasInputConfig()) {
+ hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getInputConfig().hashCode();
+ }
+ if (getFeaturesCount() > 0) {
+ hash = (37 * hash) + FEATURES_FIELD_NUMBER;
+ hash = (53 * hash) + getFeaturesList().hashCode();
+ }
+ if (hasImageContext()) {
+ hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER;
+ hash = (53 * hash) + getImageContext().hashCode();
+ }
+ if (hasOutputConfig()) {
+ hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputConfig().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * An offline file annotation request. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public boolean hasInputConfig() {
+ return inputConfigBuilder_ != null || inputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig() {
+ if (inputConfigBuilder_ == null) {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ } else {
+ return inputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder setInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) {
+ if (inputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ inputConfig_ = value;
+ onChanged();
+ } else {
+ inputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder setInputConfig(
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder builderForValue) {
+ if (inputConfigBuilder_ == null) {
+ inputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ inputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder mergeInputConfig(com.google.cloud.vision.v1p4beta1.InputConfig value) {
+ if (inputConfigBuilder_ == null) {
+ if (inputConfig_ != null) {
+ inputConfig_ =
+ com.google.cloud.vision.v1p4beta1.InputConfig.newBuilder(inputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ inputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ inputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public Builder clearInputConfig() {
+ if (inputConfigBuilder_ == null) {
+ inputConfig_ = null;
+ onChanged();
+ } else {
+ inputConfig_ = null;
+ inputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfig.Builder getInputConfigBuilder() {
+
+ onChanged();
+ return getInputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder() {
+ if (inputConfigBuilder_ != null) {
+ return inputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return inputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.InputConfig.getDefaultInstance()
+ : inputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.InputConfig,
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>
+ getInputConfigFieldBuilder() {
+ if (inputConfigBuilder_ == null) {
+ inputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.InputConfig,
+ com.google.cloud.vision.v1p4beta1.InputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder>(
+ getInputConfig(), getParentForChildren(), isClean());
+ inputConfig_ = null;
+ }
+ return inputConfigBuilder_;
+ }
+
+ private java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public int getFeaturesCount() {
+ if (featuresBuilder_ == null) {
+ return features_.size();
+ } else {
+ return featuresBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index) {
+ if (featuresBuilder_ == null) {
+ return features_.get(index);
+ } else {
+ return featuresBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder setFeatures(int index, com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.set(index, value);
+ onChanged();
+ } else {
+ featuresBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder setFeatures(
+ int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.add(value);
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(int index, com.google.cloud.vision.v1p4beta1.Feature value) {
+ if (featuresBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureFeaturesIsMutable();
+ features_.add(index, value);
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.add(builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addFeatures(
+ int index, com.google.cloud.vision.v1p4beta1.Feature.Builder builderForValue) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ featuresBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder addAllFeatures(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.Feature> values) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, features_);
+ onChanged();
+ } else {
+ featuresBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder clearFeatures() {
+ if (featuresBuilder_ == null) {
+ features_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ featuresBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public Builder removeFeatures(int index) {
+ if (featuresBuilder_ == null) {
+ ensureFeaturesIsMutable();
+ features_.remove(index);
+ onChanged();
+ } else {
+ featuresBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder getFeaturesBuilder(int index) {
+ return getFeaturesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index) {
+ if (featuresBuilder_ == null) {
+ return features_.get(index);
+ } else {
+ return featuresBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList() {
+ if (featuresBuilder_ != null) {
+ return featuresBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(features_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder() {
+ return getFeaturesFieldBuilder()
+ .addBuilder(com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder(int index) {
+ return getFeaturesFieldBuilder()
+ .addBuilder(index, com.google.cloud.vision.v1p4beta1.Feature.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ public java.util.List+ * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public boolean hasImageContext() {
+ return imageContextBuilder_ != null || imageContext_ != null;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext getImageContext() {
+ if (imageContextBuilder_ == null) {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ } else {
+ return imageContextBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder setImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) {
+ if (imageContextBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ imageContext_ = value;
+ onChanged();
+ } else {
+ imageContextBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder setImageContext(
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder builderForValue) {
+ if (imageContextBuilder_ == null) {
+ imageContext_ = builderForValue.build();
+ onChanged();
+ } else {
+ imageContextBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder mergeImageContext(com.google.cloud.vision.v1p4beta1.ImageContext value) {
+ if (imageContextBuilder_ == null) {
+ if (imageContext_ != null) {
+ imageContext_ =
+ com.google.cloud.vision.v1p4beta1.ImageContext.newBuilder(imageContext_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ imageContext_ = value;
+ }
+ onChanged();
+ } else {
+ imageContextBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public Builder clearImageContext() {
+ if (imageContextBuilder_ == null) {
+ imageContext_ = null;
+ onChanged();
+ } else {
+ imageContext_ = null;
+ imageContextBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContext.Builder getImageContextBuilder() {
+
+ onChanged();
+ return getImageContextFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder() {
+ if (imageContextBuilder_ != null) {
+ return imageContextBuilder_.getMessageOrBuilder();
+ } else {
+ return imageContext_ == null
+ ? com.google.cloud.vision.v1p4beta1.ImageContext.getDefaultInstance()
+ : imageContext_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageContext,
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>
+ getImageContextFieldBuilder() {
+ if (imageContextBuilder_ == null) {
+ imageContextBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.ImageContext,
+ com.google.cloud.vision.v1p4beta1.ImageContext.Builder,
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder>(
+ getImageContext(), getParentForChildren(), isClean());
+ imageContext_ = null;
+ }
+ return imageContextBuilder_;
+ }
+
+ private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.OutputConfig,
+ com.google.cloud.vision.v1p4beta1.OutputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>
+ outputConfigBuilder_;
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public boolean hasOutputConfig() {
+ return outputConfigBuilder_ != null || outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ return outputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance()
+ : outputConfig_;
+ } else {
+ return outputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputConfig_ = value;
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public Builder setOutputConfig(
+ com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (outputConfig_ != null) {
+ outputConfig_ =
+ com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ outputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ outputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public Builder clearOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = null;
+ onChanged();
+ } else {
+ outputConfig_ = null;
+ outputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() {
+
+ onChanged();
+ return getOutputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() {
+ if (outputConfigBuilder_ != null) {
+ return outputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return outputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance()
+ : outputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.OutputConfig,
+ com.google.cloud.vision.v1p4beta1.OutputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>
+ getOutputConfigFieldBuilder() {
+ if (outputConfigBuilder_ == null) {
+ outputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.OutputConfig,
+ com.google.cloud.vision.v1p4beta1.OutputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>(
+ getOutputConfig(), getParentForChildren(), isClean());
+ outputConfig_ = null;
+ }
+ return outputConfigBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest)
+ private static final com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest();
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ boolean hasInputConfig();
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.InputConfig getInputConfig();
+ /**
+ *
+ *
+ * + * Required. Information about the input file. + *+ * + *
.google.cloud.vision.v1p4beta1.InputConfig input_config = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBuilder();
+
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ java.util.List+ * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.Feature getFeatures(int index);
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ int getFeaturesCount();
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>
+ getFeaturesOrBuilderList();
+ /**
+ *
+ *
+ * + * Required. Requested features. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.Feature features = 2;
+ */
+ com.google.cloud.vision.v1p4beta1.FeatureOrBuilder getFeaturesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ boolean hasImageContext();
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageContext getImageContext();
+ /**
+ *
+ *
+ * + * Additional context that may accompany the image(s) in the file. + *+ * + *
.google.cloud.vision.v1p4beta1.ImageContext image_context = 3;
+ */
+ com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOrBuilder();
+
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ boolean hasOutputConfig();
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig();
+ /**
+ *
+ *
+ * + * Required. The desired output location and metadata (e.g. format). + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 4;
+ */
+ com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java
new file mode 100644
index 000000000000..2952a8a573e0
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java
@@ -0,0 +1,705 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/vision/v1p4beta1/image_annotator.proto
+
+package com.google.cloud.vision.v1p4beta1;
+
+/**
+ *
+ *
+ * + * The response for a single offline file annotation request. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} + */ +public final class AsyncAnnotateFileResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) + AsyncAnnotateFileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AsyncAnnotateFileResponse.newBuilder() to construct. + private AsyncAnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AsyncAnnotateFileResponse() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AsyncAnnotateFileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.vision.v1p4beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.vision.v1p4beta1.OutputConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto + .internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto + .internal_static_google_cloud_vision_v1p4beta1_AsyncAnnotateFileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.class, + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; + /** + * + * + *
+ * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public boolean hasOutputConfig() {
+ return outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() {
+ return outputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance()
+ : outputConfig_;
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() {
+ return getOutputConfig();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (outputConfig_ != null) {
+ output.writeMessage(1, getOutputConfig());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (outputConfig_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOutputConfig());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse other =
+ (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) obj;
+
+ boolean result = true;
+ result = result && (hasOutputConfig() == other.hasOutputConfig());
+ if (hasOutputConfig()) {
+ result = result && getOutputConfig().equals(other.getOutputConfig());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasOutputConfig()) {
+ hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputConfig().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * The response for a single offline file annotation request. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public boolean hasOutputConfig() {
+ return outputConfigBuilder_ != null || outputConfig_ != null;
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ return outputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance()
+ : outputConfig_;
+ } else {
+ return outputConfigBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public Builder setOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ outputConfig_ = value;
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public Builder setOutputConfig(
+ com.google.cloud.vision.v1p4beta1.OutputConfig.Builder builderForValue) {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = builderForValue.build();
+ onChanged();
+ } else {
+ outputConfigBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public Builder mergeOutputConfig(com.google.cloud.vision.v1p4beta1.OutputConfig value) {
+ if (outputConfigBuilder_ == null) {
+ if (outputConfig_ != null) {
+ outputConfig_ =
+ com.google.cloud.vision.v1p4beta1.OutputConfig.newBuilder(outputConfig_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ outputConfig_ = value;
+ }
+ onChanged();
+ } else {
+ outputConfigBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public Builder clearOutputConfig() {
+ if (outputConfigBuilder_ == null) {
+ outputConfig_ = null;
+ onChanged();
+ } else {
+ outputConfig_ = null;
+ outputConfigBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfig.Builder getOutputConfigBuilder() {
+
+ onChanged();
+ return getOutputConfigFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() {
+ if (outputConfigBuilder_ != null) {
+ return outputConfigBuilder_.getMessageOrBuilder();
+ } else {
+ return outputConfig_ == null
+ ? com.google.cloud.vision.v1p4beta1.OutputConfig.getDefaultInstance()
+ : outputConfig_;
+ }
+ }
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.OutputConfig,
+ com.google.cloud.vision.v1p4beta1.OutputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>
+ getOutputConfigFieldBuilder() {
+ if (outputConfigBuilder_ == null) {
+ outputConfigBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.vision.v1p4beta1.OutputConfig,
+ com.google.cloud.vision.v1p4beta1.OutputConfig.Builder,
+ com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder>(
+ getOutputConfig(), getParentForChildren(), isClean());
+ outputConfig_ = null;
+ }
+ return outputConfigBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFieldsProto3(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse)
+ private static final com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse();
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ boolean hasOutputConfig();
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.OutputConfig getOutputConfig();
+ /**
+ *
+ *
+ * + * The output location and metadata from AsyncAnnotateFileRequest. + *+ * + *
.google.cloud.vision.v1p4beta1.OutputConfig output_config = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOrBuilder();
+}
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java
new file mode 100644
index 000000000000..ec7e1435b289
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java
@@ -0,0 +1,960 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/vision/v1p4beta1/image_annotator.proto
+
+package com.google.cloud.vision.v1p4beta1;
+
+/**
+ *
+ *
+ * + * Multiple async file annotation requests are batched into a single service + * call. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} + */ +public final class AsyncBatchAnnotateFilesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) + AsyncBatchAnnotateFilesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesRequest.newBuilder() to construct. + private AsyncBatchAnnotateFilesRequest( + com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AsyncBatchAnnotateFilesRequest() { + requests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AsyncBatchAnnotateFilesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + requests_ = + new java.util.ArrayList< + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest>(); + mutable_bitField0_ |= 0x00000001; + } + requests_.add( + input.readMessage( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + requests_ = java.util.Collections.unmodifiableList(requests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto + .internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto + .internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.class, + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.Builder.class); + } + + public static final int REQUESTS_FIELD_NUMBER = 1; + private java.util.List
+ * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public java.util.List+ * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder>
+ getRequestsOrBuilderList() {
+ return requests_;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public int getRequestsCount() {
+ return requests_.size();
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index) {
+ return requests_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder(
+ int index) {
+ return requests_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < requests_.size(); i++) {
+ output.writeMessage(1, requests_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < requests_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, requests_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest other =
+ (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) obj;
+
+ boolean result = true;
+ result = result && getRequestsList().equals(other.getRequestsList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getRequestsCount() > 0) {
+ hash = (37 * hash) + REQUESTS_FIELD_NUMBER;
+ hash = (53 * hash) + getRequestsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Multiple async file annotation requests are batched into a single service + * call. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public java.util.List+ * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public int getRequestsCount() {
+ if (requestsBuilder_ == null) {
+ return requests_.size();
+ } else {
+ return requestsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index) {
+ if (requestsBuilder_ == null) {
+ return requests_.get(index);
+ } else {
+ return requestsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder setRequests(
+ int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) {
+ if (requestsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRequestsIsMutable();
+ requests_.set(index, value);
+ onChanged();
+ } else {
+ requestsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder setRequests(
+ int index,
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) {
+ if (requestsBuilder_ == null) {
+ ensureRequestsIsMutable();
+ requests_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ requestsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder addRequests(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) {
+ if (requestsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRequestsIsMutable();
+ requests_.add(value);
+ onChanged();
+ } else {
+ requestsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder addRequests(
+ int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest value) {
+ if (requestsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureRequestsIsMutable();
+ requests_.add(index, value);
+ onChanged();
+ } else {
+ requestsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder addRequests(
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) {
+ if (requestsBuilder_ == null) {
+ ensureRequestsIsMutable();
+ requests_.add(builderForValue.build());
+ onChanged();
+ } else {
+ requestsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder addRequests(
+ int index,
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder builderForValue) {
+ if (requestsBuilder_ == null) {
+ ensureRequestsIsMutable();
+ requests_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ requestsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder addAllRequests(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest>
+ values) {
+ if (requestsBuilder_ == null) {
+ ensureRequestsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requests_);
+ onChanged();
+ } else {
+ requestsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder clearRequests() {
+ if (requestsBuilder_ == null) {
+ requests_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ requestsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public Builder removeRequests(int index) {
+ if (requestsBuilder_ == null) {
+ ensureRequestsIsMutable();
+ requests_.remove(index);
+ onChanged();
+ } else {
+ requestsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder getRequestsBuilder(
+ int index) {
+ return getRequestsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder(
+ int index) {
+ if (requestsBuilder_ == null) {
+ return requests_.get(index);
+ } else {
+ return requestsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder>
+ getRequestsOrBuilderList() {
+ if (requestsBuilder_ != null) {
+ return requestsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(requests_);
+ }
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder() {
+ return getRequestsFieldBuilder()
+ .addBuilder(
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder addRequestsBuilder(
+ int index) {
+ return getRequestsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ public java.util.List+ * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ java.util.List+ * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest getRequests(int index);
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ int getRequestsCount();
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ java.util.List extends com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder>
+ getRequestsOrBuilderList();
+ /**
+ *
+ *
+ * + * Individual async file annotation requests for this batch. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest requests = 1;
+ */
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder getRequestsOrBuilder(
+ int index);
+}
diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java
new file mode 100644
index 000000000000..9562b72ad22c
--- /dev/null
+++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java
@@ -0,0 +1,984 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/vision/v1p4beta1/image_annotator.proto
+
+package com.google.cloud.vision.v1p4beta1;
+
+/**
+ *
+ *
+ * + * Response to an async batch file annotation request. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} + */ +public final class AsyncBatchAnnotateFilesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) + AsyncBatchAnnotateFilesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AsyncBatchAnnotateFilesResponse.newBuilder() to construct. + private AsyncBatchAnnotateFilesResponse( + com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AsyncBatchAnnotateFilesResponse() { + responses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AsyncBatchAnnotateFilesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + responses_ = + new java.util.ArrayList< + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse>(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage( + com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto + .internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vision.v1p4beta1.ImageAnnotatorProto + .internal_static_google_cloud_vision_v1p4beta1_AsyncBatchAnnotateFilesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.class, + com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.Builder.class); + } + + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List
+ * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public java.util.List+ * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder>
+ getResponsesOrBuilderList() {
+ return responses_;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public int getResponsesCount() {
+ return responses_.size();
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getResponses(int index) {
+ return responses_.get(index);
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder getResponsesOrBuilder(
+ int index) {
+ return responses_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < responses_.size(); i++) {
+ output.writeMessage(1, responses_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < responses_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, responses_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse other =
+ (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) obj;
+
+ boolean result = true;
+ result = result && getResponsesList().equals(other.getResponsesList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getResponsesCount() > 0) {
+ hash = (37 * hash) + RESPONSES_FIELD_NUMBER;
+ hash = (53 * hash) + getResponsesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Response to an async batch file annotation request. + *+ * + * Protobuf type {@code google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public java.util.List+ * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public int getResponsesCount() {
+ if (responsesBuilder_ == null) {
+ return responses_.size();
+ } else {
+ return responsesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse getResponses(int index) {
+ if (responsesBuilder_ == null) {
+ return responses_.get(index);
+ } else {
+ return responsesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder setResponses(
+ int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) {
+ if (responsesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResponsesIsMutable();
+ responses_.set(index, value);
+ onChanged();
+ } else {
+ responsesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder setResponses(
+ int index,
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ responses_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ responsesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder addResponses(com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) {
+ if (responsesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResponsesIsMutable();
+ responses_.add(value);
+ onChanged();
+ } else {
+ responsesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder addResponses(
+ int index, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse value) {
+ if (responsesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResponsesIsMutable();
+ responses_.add(index, value);
+ onChanged();
+ } else {
+ responsesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder addResponses(
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ responses_.add(builderForValue.build());
+ onChanged();
+ } else {
+ responsesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder addResponses(
+ int index,
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder builderForValue) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ responses_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ responsesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder addAllResponses(
+ java.lang.Iterable extends com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse>
+ values) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, responses_);
+ onChanged();
+ } else {
+ responsesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder clearResponses() {
+ if (responsesBuilder_ == null) {
+ responses_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ responsesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public Builder removeResponses(int index) {
+ if (responsesBuilder_ == null) {
+ ensureResponsesIsMutable();
+ responses_.remove(index);
+ onChanged();
+ } else {
+ responsesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder getResponsesBuilder(
+ int index) {
+ return getResponsesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder
+ getResponsesOrBuilder(int index) {
+ if (responsesBuilder_ == null) {
+ return responses_.get(index);
+ } else {
+ return responsesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder>
+ getResponsesOrBuilderList() {
+ if (responsesBuilder_ != null) {
+ return responsesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(responses_);
+ }
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder
+ addResponsesBuilder() {
+ return getResponsesFieldBuilder()
+ .addBuilder(
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder addResponsesBuilder(
+ int index) {
+ return getResponsesFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * The list of file annotation responses, one for each request in + * AsyncBatchAnnotateFilesRequest. + *+ * + *
repeated .google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse responses = 1;
+ */
+ public java.util.List