From 605cb4273277b3e88177cecfba15d1a2b1ee34dc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 6 Nov 2019 08:01:41 -0800 Subject: [PATCH] feat(vision): add celebrity recognition support; add object annotation support; add 'purge_products' method (all v1p4beta1) (via synth) (#9613) --- .../cloud/vision_v1p4beta1/gapic/enums.py | 10 +- .../gapic/image_annotator_client.py | 8 +- .../gapic/product_search_client.py | 195 ++++-- .../gapic/product_search_client_config.py | 5 + .../product_search_grpc_transport.py | 62 +- .../cloud/vision_v1p4beta1/proto/face.proto | 61 ++ .../cloud/vision_v1p4beta1/proto/face_pb2.py | 286 ++++++++ .../vision_v1p4beta1/proto/face_pb2_grpc.py | 2 + .../vision_v1p4beta1/proto/geometry.proto | 2 +- .../proto/image_annotator.proto | 117 +++- .../proto/image_annotator_pb2.py | 534 +++++++++------ .../proto/product_search.proto | 40 +- .../proto/product_search_pb2.py | 187 ++++- .../proto/product_search_service.proto | 351 +++++++--- .../proto/product_search_service_pb2.py | 648 +++++++++++++----- .../proto/product_search_service_pb2_grpc.py | 56 +- .../proto/text_annotation.proto | 6 +- .../proto/text_annotation_pb2.py | 4 +- .../proto/web_detection.proto | 24 +- .../proto/web_detection_pb2.py | 162 ++--- vision/google/cloud/vision_v1p4beta1/types.py | 2 + vision/synth.metadata | 12 +- .../test_product_search_client_v1p4beta1.py | 33 + 23 files changed, 2078 insertions(+), 729 deletions(-) create mode 100644 vision/google/cloud/vision_v1p4beta1/proto/face.proto create mode 100644 vision/google/cloud/vision_v1p4beta1/proto/face_pb2.py create mode 100644 vision/google/cloud/vision_v1p4beta1/proto/face_pb2_grpc.py diff --git a/vision/google/cloud/vision_v1p4beta1/gapic/enums.py b/vision/google/cloud/vision_v1p4beta1/gapic/enums.py index 59f1ccc8e81f..76e1ae0dc9a7 100644 --- a/vision/google/cloud/vision_v1p4beta1/gapic/enums.py +++ b/vision/google/cloud/vision_v1p4beta1/gapic/enums.py @@ -26,11 +26,11 @@ class Likelihood(enum.IntEnum): Attributes: UNKNOWN (int): Unknown likelihood. - VERY_UNLIKELY (int): It is very unlikely that the image belongs to the specified vertical. - UNLIKELY (int): It is unlikely that the image belongs to the specified vertical. - POSSIBLE (int): It is possible that the image belongs to the specified vertical. - LIKELY (int): It is likely that the image belongs to the specified vertical. - VERY_LIKELY (int): It is very likely that the image belongs to the specified vertical. + VERY_UNLIKELY (int): It is very unlikely. + UNLIKELY (int): It is unlikely. + POSSIBLE (int): It is possible. + LIKELY (int): It is likely. + VERY_LIKELY (int): It is very likely. """ UNKNOWN = 0 diff --git a/vision/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py b/vision/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py index bd176adf4a7c..960432b7be1c 100644 --- a/vision/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py +++ b/vision/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py @@ -280,8 +280,8 @@ def batch_annotate_files( >>> response = client.batch_annotate_files(requests) Args: - requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AnnotateFileRequest]]): The list of file annotation requests. Right now we support only one - AnnotateFileRequest in BatchAnnotateFilesRequest. + requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AnnotateFileRequest]]): Required. The list of file annotation requests. Right now we support only + one AnnotateFileRequest in BatchAnnotateFilesRequest. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.AnnotateFileRequest` @@ -363,7 +363,7 @@ def async_batch_annotate_images( >>> metadata = response.metadata() Args: - requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AnnotateImageRequest]]): Individual image annotation requests for this batch. + requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AnnotateImageRequest]]): Required. Individual image annotation requests for this batch. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.AnnotateImageRequest` @@ -451,7 +451,7 @@ def async_batch_annotate_files( >>> metadata = response.metadata() Args: - requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileRequest]]): Individual async file annotation requests for this batch. + requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileRequest]]): Required. Individual async file annotation requests for this batch. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileRequest` diff --git a/vision/google/cloud/vision_v1p4beta1/gapic/product_search_client.py b/vision/google/cloud/vision_v1p4beta1/gapic/product_search_client.py index f9543abd2de5..4d2197c8a0eb 100644 --- a/vision/google/cloud/vision_v1p4beta1/gapic/product_search_client.py +++ b/vision/google/cloud/vision_v1p4beta1/gapic/product_search_client.py @@ -31,6 +31,7 @@ from google.api_core import operations_v1 import google.api_core.page_iterator import google.api_core.path_template +import google.api_core.protobuf_helpers import grpc from google.cloud.vision_v1p4beta1.gapic import enums @@ -277,10 +278,10 @@ def create_product_set( >>> response = client.create_product_set(parent, product_set, product_set_id) Args: - parent (str): The project in which the ProductSet should be created. + parent (str): Required. The project in which the ProductSet should be created. Format is ``projects/PROJECT_ID/locations/LOC_ID``. - product_set (Union[dict, ~google.cloud.vision_v1p4beta1.types.ProductSet]): The ProductSet to create. + product_set (Union[dict, ~google.cloud.vision_v1p4beta1.types.ProductSet]): Required. The ProductSet to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.ProductSet` @@ -376,7 +377,7 @@ def list_product_sets( ... pass Args: - parent (str): The project from which ProductSets should be listed. + parent (str): Required. The project from which ProductSets should be listed. Format is ``projects/PROJECT_ID/locations/LOC_ID``. page_size (int): The maximum number of resources contained in the @@ -472,7 +473,7 @@ def get_product_set( >>> response = client.get_product_set(name) Args: - name (str): Resource name of the ProductSet to get. + name (str): Required. Resource name of the ProductSet to get. Format is: ``projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`` @@ -556,7 +557,7 @@ def update_product_set( >>> response = client.update_product_set(product_set, update_mask) Args: - product_set (Union[dict, ~google.cloud.vision_v1p4beta1.types.ProductSet]): The ProductSet resource which replaces the one on the server. + product_set (Union[dict, ~google.cloud.vision_v1p4beta1.types.ProductSet]): Required. The ProductSet resource which replaces the one on the server. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.ProductSet` @@ -629,10 +630,6 @@ def delete_product_set( The actual image files are not deleted from Google Cloud Storage. - Possible errors: - - - Returns NOT\_FOUND if the ProductSet does not exist. - Example: >>> from google.cloud import vision_v1p4beta1 >>> @@ -643,7 +640,7 @@ def delete_product_set( >>> client.delete_product_set(name) Args: - name (str): Resource name of the ProductSet to delete. + name (str): Required. Resource name of the ProductSet to delete. Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` @@ -728,10 +725,10 @@ def create_product( >>> response = client.create_product(parent, product, product_id) Args: - parent (str): The project in which the Product should be created. + parent (str): Required. The project in which the Product should be created. Format is ``projects/PROJECT_ID/locations/LOC_ID``. - product (Union[dict, ~google.cloud.vision_v1p4beta1.types.Product]): The product to create. + product (Union[dict, ~google.cloud.vision_v1p4beta1.types.Product]): Required. The product to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.Product` @@ -827,7 +824,8 @@ def list_products( ... pass Args: - parent (str): The project OR ProductSet from which Products should be listed. + parent (str): Required. The project OR ProductSet from which Products should be + listed. Format: ``projects/PROJECT_ID/locations/LOC_ID`` page_size (int): The maximum number of resources contained in the @@ -923,7 +921,7 @@ def get_product( >>> response = client.get_product(name) Args: - name (str): Resource name of the Product to get. + name (str): Required. Resource name of the Product to get. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1013,7 +1011,7 @@ def update_product( >>> response = client.update_product(product, update_mask) Args: - product (Union[dict, ~google.cloud.vision_v1p4beta1.types.Product]): The Product resource which replaces the one on the server. + product (Union[dict, ~google.cloud.vision_v1p4beta1.types.Product]): Required. The Product resource which replaces the one on the server. product.name is immutable. If a dict is provided, it must be of the same form as the protobuf @@ -1084,13 +1082,9 @@ def delete_product( """ 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. + 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. Example: >>> from google.cloud import vision_v1p4beta1 @@ -1102,7 +1096,7 @@ def delete_product( >>> client.delete_product(name) Args: - name (str): Resource name of product to delete. + name (str): Required. Resource name of product to delete. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1198,10 +1192,11 @@ def create_reference_image( >>> response = client.create_reference_image(parent, reference_image, reference_image_id) Args: - parent (str): Resource name of the product in which to create the reference image. + parent (str): Required. Resource name of the product in which to create the reference + image. Format is ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID``. - reference_image (Union[dict, ~google.cloud.vision_v1p4beta1.types.ReferenceImage]): The reference image to create. + reference_image (Union[dict, ~google.cloud.vision_v1p4beta1.types.ReferenceImage]): Required. The reference image to create. If an image ID is specified, it is ignored. If a dict is provided, it must be of the same form as the protobuf @@ -1273,15 +1268,11 @@ def delete_reference_image( 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. + 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. - Example: >>> from google.cloud import vision_v1p4beta1 >>> @@ -1292,7 +1283,7 @@ def delete_reference_image( >>> client.delete_reference_image(name) Args: - name (str): The resource name of the reference image to delete. + name (str): Required. The resource name of the reference image to delete. Format is: @@ -1381,7 +1372,7 @@ def list_reference_images( ... pass Args: - parent (str): Resource name of the product containing the reference images. + parent (str): Required. Resource name of the product containing the reference images. Format is ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID``. page_size (int): The maximum number of resources contained in the @@ -1477,7 +1468,7 @@ def get_reference_image( >>> response = client.get_reference_image(name) Args: - name (str): The resource name of the ReferenceImage to get. + name (str): Required. The resource name of the ReferenceImage to get. Format is: @@ -1561,11 +1552,12 @@ def add_product_to_product_set( >>> client.add_product_to_product_set(name, product) Args: - name (str): The resource name for the ProductSet to modify. + name (str): Required. The resource name for the ProductSet to modify. Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` - product (str): The resource name for the Product to be added to this ProductSet. + product (str): Required. The resource name for the Product to be added to this + ProductSet. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1626,10 +1618,6 @@ def remove_product_from_product_set( """ Removes a Product from the specified ProductSet. - Possible errors: - - - Returns NOT\_FOUND If the Product is not found under the ProductSet. - Example: >>> from google.cloud import vision_v1p4beta1 >>> @@ -1643,11 +1631,12 @@ def remove_product_from_product_set( >>> client.remove_product_from_product_set(name, product) Args: - name (str): The resource name for the ProductSet to modify. + name (str): Required. The resource name for the ProductSet to modify. Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` - product (str): The resource name for the Product to be removed from this ProductSet. + product (str): Required. The resource name for the Product to be removed from this + ProductSet. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1739,7 +1728,7 @@ def list_products_in_product_set( ... pass Args: - name (str): The ProductSet resource for which to retrieve Products. + name (str): Required. The ProductSet resource for which to retrieve Products. Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` @@ -1857,10 +1846,10 @@ def import_product_sets( >>> metadata = response.metadata() Args: - parent (str): The project in which the ProductSets should be imported. + parent (str): Required. The project in which the ProductSets should be imported. Format is ``projects/PROJECT_ID/locations/LOC_ID``. - input_config (Union[dict, ~google.cloud.vision_v1p4beta1.types.ImportProductSetsInputConfig]): The input content for the list of requests. + input_config (Union[dict, ~google.cloud.vision_v1p4beta1.types.ImportProductSetsInputConfig]): Required. The input content for the list of requests. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.ImportProductSetsInputConfig` @@ -1919,3 +1908,119 @@ def import_product_sets( product_search_service_pb2.ImportProductSetsResponse, metadata_type=product_search_service_pb2.BatchOperationMetadata, ) + + def purge_products( + self, + product_set_purge_config=None, + delete_orphan_products=None, + parent=None, + force=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Asynchronous API to delete all Products in a ProductSet or all Products + that are in no ProductSet. + + If a Product is a member of the specified ProductSet in addition to + other ProductSets, the Product will still be deleted. + + It is recommended to not delete the specified ProductSet until after + this operation has completed. It is also recommended to not add any of + the Products involved in the batch delete to a new ProductSet while this + operation is running because those Products may still end up deleted. + + It's not possible to undo the PurgeProducts operation. Therefore, it is + recommended to keep the csv files used in ImportProductSets (if that was + how you originally built the Product Set) before starting PurgeProducts, + in case you need to re-import the data after deletion. + + If the plan is to purge all of the Products from a ProductSet and then + re-use the empty ProductSet to re-import new Products into the empty + ProductSet, you must wait until the PurgeProducts operation has finished + for that ProductSet. + + The ``google.longrunning.Operation`` API can be used to keep track of + the progress and results of the request. ``Operation.metadata`` contains + ``BatchOperationMetadata``. (progress) + + Example: + >>> from google.cloud import vision_v1p4beta1 + >>> + >>> client = vision_v1p4beta1.ProductSearchClient() + >>> + >>> response = client.purge_products() + + Args: + product_set_purge_config (Union[dict, ~google.cloud.vision_v1p4beta1.types.ProductSetPurgeConfig]): Specify which ProductSet contains the Products to be deleted. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.vision_v1p4beta1.types.ProductSetPurgeConfig` + delete_orphan_products (bool): If delete\_orphan\_products is true, all Products that are not in any + ProductSet will be deleted. + parent (str): Required. The project and location in which the Products should be + deleted. + + Format is ``projects/PROJECT_ID/locations/LOC_ID``. + force (bool): The default value is false. Override this value to true to actually perform + the purge. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.vision_v1p4beta1.types.Operation` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "purge_products" not in self._inner_api_calls: + self._inner_api_calls[ + "purge_products" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.purge_products, + default_retry=self._method_configs["PurgeProducts"].retry, + default_timeout=self._method_configs["PurgeProducts"].timeout, + client_info=self._client_info, + ) + + # Sanity check: We have some fields which are mutually exclusive; + # raise ValueError if more than one is sent. + google.api_core.protobuf_helpers.check_oneof( + product_set_purge_config=product_set_purge_config, + delete_orphan_products=delete_orphan_products, + ) + + request = product_search_service_pb2.PurgeProductsRequest( + product_set_purge_config=product_set_purge_config, + delete_orphan_products=delete_orphan_products, + parent=parent, + force=force, + ) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("parent", parent)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["purge_products"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) diff --git a/vision/google/cloud/vision_v1p4beta1/gapic/product_search_client_config.py b/vision/google/cloud/vision_v1p4beta1/gapic/product_search_client_config.py index 97a89304553b..8b8f4f67c4f1 100644 --- a/vision/google/cloud/vision_v1p4beta1/gapic/product_search_client_config.py +++ b/vision/google/cloud/vision_v1p4beta1/gapic/product_search_client_config.py @@ -107,6 +107,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, + "PurgeProducts": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, }, } } diff --git a/vision/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py b/vision/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py index cd645bf50e0c..9cc5824dfa84 100644 --- a/vision/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py +++ b/vision/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py @@ -202,10 +202,6 @@ def delete_product_set(self): The actual image files are not deleted from Google Cloud Storage. - Possible errors: - - - Returns NOT\_FOUND if the ProductSet does not exist. - Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -302,13 +298,9 @@ def delete_product(self): 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. + 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. Returns: Callable: A callable which accepts the appropriate @@ -357,15 +349,11 @@ def delete_reference_image(self): 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. + 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. - Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -435,10 +423,6 @@ def remove_product_from_product_set(self): Removes a Product from the specified ProductSet. - Possible errors: - - - Returns NOT\_FOUND If the Product is not found under the ProductSet. - Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a @@ -488,3 +472,39 @@ def import_product_sets(self): deserialized response object. """ return self._stubs["product_search_stub"].ImportProductSets + + @property + def purge_products(self): + """Return the gRPC stub for :meth:`ProductSearchClient.purge_products`. + + Asynchronous API to delete all Products in a ProductSet or all Products + that are in no ProductSet. + + If a Product is a member of the specified ProductSet in addition to + other ProductSets, the Product will still be deleted. + + It is recommended to not delete the specified ProductSet until after + this operation has completed. It is also recommended to not add any of + the Products involved in the batch delete to a new ProductSet while this + operation is running because those Products may still end up deleted. + + It's not possible to undo the PurgeProducts operation. Therefore, it is + recommended to keep the csv files used in ImportProductSets (if that was + how you originally built the Product Set) before starting PurgeProducts, + in case you need to re-import the data after deletion. + + If the plan is to purge all of the Products from a ProductSet and then + re-use the empty ProductSet to re-import new Products into the empty + ProductSet, you must wait until the PurgeProducts operation has finished + for that ProductSet. + + The ``google.longrunning.Operation`` API can be used to keep track of + the progress and results of the request. ``Operation.metadata`` contains + ``BatchOperationMetadata``. (progress) + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["product_search_stub"].PurgeProducts diff --git a/vision/google/cloud/vision_v1p4beta1/proto/face.proto b/vision/google/cloud/vision_v1p4beta1/proto/face.proto new file mode 100644 index 000000000000..1786f26f0655 --- /dev/null +++ b/vision/google/cloud/vision_v1p4beta1/proto/face.proto @@ -0,0 +1,61 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.vision.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/cloud/vision/v1p4beta1/geometry.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision"; +option java_multiple_files = true; +option java_outer_classname = "CelebrityProto"; +option java_package = "com.google.cloud.vision.v1p4beta1"; +option objc_class_prefix = "GCVN"; + +// Parameters for a celebrity recognition request. +message FaceRecognitionParams { + // The resource names for one or more + // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A celebrity + // set is preloaded and can be specified as "builtin/default". If this is + // specified, the algorithm will try to match the faces detected in the input + // image to the Celebrities in the CelebritySets. + repeated string celebrity_set = 1; +} + +// A Celebrity is a group of Faces with an identity. +message Celebrity { + // The resource name of the preloaded Celebrity. Has the format + // `builtin/{mid}`. + string name = 1; + + // The Celebrity's display name. + string display_name = 2; + + // The Celebrity's description. + string description = 3; +} + +// Information about a face's identity. +message FaceRecognitionResult { + // The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that this face was + // matched to. + Celebrity celebrity = 1; + + // Recognition confidence. Range [0, 1]. + float confidence = 2; +} diff --git a/vision/google/cloud/vision_v1p4beta1/proto/face_pb2.py b/vision/google/cloud/vision_v1p4beta1/proto/face_pb2.py new file mode 100644 index 000000000000..8fd9712fda23 --- /dev/null +++ b/vision/google/cloud/vision_v1p4beta1/proto/face_pb2.py @@ -0,0 +1,286 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/vision_v1p4beta1/proto/face.proto + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.cloud.vision_v1p4beta1.proto import ( + geometry_pb2 as google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_geometry__pb2, +) + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="google/cloud/vision_v1p4beta1/proto/face.proto", + package="google.cloud.vision.v1p4beta1", + syntax="proto3", + serialized_options=_b( + "\n!com.google.cloud.vision.v1p4beta1B\016CelebrityProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN" + ), + serialized_pb=_b( + '\n.google/cloud/vision_v1p4beta1/proto/face.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto".\n\x15\x46\x61\x63\x65RecognitionParams\x12\x15\n\rcelebrity_set\x18\x01 \x03(\t"D\n\tCelebrity\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t"h\n\x15\x46\x61\x63\x65RecognitionResult\x12;\n\tcelebrity\x18\x01 \x01(\x0b\x32(.google.cloud.vision.v1p4beta1.Celebrity\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x42\x84\x01\n!com.google.cloud.vision.v1p4beta1B\x0e\x43\x65lebrityProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' + ), + dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, + ], +) + + +_FACERECOGNITIONPARAMS = _descriptor.Descriptor( + name="FaceRecognitionParams", + full_name="google.cloud.vision.v1p4beta1.FaceRecognitionParams", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="celebrity_set", + full_name="google.cloud.vision.v1p4beta1.FaceRecognitionParams.celebrity_set", + index=0, + number=1, + type=9, + cpp_type=9, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=163, + serialized_end=209, +) + + +_CELEBRITY = _descriptor.Descriptor( + name="Celebrity", + full_name="google.cloud.vision.v1p4beta1.Celebrity", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="name", + full_name="google.cloud.vision.v1p4beta1.Celebrity.name", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="display_name", + full_name="google.cloud.vision.v1p4beta1.Celebrity.display_name", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="description", + full_name="google.cloud.vision.v1p4beta1.Celebrity.description", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=211, + serialized_end=279, +) + + +_FACERECOGNITIONRESULT = _descriptor.Descriptor( + name="FaceRecognitionResult", + full_name="google.cloud.vision.v1p4beta1.FaceRecognitionResult", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="celebrity", + full_name="google.cloud.vision.v1p4beta1.FaceRecognitionResult.celebrity", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="confidence", + full_name="google.cloud.vision.v1p4beta1.FaceRecognitionResult.confidence", + index=1, + number=2, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=281, + serialized_end=385, +) + +_FACERECOGNITIONRESULT.fields_by_name["celebrity"].message_type = _CELEBRITY +DESCRIPTOR.message_types_by_name["FaceRecognitionParams"] = _FACERECOGNITIONPARAMS +DESCRIPTOR.message_types_by_name["Celebrity"] = _CELEBRITY +DESCRIPTOR.message_types_by_name["FaceRecognitionResult"] = _FACERECOGNITIONRESULT +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +FaceRecognitionParams = _reflection.GeneratedProtocolMessageType( + "FaceRecognitionParams", + (_message.Message,), + dict( + DESCRIPTOR=_FACERECOGNITIONPARAMS, + __module__="google.cloud.vision_v1p4beta1.proto.face_pb2", + __doc__="""Parameters for a celebrity recognition request. + + + Attributes: + celebrity_set: + The resource names for one or more + [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]s. A + celebrity set is preloaded and can be specified as + "builtin/default". If this is specified, the algorithm will + try to match the faces detected in the input image to the + Celebrities in the CelebritySets. + """, + # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceRecognitionParams) + ), +) +_sym_db.RegisterMessage(FaceRecognitionParams) + +Celebrity = _reflection.GeneratedProtocolMessageType( + "Celebrity", + (_message.Message,), + dict( + DESCRIPTOR=_CELEBRITY, + __module__="google.cloud.vision_v1p4beta1.proto.face_pb2", + __doc__="""A Celebrity is a group of Faces with an identity. + + + Attributes: + name: + The resource name of the preloaded Celebrity. Has the format + ``builtin/{mid}``. + display_name: + The Celebrity's display name. + description: + The Celebrity's description. + """, + # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Celebrity) + ), +) +_sym_db.RegisterMessage(Celebrity) + +FaceRecognitionResult = _reflection.GeneratedProtocolMessageType( + "FaceRecognitionResult", + (_message.Message,), + dict( + DESCRIPTOR=_FACERECOGNITIONRESULT, + __module__="google.cloud.vision_v1p4beta1.proto.face_pb2", + __doc__="""Information about a face's identity. + + + Attributes: + celebrity: + The [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] that + this face was matched to. + confidence: + Recognition confidence. Range [0, 1]. + """, + # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceRecognitionResult) + ), +) +_sym_db.RegisterMessage(FaceRecognitionResult) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/vision/google/cloud/vision_v1p4beta1/proto/face_pb2_grpc.py b/vision/google/cloud/vision_v1p4beta1/proto/face_pb2_grpc.py new file mode 100644 index 000000000000..07cb78fe03a9 --- /dev/null +++ b/vision/google/cloud/vision_v1p4beta1/proto/face_pb2_grpc.py @@ -0,0 +1,2 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +import grpc diff --git a/vision/google/cloud/vision_v1p4beta1/proto/geometry.proto b/vision/google/cloud/vision_v1p4beta1/proto/geometry.proto index b0abd329c026..18877188faea 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/geometry.proto +++ b/vision/google/cloud/vision_v1p4beta1/proto/geometry.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vision/google/cloud/vision_v1p4beta1/proto/image_annotator.proto b/vision/google/cloud/vision_v1p4beta1/proto/image_annotator.proto index 30318044a676..e3553b0de02c 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/image_annotator.proto +++ b/vision/google/cloud/vision_v1p4beta1/proto/image_annotator.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/vision/v1p4beta1/face.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; import "google/cloud/vision/v1p4beta1/product_search.proto"; import "google/cloud/vision/v1p4beta1/text_annotation.proto"; @@ -40,6 +43,11 @@ option objc_class_prefix = "GCVN"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { @@ -47,6 +55,7 @@ service ImageAnnotator { post: "/v1p4beta1/images:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } // Service that performs image detection and annotation for a batch of files. @@ -62,6 +71,7 @@ service ImageAnnotator { post: "/v1p4beta1/files:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } // Run asynchronous image detection and annotation for a list of images. @@ -79,6 +89,11 @@ service ImageAnnotator { post: "/v1p4beta1/images:asyncBatchAnnotate" body: "*" }; + option (google.api.method_signature) = "requests,output_config"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateImagesResponse" + metadata_type: "OperationMetadata" + }; } // Run asynchronous image detection and annotation for a list of generic @@ -93,6 +108,11 @@ service ImageAnnotator { post: "/v1p4beta1/files:asyncBatchAnnotate" body: "*" }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; } } @@ -209,19 +229,19 @@ enum Likelihood { // Unknown likelihood. UNKNOWN = 0; - // It is very unlikely that the image belongs to the specified vertical. + // It is very unlikely. VERY_UNLIKELY = 1; - // It is unlikely that the image belongs to the specified vertical. + // It is unlikely. UNLIKELY = 2; - // It is possible that the image belongs to the specified vertical. + // It is possible. POSSIBLE = 3; - // It is likely that the image belongs to the specified vertical. + // It is likely. LIKELY = 4; - // It is very likely that the image belongs to the specified vertical. + // It is very likely. VERY_LIKELY = 5; } @@ -407,6 +427,13 @@ message FaceAnnotation { // Headwear likelihood. Likelihood headwear_likelihood = 15; + + // Additional recognition information. Only computed if + // image_context.face_recognition_params is provided, **and** a match is found + // to a [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the input + // [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. This field is + // sorted in order of decreasing confidence values. + repeated FaceRecognitionResult recognition_result = 16; } // Detected entity location information. @@ -611,6 +638,9 @@ message ImageContext { // Parameters for crop hints annotation request. CropHintsParams crop_hints_params = 4; + // Parameters for face recognition. + FaceRecognitionParams face_recognition_params = 10; + // Parameters for product search. ProductSearchParams product_search_params = 5; @@ -694,19 +724,6 @@ message AnnotateImageResponse { ImageAnnotationContext context = 21; } -// Response to a single file annotation request. A file may contain one or more -// images, which individually have their own responses. -message AnnotateFileResponse { - // Information about the file for which this response is generated. - InputConfig input_config = 1; - - // Individual responses to images found within the file. - repeated AnnotateImageResponse responses = 2; - - // This field gives the total number of pages in the file. - int32 total_pages = 3; -} - // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { // Individual image annotation requests for this batch. @@ -747,11 +764,30 @@ message AnnotateFileRequest { repeated int32 pages = 4; } +// Response to a single file annotation request. A file may contain one or more +// images, which individually have their own responses. +message AnnotateFileResponse { + // Information about the file for which this response is generated. + InputConfig input_config = 1; + + // Individual responses to images found within the file. This field will be + // empty if the `error` field is set. + repeated AnnotateImageResponse responses = 2; + + // This field gives the total number of pages in the file. + int32 total_pages = 3; + + // If set, represents the error message for the failed request. The + // `responses` field will not be set in this case. + google.rpc.Status error = 4; +} + // A list of requests to annotate files using the BatchAnnotateFiles API. message BatchAnnotateFilesRequest { - // The list of file annotation requests. Right now we support only one - // AnnotateFileRequest in BatchAnnotateFilesRequest. - repeated AnnotateFileRequest requests = 1; + // Required. The list of file annotation requests. Right now we support only + // one AnnotateFileRequest in BatchAnnotateFilesRequest. + repeated AnnotateFileRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; } // A list of file annotation responses. @@ -784,11 +820,12 @@ message AsyncAnnotateFileResponse { // Request for async image annotation for a list of images. message AsyncBatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. The desired output location and metadata (e.g. format). - OutputConfig output_config = 2; + OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Response to an async batch image annotation request. @@ -800,8 +837,9 @@ message AsyncBatchAnnotateImagesResponse { // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { - // Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1; + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 + [(google.api.field_behavior) = REQUIRED]; } // Response to an async batch file annotation request. @@ -824,8 +862,8 @@ message InputConfig { // not work for AsyncBatchAnnotateFiles requests. bytes content = 3; - // The type of the file. Currently only "application/pdf" and "image/tiff" - // are supported. Wildcards are not supported. + // The type of the file. Currently only "application/pdf", "image/tiff" and + // "image/gif" are supported. Wildcards are not supported. string mime_type = 2; } @@ -857,16 +895,23 @@ message GcsSource { // The Google Cloud Storage location where the output will be written to. message GcsDestination { - // Google Cloud Storage URI where the results will be stored. Results will - // be in JSON format and preceded by its corresponding input URI. This field - // can either represent a single file, or a prefix for multiple outputs. - // Prefixes must end in a `/`. + // Google Cloud Storage URI prefix where the results will be stored. Results + // will be in JSON format and preceded by its corresponding input URI prefix. + // This field can either represent a gcs file prefix or gcs directory. In + // either case, the uri should be unique because in order to get all of the + // output files, you will need to do a wildcard gcs search on the uri prefix + // you provide. // // Examples: // - // * File: gs://bucket-name/filename.json - // * Prefix: gs://bucket-name/prefix/here/ - // * File: gs://bucket-name/prefix/here + // * File Prefix: gs://bucket-name/here/filenameprefix The output files + // will be created in gs://bucket-name/here/ and the names of the + // output files will begin with "filenameprefix". + // + // * Directory Prefix: gs://bucket-name/some/location/ The output files + // will be created in gs://bucket-name/some/location/ and the names of the + // output files could be anything because there was no filename prefix + // specified. // // If multiple outputs, each response is still AnnotateFileResponse, each of // which contains some subset of the full list of AnnotateImageResponse. diff --git a/vision/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py b/vision/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py index a162a9f4d9d6..5d0bb3d90365 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py +++ b/vision/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py @@ -17,6 +17,11 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.cloud.vision_v1p4beta1.proto import ( + face_pb2 as google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_face__pb2, +) from google.cloud.vision_v1p4beta1.proto import ( geometry_pb2 as google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_geometry__pb2, ) @@ -47,10 +52,13 @@ "\n!com.google.cloud.vision.v1p4beta1B\023ImageAnnotatorProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN" ), serialized_pb=_b( - '\n9google/cloud/vision_v1p4beta1/proto/image_annotator.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto\x1a\x38google/cloud/vision_v1p4beta1/proto/product_search.proto\x1a\x39google/cloud/vision_v1p4beta1/proto/text_annotation.proto\x1a\x37google/cloud/vision_v1p4beta1/proto/web_detection.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x18google/type/latlng.proto"\x8e\x03\n\x07\x46\x65\x61ture\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.vision.v1p4beta1.Feature.Type\x12\x13\n\x0bmax_results\x18\x02 \x01(\x05\x12\r\n\x05model\x18\x03 \x01(\t"\xa3\x02\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x01\x12\x16\n\x12LANDMARK_DETECTION\x10\x02\x12\x12\n\x0eLOGO_DETECTION\x10\x03\x12\x13\n\x0fLABEL_DETECTION\x10\x04\x12\x12\n\x0eTEXT_DETECTION\x10\x05\x12\x1b\n\x17\x44OCUMENT_TEXT_DETECTION\x10\x0b\x12\x19\n\x15SAFE_SEARCH_DETECTION\x10\x06\x12\x14\n\x10IMAGE_PROPERTIES\x10\x07\x12\x0e\n\nCROP_HINTS\x10\t\x12\x11\n\rWEB_DETECTION\x10\n\x12\x12\n\x0ePRODUCT_SEARCH\x10\x0c\x12\x17\n\x13OBJECT_LOCALIZATION\x10\x13"7\n\x0bImageSource\x12\x15\n\rgcs_image_uri\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t"T\n\x05Image\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12:\n\x06source\x18\x02 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.ImageSource"\x9b\x0e\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x45\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12I\n\tlandmarks\x18\x03 \x03(\x0b\x32\x36.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark\x12\x12\n\nroll_angle\x18\x04 \x01(\x02\x12\x11\n\tpan_angle\x18\x05 \x01(\x02\x12\x12\n\ntilt_angle\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tection_confidence\x18\x07 \x01(\x02\x12\x1e\n\x16landmarking_confidence\x18\x08 \x01(\x02\x12\x41\n\x0ejoy_likelihood\x18\t \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x44\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x43\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x46\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12K\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x45\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x46\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x1a\xc7\x07\n\x08Landmark\x12I\n\x04type\x18\x03 \x01(\x0e\x32;.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type\x12\x39\n\x08position\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1p4beta1.Position"\xb4\x06\n\x04Type\x12\x14\n\x10UNKNOWN_LANDMARK\x10\x00\x12\x0c\n\x08LEFT_EYE\x10\x01\x12\r\n\tRIGHT_EYE\x10\x02\x12\x18\n\x14LEFT_OF_LEFT_EYEBROW\x10\x03\x12\x19\n\x15RIGHT_OF_LEFT_EYEBROW\x10\x04\x12\x19\n\x15LEFT_OF_RIGHT_EYEBROW\x10\x05\x12\x1a\n\x16RIGHT_OF_RIGHT_EYEBROW\x10\x06\x12\x19\n\x15MIDPOINT_BETWEEN_EYES\x10\x07\x12\x0c\n\x08NOSE_TIP\x10\x08\x12\r\n\tUPPER_LIP\x10\t\x12\r\n\tLOWER_LIP\x10\n\x12\x0e\n\nMOUTH_LEFT\x10\x0b\x12\x0f\n\x0bMOUTH_RIGHT\x10\x0c\x12\x10\n\x0cMOUTH_CENTER\x10\r\x12\x15\n\x11NOSE_BOTTOM_RIGHT\x10\x0e\x12\x14\n\x10NOSE_BOTTOM_LEFT\x10\x0f\x12\x16\n\x12NOSE_BOTTOM_CENTER\x10\x10\x12\x19\n\x15LEFT_EYE_TOP_BOUNDARY\x10\x11\x12\x19\n\x15LEFT_EYE_RIGHT_CORNER\x10\x12\x12\x1c\n\x18LEFT_EYE_BOTTOM_BOUNDARY\x10\x13\x12\x18\n\x14LEFT_EYE_LEFT_CORNER\x10\x14\x12\x1a\n\x16RIGHT_EYE_TOP_BOUNDARY\x10\x15\x12\x1a\n\x16RIGHT_EYE_RIGHT_CORNER\x10\x16\x12\x1d\n\x19RIGHT_EYE_BOTTOM_BOUNDARY\x10\x17\x12\x19\n\x15RIGHT_EYE_LEFT_CORNER\x10\x18\x12\x1f\n\x1bLEFT_EYEBROW_UPPER_MIDPOINT\x10\x19\x12 \n\x1cRIGHT_EYEBROW_UPPER_MIDPOINT\x10\x1a\x12\x14\n\x10LEFT_EAR_TRAGION\x10\x1b\x12\x15\n\x11RIGHT_EAR_TRAGION\x10\x1c\x12\x12\n\x0eLEFT_EYE_PUPIL\x10\x1d\x12\x13\n\x0fRIGHT_EYE_PUPIL\x10\x1e\x12\x15\n\x11\x46OREHEAD_GLABELLA\x10\x1f\x12\x11\n\rCHIN_GNATHION\x10 \x12\x14\n\x10\x43HIN_LEFT_GONION\x10!\x12\x15\n\x11\x43HIN_RIGHT_GONION\x10""4\n\x0cLocationInfo\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng"=\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x14\n\x0cuint64_value\x18\x03 \x01(\x04"\xc0\x02\n\x10\x45ntityAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x0e\n\x06locale\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x16\n\nconfidence\x18\x05 \x01(\x02\x42\x02\x18\x01\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12\x42\n\rbounding_poly\x18\x07 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12>\n\tlocations\x18\x08 \x03(\x0b\x32+.google.cloud.vision.v1p4beta1.LocationInfo\x12;\n\nproperties\x18\t \x03(\x0b\x32\'.google.cloud.vision.v1p4beta1.Property"\xa0\x01\n\x19LocalizedObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x42\n\rbounding_poly\x18\x05 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly"\xbc\x02\n\x14SafeSearchAnnotation\x12\x38\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x38\n\x05spoof\x18\x02 \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12:\n\x07medical\x18\x03 \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12;\n\x08violence\x18\x04 \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x37\n\x04racy\x18\t \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood"a\n\x0bLatLongRect\x12(\n\x0bmin_lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12(\n\x0bmax_lat_lng\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng"U\n\tColorInfo\x12!\n\x05\x63olor\x18\x01 \x01(\x0b\x32\x12.google.type.Color\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x16\n\x0epixel_fraction\x18\x03 \x01(\x02"T\n\x18\x44ominantColorsAnnotation\x12\x38\n\x06\x63olors\x18\x01 \x03(\x0b\x32(.google.cloud.vision.v1p4beta1.ColorInfo"c\n\x0fImageProperties\x12P\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x37.google.cloud.vision.v1p4beta1.DominantColorsAnnotation"\x7f\n\x08\x43ropHint\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x1b\n\x13importance_fraction\x18\x03 \x01(\x02"R\n\x13\x43ropHintsAnnotation\x12;\n\ncrop_hints\x18\x01 \x03(\x0b\x32\'.google.cloud.vision.v1p4beta1.CropHint"(\n\x0f\x43ropHintsParams\x12\x15\n\raspect_ratios\x18\x01 \x03(\x02"1\n\x12WebDetectionParams\x12\x1b\n\x13include_geo_results\x18\x02 \x01(\x08"\xd8\x02\n\x0cImageContext\x12\x41\n\rlat_long_rect\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12I\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32..google.cloud.vision.v1p4beta1.CropHintsParams\x12Q\n\x15product_search_params\x18\x05 \x01(\x0b\x32\x32.google.cloud.vision.v1p4beta1.ProductSearchParams\x12O\n\x14web_detection_params\x18\x06 \x01(\x0b\x32\x31.google.cloud.vision.v1p4beta1.WebDetectionParams"\xc9\x01\n\x14\x41nnotateImageRequest\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1p4beta1.Image\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.ImageContext":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05"\xbf\x08\n\x15\x41nnotateImageResponse\x12G\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p4beta1.FaceAnnotation\x12M\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.EntityAnnotation\x12I\n\x10logo_annotations\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.EntityAnnotation\x12J\n\x11label_annotations\x18\x04 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.EntityAnnotation\x12^\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x38.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation\x12I\n\x10text_annotations\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.EntityAnnotation\x12K\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32-.google.cloud.vision.v1p4beta1.TextAnnotation\x12S\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32\x33.google.cloud.vision.v1p4beta1.SafeSearchAnnotation\x12S\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32..google.cloud.vision.v1p4beta1.ImageProperties\x12Q\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32\x32.google.cloud.vision.v1p4beta1.CropHintsAnnotation\x12\x42\n\rweb_detection\x18\r \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.WebDetection\x12S\n\x16product_search_results\x18\x0e \x01(\x0b\x32\x33.google.cloud.vision.v1p4beta1.ProductSearchResults\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\x12\x46\n\x07\x63ontext\x18\x15 \x01(\x0b\x32\x35.google.cloud.vision.v1p4beta1.ImageAnnotationContext"\xb6\x01\n\x14\x41nnotateFileResponse\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12G\n\tresponses\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.AnnotateImageResponse\x12\x13\n\x0btotal_pages\x18\x03 \x01(\x05"c\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x45\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateImageRequest"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.AnnotateImageResponse"\xe4\x01\n\x13\x41nnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.ImageContext\x12\r\n\x05pages\x18\x04 \x03(\x05"a\n\x19\x42\x61tchAnnotateFilesRequest\x12\x44\n\x08requests\x18\x01 \x03(\x0b\x32\x32.google.cloud.vision.v1p4beta1.AnnotateFileRequest"d\n\x1a\x42\x61tchAnnotateFilesResponse\x12\x46\n\tresponses\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateFileResponse"\x9e\x02\n\x18\x41syncAnnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.ImageContext\x12\x42\n\routput_config\x18\x04 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"_\n\x19\x41syncAnnotateFileResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"\xac\x01\n\x1f\x41syncBatchAnnotateImagesRequest\x12\x45\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateImageRequest\x12\x42\n\routput_config\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"f\n AsyncBatchAnnotateImagesResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"k\n\x1e\x41syncBatchAnnotateFilesRequest\x12I\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest"n\n\x1f\x41syncBatchAnnotateFilesResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32\x38.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse"o\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32(.google.cloud.vision.v1p4beta1.GcsSource\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t"j\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32-.google.cloud.vision.v1p4beta1.GcsDestination\x12\x12\n\nbatch_size\x18\x02 \x01(\x05"\x18\n\tGcsSource\x12\x0b\n\x03uri\x18\x01 \x01(\t"\x1d\n\x0eGcsDestination\x12\x0b\n\x03uri\x18\x01 \x01(\t"\x8f\x02\n\x11OperationMetadata\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x36.google.cloud.vision.v1p4beta1.OperationMetadata.State\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\r\n\tCANCELLED\x10\x04*e\n\nLikelihood\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xcf\x05\n\x0eImageAnnotator\x12\xb3\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse"%\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p4beta1/images:annotate:\x01*\x12\xaf\x01\n\x12\x42\x61tchAnnotateFiles\x12\x38.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest\x1a\x39.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse"$\x82\xd3\xe4\x93\x02\x1e"\x19/v1p4beta1/files:annotate:\x01*\x12\xaa\x01\n\x18\x41syncBatchAnnotateImages\x12>.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest\x1a\x1d.google.longrunning.Operation"/\x82\xd3\xe4\x93\x02)"$/v1p4beta1/images:asyncBatchAnnotate:\x01*\x12\xa7\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation".\x82\xd3\xe4\x93\x02("#/v1p4beta1/files:asyncBatchAnnotate:\x01*B\x89\x01\n!com.google.cloud.vision.v1p4beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' + '\n9google/cloud/vision_v1p4beta1/proto/image_annotator.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a.google/cloud/vision_v1p4beta1/proto/face.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto\x1a\x38google/cloud/vision_v1p4beta1/proto/product_search.proto\x1a\x39google/cloud/vision_v1p4beta1/proto/text_annotation.proto\x1a\x37google/cloud/vision_v1p4beta1/proto/web_detection.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x18google/type/latlng.proto"\x8e\x03\n\x07\x46\x65\x61ture\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.vision.v1p4beta1.Feature.Type\x12\x13\n\x0bmax_results\x18\x02 \x01(\x05\x12\r\n\x05model\x18\x03 \x01(\t"\xa3\x02\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46\x41\x43\x45_DETECTION\x10\x01\x12\x16\n\x12LANDMARK_DETECTION\x10\x02\x12\x12\n\x0eLOGO_DETECTION\x10\x03\x12\x13\n\x0fLABEL_DETECTION\x10\x04\x12\x12\n\x0eTEXT_DETECTION\x10\x05\x12\x1b\n\x17\x44OCUMENT_TEXT_DETECTION\x10\x0b\x12\x19\n\x15SAFE_SEARCH_DETECTION\x10\x06\x12\x14\n\x10IMAGE_PROPERTIES\x10\x07\x12\x0e\n\nCROP_HINTS\x10\t\x12\x11\n\rWEB_DETECTION\x10\n\x12\x12\n\x0ePRODUCT_SEARCH\x10\x0c\x12\x17\n\x13OBJECT_LOCALIZATION\x10\x13"7\n\x0bImageSource\x12\x15\n\rgcs_image_uri\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t"T\n\x05Image\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x12:\n\x06source\x18\x02 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.ImageSource"\xed\x0e\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x45\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12I\n\tlandmarks\x18\x03 \x03(\x0b\x32\x36.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark\x12\x12\n\nroll_angle\x18\x04 \x01(\x02\x12\x11\n\tpan_angle\x18\x05 \x01(\x02\x12\x12\n\ntilt_angle\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tection_confidence\x18\x07 \x01(\x02\x12\x1e\n\x16landmarking_confidence\x18\x08 \x01(\x02\x12\x41\n\x0ejoy_likelihood\x18\t \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x44\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x43\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x46\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12K\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x45\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x46\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12P\n\x12recognition_result\x18\x10 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.FaceRecognitionResult\x1a\xc7\x07\n\x08Landmark\x12I\n\x04type\x18\x03 \x01(\x0e\x32;.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type\x12\x39\n\x08position\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1p4beta1.Position"\xb4\x06\n\x04Type\x12\x14\n\x10UNKNOWN_LANDMARK\x10\x00\x12\x0c\n\x08LEFT_EYE\x10\x01\x12\r\n\tRIGHT_EYE\x10\x02\x12\x18\n\x14LEFT_OF_LEFT_EYEBROW\x10\x03\x12\x19\n\x15RIGHT_OF_LEFT_EYEBROW\x10\x04\x12\x19\n\x15LEFT_OF_RIGHT_EYEBROW\x10\x05\x12\x1a\n\x16RIGHT_OF_RIGHT_EYEBROW\x10\x06\x12\x19\n\x15MIDPOINT_BETWEEN_EYES\x10\x07\x12\x0c\n\x08NOSE_TIP\x10\x08\x12\r\n\tUPPER_LIP\x10\t\x12\r\n\tLOWER_LIP\x10\n\x12\x0e\n\nMOUTH_LEFT\x10\x0b\x12\x0f\n\x0bMOUTH_RIGHT\x10\x0c\x12\x10\n\x0cMOUTH_CENTER\x10\r\x12\x15\n\x11NOSE_BOTTOM_RIGHT\x10\x0e\x12\x14\n\x10NOSE_BOTTOM_LEFT\x10\x0f\x12\x16\n\x12NOSE_BOTTOM_CENTER\x10\x10\x12\x19\n\x15LEFT_EYE_TOP_BOUNDARY\x10\x11\x12\x19\n\x15LEFT_EYE_RIGHT_CORNER\x10\x12\x12\x1c\n\x18LEFT_EYE_BOTTOM_BOUNDARY\x10\x13\x12\x18\n\x14LEFT_EYE_LEFT_CORNER\x10\x14\x12\x1a\n\x16RIGHT_EYE_TOP_BOUNDARY\x10\x15\x12\x1a\n\x16RIGHT_EYE_RIGHT_CORNER\x10\x16\x12\x1d\n\x19RIGHT_EYE_BOTTOM_BOUNDARY\x10\x17\x12\x19\n\x15RIGHT_EYE_LEFT_CORNER\x10\x18\x12\x1f\n\x1bLEFT_EYEBROW_UPPER_MIDPOINT\x10\x19\x12 \n\x1cRIGHT_EYEBROW_UPPER_MIDPOINT\x10\x1a\x12\x14\n\x10LEFT_EAR_TRAGION\x10\x1b\x12\x15\n\x11RIGHT_EAR_TRAGION\x10\x1c\x12\x12\n\x0eLEFT_EYE_PUPIL\x10\x1d\x12\x13\n\x0fRIGHT_EYE_PUPIL\x10\x1e\x12\x15\n\x11\x46OREHEAD_GLABELLA\x10\x1f\x12\x11\n\rCHIN_GNATHION\x10 \x12\x14\n\x10\x43HIN_LEFT_GONION\x10!\x12\x15\n\x11\x43HIN_RIGHT_GONION\x10""4\n\x0cLocationInfo\x12$\n\x07lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng"=\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x14\n\x0cuint64_value\x18\x03 \x01(\x04"\xc0\x02\n\x10\x45ntityAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x0e\n\x06locale\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x16\n\nconfidence\x18\x05 \x01(\x02\x42\x02\x18\x01\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12\x42\n\rbounding_poly\x18\x07 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12>\n\tlocations\x18\x08 \x03(\x0b\x32+.google.cloud.vision.v1p4beta1.LocationInfo\x12;\n\nproperties\x18\t \x03(\x0b\x32\'.google.cloud.vision.v1p4beta1.Property"\xa0\x01\n\x19LocalizedObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x12\x42\n\rbounding_poly\x18\x05 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly"\xbc\x02\n\x14SafeSearchAnnotation\x12\x38\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x38\n\x05spoof\x18\x02 \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12:\n\x07medical\x18\x03 \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12;\n\x08violence\x18\x04 \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood\x12\x37\n\x04racy\x18\t \x01(\x0e\x32).google.cloud.vision.v1p4beta1.Likelihood"a\n\x0bLatLongRect\x12(\n\x0bmin_lat_lng\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12(\n\x0bmax_lat_lng\x18\x02 \x01(\x0b\x32\x13.google.type.LatLng"U\n\tColorInfo\x12!\n\x05\x63olor\x18\x01 \x01(\x0b\x32\x12.google.type.Color\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x16\n\x0epixel_fraction\x18\x03 \x01(\x02"T\n\x18\x44ominantColorsAnnotation\x12\x38\n\x06\x63olors\x18\x01 \x03(\x0b\x32(.google.cloud.vision.v1p4beta1.ColorInfo"c\n\x0fImageProperties\x12P\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x37.google.cloud.vision.v1p4beta1.DominantColorsAnnotation"\x7f\n\x08\x43ropHint\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x1b\n\x13importance_fraction\x18\x03 \x01(\x02"R\n\x13\x43ropHintsAnnotation\x12;\n\ncrop_hints\x18\x01 \x03(\x0b\x32\'.google.cloud.vision.v1p4beta1.CropHint"(\n\x0f\x43ropHintsParams\x12\x15\n\raspect_ratios\x18\x01 \x03(\x02"1\n\x12WebDetectionParams\x12\x1b\n\x13include_geo_results\x18\x02 \x01(\x08"\xaf\x03\n\x0cImageContext\x12\x41\n\rlat_long_rect\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12I\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32..google.cloud.vision.v1p4beta1.CropHintsParams\x12U\n\x17\x66\x61\x63\x65_recognition_params\x18\n \x01(\x0b\x32\x34.google.cloud.vision.v1p4beta1.FaceRecognitionParams\x12Q\n\x15product_search_params\x18\x05 \x01(\x0b\x32\x32.google.cloud.vision.v1p4beta1.ProductSearchParams\x12O\n\x14web_detection_params\x18\x06 \x01(\x0b\x32\x31.google.cloud.vision.v1p4beta1.WebDetectionParams"\xc9\x01\n\x14\x41nnotateImageRequest\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1p4beta1.Image\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.ImageContext":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05"\xbf\x08\n\x15\x41nnotateImageResponse\x12G\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p4beta1.FaceAnnotation\x12M\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.EntityAnnotation\x12I\n\x10logo_annotations\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.EntityAnnotation\x12J\n\x11label_annotations\x18\x04 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.EntityAnnotation\x12^\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x38.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation\x12I\n\x10text_annotations\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.EntityAnnotation\x12K\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32-.google.cloud.vision.v1p4beta1.TextAnnotation\x12S\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32\x33.google.cloud.vision.v1p4beta1.SafeSearchAnnotation\x12S\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32..google.cloud.vision.v1p4beta1.ImageProperties\x12Q\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32\x32.google.cloud.vision.v1p4beta1.CropHintsAnnotation\x12\x42\n\rweb_detection\x18\r \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.WebDetection\x12S\n\x16product_search_results\x18\x0e \x01(\x0b\x32\x33.google.cloud.vision.v1p4beta1.ProductSearchResults\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\x12\x46\n\x07\x63ontext\x18\x15 \x01(\x0b\x32\x35.google.cloud.vision.v1p4beta1.ImageAnnotationContext"c\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x45\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateImageRequest"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.AnnotateImageResponse"\xe4\x01\n\x13\x41nnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.ImageContext\x12\r\n\x05pages\x18\x04 \x03(\x05"\xd9\x01\n\x14\x41nnotateFileResponse\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12G\n\tresponses\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.AnnotateImageResponse\x12\x13\n\x0btotal_pages\x18\x03 \x01(\x05\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status"f\n\x19\x42\x61tchAnnotateFilesRequest\x12I\n\x08requests\x18\x01 \x03(\x0b\x32\x32.google.cloud.vision.v1p4beta1.AnnotateFileRequestB\x03\xe0\x41\x02"d\n\x1a\x42\x61tchAnnotateFilesResponse\x12\x46\n\tresponses\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateFileResponse"\x9e\x02\n\x18\x41syncAnnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.ImageContext\x12\x42\n\routput_config\x18\x04 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"_\n\x19\x41syncAnnotateFileResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"\xb6\x01\n\x1f\x41syncBatchAnnotateImagesRequest\x12J\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateImageRequestB\x03\xe0\x41\x02\x12G\n\routput_config\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfigB\x03\xe0\x41\x02"f\n AsyncBatchAnnotateImagesResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"p\n\x1e\x41syncBatchAnnotateFilesRequest\x12N\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02"n\n\x1f\x41syncBatchAnnotateFilesResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32\x38.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse"o\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32(.google.cloud.vision.v1p4beta1.GcsSource\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t"j\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32-.google.cloud.vision.v1p4beta1.GcsDestination\x12\x12\n\nbatch_size\x18\x02 \x01(\x05"\x18\n\tGcsSource\x12\x0b\n\x03uri\x18\x01 \x01(\t"\x1d\n\x0eGcsDestination\x12\x0b\n\x03uri\x18\x01 \x01(\t"\x8f\x02\n\x11OperationMetadata\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x36.google.cloud.vision.v1p4beta1.OperationMetadata.State\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\r\n\tCANCELLED\x10\x04*e\n\nLikelihood\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xf1\x07\n\x0eImageAnnotator\x12\xbe\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse"0\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p4beta1/images:annotate:\x01*\xda\x41\x08requests\x12\xba\x01\n\x12\x42\x61tchAnnotateFiles\x12\x38.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest\x1a\x39.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse"/\x82\xd3\xe4\x93\x02\x1e"\x19/v1p4beta1/files:annotate:\x01*\xda\x41\x08requests\x12\xfc\x01\n\x18\x41syncBatchAnnotateImages\x12>.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest\x1a\x1d.google.longrunning.Operation"\x80\x01\x82\xd3\xe4\x93\x02)"$/v1p4beta1/images:asyncBatchAnnotate:\x01*\xda\x41\x16requests,output_config\xca\x41\x35\n AsyncBatchAnnotateImagesResponse\x12\x11OperationMetadata\x12\xe9\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02("#/v1p4beta1/files:asyncBatchAnnotate:\x01*\xda\x41\x08requests\xca\x41\x34\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x11OperationMetadata\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionB\x89\x01\n!com.google.cloud.vision.v1p4beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_face__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_text__annotation__pb2.DESCRIPTOR, @@ -91,8 +99,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=8456, - serialized_end=8557, + serialized_start=8786, + serialized_end=8887, ) _sym_db.RegisterEnumDescriptor(_LIKELIHOOD) @@ -189,8 +197,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=636, - serialized_end=927, + serialized_start=742, + serialized_end=1033, ) _sym_db.RegisterEnumDescriptor(_FEATURE_TYPE) @@ -416,8 +424,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2072, - serialized_end=2892, + serialized_start=2260, + serialized_end=3080, ) _sym_db.RegisterEnumDescriptor(_FACEANNOTATION_LANDMARK_TYPE) @@ -449,8 +457,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=8373, - serialized_end=8454, + serialized_start=8703, + serialized_end=8784, ) _sym_db.RegisterEnumDescriptor(_OPERATIONMETADATA_STATE) @@ -525,8 +533,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=529, - serialized_end=927, + serialized_start=635, + serialized_end=1033, ) @@ -582,8 +590,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=929, - serialized_end=984, + serialized_start=1035, + serialized_end=1090, ) @@ -639,8 +647,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=986, - serialized_end=1070, + serialized_start=1092, + serialized_end=1176, ) @@ -696,8 +704,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1925, - serialized_end=2892, + serialized_start=2113, + serialized_end=3080, ) _FACEANNOTATION = _descriptor.Descriptor( @@ -977,6 +985,24 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="recognition_result", + full_name="google.cloud.vision.v1p4beta1.FaceAnnotation.recognition_result", + index=15, + number=16, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[_FACEANNOTATION_LANDMARK], @@ -986,8 +1012,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1073, - serialized_end=2892, + serialized_start=1179, + serialized_end=3080, ) @@ -1025,8 +1051,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2894, - serialized_end=2946, + serialized_start=3082, + serialized_end=3134, ) @@ -1100,8 +1126,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2948, - serialized_end=3009, + serialized_start=3136, + serialized_end=3197, ) @@ -1283,8 +1309,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3012, - serialized_end=3332, + serialized_start=3200, + serialized_end=3520, ) @@ -1394,8 +1420,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3335, - serialized_end=3495, + serialized_start=3523, + serialized_end=3683, ) @@ -1505,8 +1531,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3498, - serialized_end=3814, + serialized_start=3686, + serialized_end=4002, ) @@ -1562,8 +1588,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3816, - serialized_end=3913, + serialized_start=4004, + serialized_end=4101, ) @@ -1637,8 +1663,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3915, - serialized_end=4000, + serialized_start=4103, + serialized_end=4188, ) @@ -1676,8 +1702,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4002, - serialized_end=4086, + serialized_start=4190, + serialized_end=4274, ) @@ -1715,8 +1741,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4088, - serialized_end=4187, + serialized_start=4276, + serialized_end=4375, ) @@ -1790,8 +1816,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4189, - serialized_end=4316, + serialized_start=4377, + serialized_end=4504, ) @@ -1829,8 +1855,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4318, - serialized_end=4400, + serialized_start=4506, + serialized_end=4588, ) @@ -1868,8 +1894,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4402, - serialized_end=4442, + serialized_start=4590, + serialized_end=4630, ) @@ -1907,8 +1933,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4444, - serialized_end=4493, + serialized_start=4632, + serialized_end=4681, ) @@ -1973,10 +1999,28 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="face_recognition_params", + full_name="google.cloud.vision.v1p4beta1.ImageContext.face_recognition_params", + index=3, + number=10, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( name="product_search_params", full_name="google.cloud.vision.v1p4beta1.ImageContext.product_search_params", - index=3, + index=4, number=5, type=11, cpp_type=10, @@ -1994,7 +2038,7 @@ _descriptor.FieldDescriptor( name="web_detection_params", full_name="google.cloud.vision.v1p4beta1.ImageContext.web_detection_params", - index=4, + index=5, number=6, type=11, cpp_type=10, @@ -2018,8 +2062,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4496, - serialized_end=4840, + serialized_start=4684, + serialized_end=5115, ) @@ -2093,8 +2137,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4843, - serialized_end=5044, + serialized_start=5118, + serialized_end=5319, ) @@ -2150,8 +2194,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5046, - serialized_end=5104, + serialized_start=5321, + serialized_end=5379, ) @@ -2423,43 +2467,25 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5107, - serialized_end=6194, + serialized_start=5382, + serialized_end=6469, ) -_ANNOTATEFILERESPONSE = _descriptor.Descriptor( - name="AnnotateFileResponse", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse", +_BATCHANNOTATEIMAGESREQUEST = _descriptor.Descriptor( + name="BatchAnnotateImagesRequest", + full_name="google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="input_config", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse.input_config", + name="requests", + full_name="google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.requests", index=0, number=1, type=11, cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="responses", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse.responses", - index=1, - number=2, - type=11, - cpp_type=10, label=3, has_default_value=False, default_value=[], @@ -2470,25 +2496,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="total_pages", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse.total_pages", - index=2, - number=3, - type=5, - cpp_type=1, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), + ) ], extensions=[], nested_types=[], @@ -2498,21 +2506,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6197, - serialized_end=6379, + serialized_start=6471, + serialized_end=6570, ) -_BATCHANNOTATEIMAGESREQUEST = _descriptor.Descriptor( - name="BatchAnnotateImagesRequest", - full_name="google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest", +_BATCHANNOTATEIMAGESRESPONSE = _descriptor.Descriptor( + name="BatchAnnotateImagesResponse", + full_name="google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="requests", - full_name="google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.requests", + name="responses", + full_name="google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.responses", index=0, number=1, type=11, @@ -2537,25 +2545,43 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6381, - serialized_end=6480, + serialized_start=6572, + serialized_end=6674, ) -_BATCHANNOTATEIMAGESRESPONSE = _descriptor.Descriptor( - name="BatchAnnotateImagesResponse", - full_name="google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse", +_ANNOTATEFILEREQUEST = _descriptor.Descriptor( + name="AnnotateFileRequest", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="responses", - full_name="google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.responses", + name="input_config", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest.input_config", index=0, number=1, type=11, cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="features", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest.features", + index=1, + number=2, + type=11, + cpp_type=10, label=3, has_default_value=False, default_value=[], @@ -2566,7 +2592,43 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + ), + _descriptor.FieldDescriptor( + name="image_context", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest.image_context", + index=2, + number=3, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="pages", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest.pages", + index=3, + number=4, + type=5, + cpp_type=1, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[], @@ -2576,21 +2638,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6482, - serialized_end=6584, + serialized_start=6677, + serialized_end=6905, ) -_ANNOTATEFILEREQUEST = _descriptor.Descriptor( - name="AnnotateFileRequest", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest", +_ANNOTATEFILERESPONSE = _descriptor.Descriptor( + name="AnnotateFileResponse", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="input_config", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest.input_config", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse.input_config", index=0, number=1, type=11, @@ -2607,8 +2669,8 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="features", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest.features", + name="responses", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse.responses", index=1, number=2, type=11, @@ -2625,15 +2687,15 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="image_context", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest.image_context", + name="total_pages", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse.total_pages", index=2, number=3, - type=11, - cpp_type=10, + type=5, + cpp_type=1, label=1, has_default_value=False, - default_value=None, + default_value=0, message_type=None, enum_type=None, containing_type=None, @@ -2643,15 +2705,15 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="pages", - full_name="google.cloud.vision.v1p4beta1.AnnotateFileRequest.pages", + name="error", + full_name="google.cloud.vision.v1p4beta1.AnnotateFileResponse.error", index=3, number=4, - type=5, - cpp_type=1, - label=3, + type=11, + cpp_type=10, + label=1, has_default_value=False, - default_value=[], + default_value=None, message_type=None, enum_type=None, containing_type=None, @@ -2669,8 +2731,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6587, - serialized_end=6815, + serialized_start=6908, + serialized_end=7125, ) @@ -2696,7 +2758,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -2708,8 +2770,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6817, - serialized_end=6914, + serialized_start=7127, + serialized_end=7229, ) @@ -2747,8 +2809,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6916, - serialized_end=7016, + serialized_start=7231, + serialized_end=7331, ) @@ -2840,8 +2902,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7019, - serialized_end=7305, + serialized_start=7334, + serialized_end=7620, ) @@ -2879,8 +2941,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7307, - serialized_end=7402, + serialized_start=7622, + serialized_end=7717, ) @@ -2906,7 +2968,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2924,7 +2986,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -2936,8 +2998,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7405, - serialized_end=7577, + serialized_start=7720, + serialized_end=7902, ) @@ -2975,8 +3037,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7579, - serialized_end=7681, + serialized_start=7904, + serialized_end=8006, ) @@ -3002,7 +3064,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -3014,8 +3076,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7683, - serialized_end=7790, + serialized_start=8008, + serialized_end=8120, ) @@ -3053,8 +3115,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7792, - serialized_end=7902, + serialized_start=8122, + serialized_end=8232, ) @@ -3128,8 +3190,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7904, - serialized_end=8015, + serialized_start=8234, + serialized_end=8345, ) @@ -3185,8 +3247,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8017, - serialized_end=8123, + serialized_start=8347, + serialized_end=8453, ) @@ -3224,8 +3286,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8125, - serialized_end=8149, + serialized_start=8455, + serialized_end=8479, ) @@ -3263,8 +3325,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8151, - serialized_end=8180, + serialized_start=8481, + serialized_end=8510, ) @@ -3338,8 +3400,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8183, - serialized_end=8454, + serialized_start=8513, + serialized_end=8784, ) _FEATURE.fields_by_name["type"].enum_type = _FEATURE_TYPE @@ -3373,6 +3435,11 @@ _FACEANNOTATION.fields_by_name["under_exposed_likelihood"].enum_type = _LIKELIHOOD _FACEANNOTATION.fields_by_name["blurred_likelihood"].enum_type = _LIKELIHOOD _FACEANNOTATION.fields_by_name["headwear_likelihood"].enum_type = _LIKELIHOOD +_FACEANNOTATION.fields_by_name[ + "recognition_result" +].message_type = ( + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_face__pb2._FACERECOGNITIONRESULT +) _LOCATIONINFO.fields_by_name[ "lat_lng" ].message_type = google_dot_type_dot_latlng__pb2._LATLNG @@ -3412,6 +3479,11 @@ _CROPHINTSANNOTATION.fields_by_name["crop_hints"].message_type = _CROPHINT _IMAGECONTEXT.fields_by_name["lat_long_rect"].message_type = _LATLONGRECT _IMAGECONTEXT.fields_by_name["crop_hints_params"].message_type = _CROPHINTSPARAMS +_IMAGECONTEXT.fields_by_name[ + "face_recognition_params" +].message_type = ( + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_face__pb2._FACERECOGNITIONPARAMS +) _IMAGECONTEXT.fields_by_name[ "product_search_params" ].message_type = ( @@ -3465,8 +3537,6 @@ "error" ].message_type = google_dot_rpc_dot_status__pb2._STATUS _ANNOTATEIMAGERESPONSE.fields_by_name["context"].message_type = _IMAGEANNOTATIONCONTEXT -_ANNOTATEFILERESPONSE.fields_by_name["input_config"].message_type = _INPUTCONFIG -_ANNOTATEFILERESPONSE.fields_by_name["responses"].message_type = _ANNOTATEIMAGERESPONSE _BATCHANNOTATEIMAGESREQUEST.fields_by_name[ "requests" ].message_type = _ANNOTATEIMAGEREQUEST @@ -3476,6 +3546,11 @@ _ANNOTATEFILEREQUEST.fields_by_name["input_config"].message_type = _INPUTCONFIG _ANNOTATEFILEREQUEST.fields_by_name["features"].message_type = _FEATURE _ANNOTATEFILEREQUEST.fields_by_name["image_context"].message_type = _IMAGECONTEXT +_ANNOTATEFILERESPONSE.fields_by_name["input_config"].message_type = _INPUTCONFIG +_ANNOTATEFILERESPONSE.fields_by_name["responses"].message_type = _ANNOTATEIMAGERESPONSE +_ANNOTATEFILERESPONSE.fields_by_name[ + "error" +].message_type = google_dot_rpc_dot_status__pb2._STATUS _BATCHANNOTATEFILESREQUEST.fields_by_name[ "requests" ].message_type = _ANNOTATEFILEREQUEST @@ -3535,7 +3610,6 @@ DESCRIPTOR.message_types_by_name["AnnotateImageRequest"] = _ANNOTATEIMAGEREQUEST DESCRIPTOR.message_types_by_name["ImageAnnotationContext"] = _IMAGEANNOTATIONCONTEXT DESCRIPTOR.message_types_by_name["AnnotateImageResponse"] = _ANNOTATEIMAGERESPONSE -DESCRIPTOR.message_types_by_name["AnnotateFileResponse"] = _ANNOTATEFILERESPONSE DESCRIPTOR.message_types_by_name[ "BatchAnnotateImagesRequest" ] = _BATCHANNOTATEIMAGESREQUEST @@ -3543,6 +3617,7 @@ "BatchAnnotateImagesResponse" ] = _BATCHANNOTATEIMAGESRESPONSE DESCRIPTOR.message_types_by_name["AnnotateFileRequest"] = _ANNOTATEFILEREQUEST +DESCRIPTOR.message_types_by_name["AnnotateFileResponse"] = _ANNOTATEFILERESPONSE DESCRIPTOR.message_types_by_name[ "BatchAnnotateFilesRequest" ] = _BATCHANNOTATEFILESREQUEST @@ -3737,6 +3812,14 @@ Blurred likelihood. headwear_likelihood: Headwear likelihood. + recognition_result: + Additional recognition information. Only computed if + image\_context.face\_recognition\_params is provided, **and** + a match is found to a + [Celebrity][google.cloud.vision.v1p4beta1.Celebrity] in the + input + [CelebritySet][google.cloud.vision.v1p4beta1.CelebritySet]. + This field is sorted in order of decreasing confidence values. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceAnnotation) ), @@ -4094,6 +4177,8 @@ `__. crop_hints_params: Parameters for crop hints annotation request. + face_recognition_params: + Parameters for face recognition. product_search_params: Parameters for product search. web_detection_params: @@ -4201,30 +4286,6 @@ ) _sym_db.RegisterMessage(AnnotateImageResponse) -AnnotateFileResponse = _reflection.GeneratedProtocolMessageType( - "AnnotateFileResponse", - (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEFILERESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Response to a single file annotation request. A file may contain one or - more images, which individually have their own responses. - - - Attributes: - input_config: - Information about the file for which this response is - generated. - responses: - Individual responses to images found within the file. - total_pages: - This field gives the total number of pages in the file. - """, - # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileResponse) - ), -) -_sym_db.RegisterMessage(AnnotateFileResponse) - BatchAnnotateImagesRequest = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesRequest", (_message.Message,), @@ -4296,6 +4357,34 @@ ) _sym_db.RegisterMessage(AnnotateFileRequest) +AnnotateFileResponse = _reflection.GeneratedProtocolMessageType( + "AnnotateFileResponse", + (_message.Message,), + dict( + DESCRIPTOR=_ANNOTATEFILERESPONSE, + __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + __doc__="""Response to a single file annotation request. A file may contain one or + more images, which individually have their own responses. + + + Attributes: + input_config: + Information about the file for which this response is + generated. + responses: + Individual responses to images found within the file. This + field will be empty if the ``error`` field is set. + total_pages: + This field gives the total number of pages in the file. + error: + If set, represents the error message for the failed request. + The ``responses`` field will not be set in this case. + """, + # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileResponse) + ), +) +_sym_db.RegisterMessage(AnnotateFileResponse) + BatchAnnotateFilesRequest = _reflection.GeneratedProtocolMessageType( "BatchAnnotateFilesRequest", (_message.Message,), @@ -4307,8 +4396,9 @@ Attributes: requests: - The list of file annotation requests. Right now we support - only one AnnotateFileRequest in BatchAnnotateFilesRequest. + Required. The list of file annotation requests. Right now we + support only one AnnotateFileRequest in + BatchAnnotateFilesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) ), @@ -4391,7 +4481,7 @@ Attributes: requests: - Individual image annotation requests for this batch. + Required. Individual image annotation requests for this batch. output_config: Required. The desired output location and metadata (e.g. format). @@ -4432,7 +4522,8 @@ Attributes: requests: - Individual async file annotation requests for this batch. + Required. Individual async file annotation requests for this + batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) ), @@ -4478,8 +4569,9 @@ requests. It does not work for AsyncBatchAnnotateFiles requests. mime_type: - The type of the file. Currently only "application/pdf" and - "image/tiff" are supported. Wildcards are not supported. + The type of the file. Currently only "application/pdf", + "image/tiff" and "image/gif" are supported. Wildcards are not + supported. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.InputConfig) ), @@ -4545,17 +4637,25 @@ Attributes: uri: - Google Cloud Storage URI where the results will be stored. - Results will be in JSON format and preceded by its - corresponding input URI. This field can either represent a - single file, or a prefix for multiple outputs. Prefixes must - end in a ``/``. Examples: - File: gs://bucket- - name/filename.json - Prefix: gs://bucket-name/prefix/here/ - - File: gs://bucket-name/prefix/here If multiple outputs, each - response is still AnnotateFileResponse, each of which contains - some subset of the full list of AnnotateImageResponse. - Multiple outputs can happen if, for example, the output JSON - is too large and overflows into multiple sharded files. + Google Cloud Storage URI prefix where the results will be + stored. Results will be in JSON format and preceded by its + corresponding input URI prefix. This field can either + represent a gcs file prefix or gcs directory. In either case, + the uri should be unique because in order to get all of the + output files, you will need to do a wildcard gcs search on the + uri prefix you provide. Examples: - File Prefix: + gs://bucket-name/here/filenameprefix The output files will + be created in gs://bucket-name/here/ and the names of the + output files will begin with "filenameprefix". - + Directory Prefix: gs://bucket-name/some/location/ The output + files will be created in gs://bucket-name/some/location/ + and the names of the output files could be anything because + there was no filename prefix specified. If multiple + outputs, each response is still AnnotateFileResponse, each of + which contains some subset of the full list of + AnnotateImageResponse. Multiple outputs can happen if, for + example, the output JSON is too large and overflows into + multiple sharded files. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GcsDestination) ), @@ -4587,15 +4687,21 @@ DESCRIPTOR._options = None _ENTITYANNOTATION.fields_by_name["confidence"]._options = None +_BATCHANNOTATEFILESREQUEST.fields_by_name["requests"]._options = None +_ASYNCBATCHANNOTATEIMAGESREQUEST.fields_by_name["requests"]._options = None +_ASYNCBATCHANNOTATEIMAGESREQUEST.fields_by_name["output_config"]._options = None +_ASYNCBATCHANNOTATEFILESREQUEST.fields_by_name["requests"]._options = None _IMAGEANNOTATOR = _descriptor.ServiceDescriptor( name="ImageAnnotator", full_name="google.cloud.vision.v1p4beta1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=8560, - serialized_end=9279, + serialized_options=_b( + "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" + ), + serialized_start=8890, + serialized_end=9899, methods=[ _descriptor.MethodDescriptor( name="BatchAnnotateImages", @@ -4605,7 +4711,7 @@ input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, serialized_options=_b( - '\202\323\344\223\002\037"\032/v1p4beta1/images:annotate:\001*' + '\202\323\344\223\002\037"\032/v1p4beta1/images:annotate:\001*\332A\010requests' ), ), _descriptor.MethodDescriptor( @@ -4616,7 +4722,7 @@ input_type=_BATCHANNOTATEFILESREQUEST, output_type=_BATCHANNOTATEFILESRESPONSE, serialized_options=_b( - '\202\323\344\223\002\036"\031/v1p4beta1/files:annotate:\001*' + '\202\323\344\223\002\036"\031/v1p4beta1/files:annotate:\001*\332A\010requests' ), ), _descriptor.MethodDescriptor( @@ -4627,7 +4733,7 @@ input_type=_ASYNCBATCHANNOTATEIMAGESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002)"$/v1p4beta1/images:asyncBatchAnnotate:\001*' + '\202\323\344\223\002)"$/v1p4beta1/images:asyncBatchAnnotate:\001*\332A\026requests,output_config\312A5\n AsyncBatchAnnotateImagesResponse\022\021OperationMetadata' ), ), _descriptor.MethodDescriptor( @@ -4638,7 +4744,7 @@ input_type=_ASYNCBATCHANNOTATEFILESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002("#/v1p4beta1/files:asyncBatchAnnotate:\001*' + '\202\323\344\223\002("#/v1p4beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata' ), ), ], diff --git a/vision/google/cloud/vision_v1p4beta1/proto/product_search.proto b/vision/google/cloud/vision_v1p4beta1/proto/product_search.proto index e0982facdcc5..15baed1fd27c 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/product_search.proto +++ b/vision/google/cloud/vision_v1p4beta1/proto/product_search.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; import "google/cloud/vision/v1p4beta1/product_search_service.proto"; import "google/protobuf/timestamp.proto"; @@ -32,7 +33,7 @@ option objc_class_prefix = "GCVN"; // Parameters for a product search request. message ProductSearchParams { // The bounding polygon around the area of interest in the image. - // Optional. If it is not specified, system discretion will be applied. + // If it is not specified, system discretion will be applied. BoundingPoly bounding_poly = 9; // The resource name of a @@ -41,7 +42,9 @@ message ProductSearchParams { // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - string product_set = 6; + string product_set = 6 [(google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + }]; // The list of product categories to search in. Currently, we only consider // the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", @@ -54,10 +57,12 @@ message ProductSearchParams { // The filtering expression. This can be used to restrict search results based // on Product labels. We currently support an AND of OR of key-value - // expressions, where each expression within an OR must have the same key. + // expressions, where each expression within an OR must have the same key. An + // '=' should be used to connect the key and value. // // For example, "(color = red OR color = blue) AND brand = Google" is - // acceptable, but not "(color = red OR brand = Google)" or "color: red". + // acceptable, but "(color = red OR brand = Google)" is not acceptable. + // "color: red" is not acceptable because it uses a ':' instead of an '='. string filter = 8; } @@ -77,6 +82,23 @@ message ProductSearchResults { string image = 3; } + // Prediction for what the object in the bounding box is. + message ObjectAnnotation { + // Object ID that should align with EntityAnnotation mid. + string mid = 1; + + // The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + + // Object name, expressed in its `language_code` language. + string name = 3; + + // Score of the result. Range [0, 1]. + float score = 4; + } + // Information about the products similar to a single product in a query // image. message GroupedResult { @@ -85,10 +107,14 @@ message ProductSearchResults { // List of results, one for each product match. repeated Result results = 2; + + // List of generic predictions for the object in the bounding box. + repeated ObjectAnnotation object_annotations = 3; } - // Timestamp of the index which provided these results. Changes made after - // this time are not reflected in the current results. + // Timestamp of the index which provided these results. Products added to the + // product set and products removed from the product set after this time are + // not reflected in the current results. google.protobuf.Timestamp index_time = 2; // List of results, one for each product match. diff --git a/vision/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py b/vision/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py index a0f2b5252125..a631a4440500 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py +++ b/vision/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py @@ -16,6 +16,7 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.vision_v1p4beta1.proto import ( geometry_pb2 as google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_geometry__pb2, ) @@ -33,10 +34,11 @@ "\n!com.google.cloud.vision.v1p4beta1B\022ProductSearchProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN" ), serialized_pb=_b( - '\n8google/cloud/vision_v1p4beta1/proto/product_search.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto\x1a@google/cloud/vision_v1p4beta1/proto/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x9a\x01\n\x13ProductSearchParams\x12\x42\n\rbounding_poly\x18\t \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x13\n\x0bproduct_set\x18\x06 \x01(\t\x12\x1a\n\x12product_categories\x18\x07 \x03(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t"\xfb\x03\n\x14ProductSearchResults\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12K\n\x07results\x18\x05 \x03(\x0b\x32:.google.cloud.vision.v1p4beta1.ProductSearchResults.Result\x12\x62\n\x17product_grouped_results\x18\x06 \x03(\x0b\x32\x41.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult\x1a_\n\x06Result\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.Product\x12\r\n\x05score\x18\x02 \x01(\x02\x12\r\n\x05image\x18\x03 \x01(\t\x1a\xa0\x01\n\rGroupedResult\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12K\n\x07results\x18\x02 \x03(\x0b\x32:.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultB\x88\x01\n!com.google.cloud.vision.v1p4beta1B\x12ProductSearchProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' + '\n8google/cloud/vision_v1p4beta1/proto/product_search.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto\x1a@google/cloud/vision_v1p4beta1/proto/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xc1\x01\n\x13ProductSearchParams\x12\x42\n\rbounding_poly\x18\t \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12:\n\x0bproduct_set\x18\x06 \x01(\tB%\xfa\x41"\n vision.googleapis.com/ProductSet\x12\x1a\n\x12product_categories\x18\x07 \x03(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t"\xb2\x05\n\x14ProductSearchResults\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12K\n\x07results\x18\x05 \x03(\x0b\x32:.google.cloud.vision.v1p4beta1.ProductSearchResults.Result\x12\x62\n\x17product_grouped_results\x18\x06 \x03(\x0b\x32\x41.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult\x1a_\n\x06Result\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.Product\x12\r\n\x05score\x18\x02 \x01(\x02\x12\r\n\x05image\x18\x03 \x01(\t\x1aS\n\x10ObjectAnnotation\x12\x0b\n\x03mid\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05score\x18\x04 \x01(\x02\x1a\x82\x02\n\rGroupedResult\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12K\n\x07results\x18\x02 \x03(\x0b\x32:.google.cloud.vision.v1p4beta1.ProductSearchResults.Result\x12`\n\x12object_annotations\x18\x03 \x03(\x0b\x32\x44.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotationB\x88\x01\n!com.google.cloud.vision.v1p4beta1B\x12ProductSearchProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, @@ -84,7 +86,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -132,8 +134,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=273, - serialized_end=427, + serialized_start=300, + serialized_end=493, ) @@ -207,8 +209,100 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=679, - serialized_end=774, + serialized_start=745, + serialized_end=840, +) + +_PRODUCTSEARCHRESULTS_OBJECTANNOTATION = _descriptor.Descriptor( + name="ObjectAnnotation", + full_name="google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="mid", + full_name="google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.mid", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="language_code", + full_name="google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.language_code", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="name", + full_name="google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.name", + index=2, + number=3, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="score", + full_name="google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.score", + index=3, + number=4, + type=2, + cpp_type=6, + label=1, + has_default_value=False, + default_value=float(0), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=842, + serialized_end=925, ) _PRODUCTSEARCHRESULTS_GROUPEDRESULT = _descriptor.Descriptor( @@ -254,6 +348,24 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="object_annotations", + full_name="google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.object_annotations", + index=2, + number=3, + type=11, + cpp_type=10, + label=3, + has_default_value=False, + default_value=[], + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[], @@ -263,8 +375,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=777, - serialized_end=937, + serialized_start=928, + serialized_end=1186, ) _PRODUCTSEARCHRESULTS = _descriptor.Descriptor( @@ -330,15 +442,19 @@ ), ], extensions=[], - nested_types=[_PRODUCTSEARCHRESULTS_RESULT, _PRODUCTSEARCHRESULTS_GROUPEDRESULT], + nested_types=[ + _PRODUCTSEARCHRESULTS_RESULT, + _PRODUCTSEARCHRESULTS_OBJECTANNOTATION, + _PRODUCTSEARCHRESULTS_GROUPEDRESULT, + ], enum_types=[], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=430, - serialized_end=937, + serialized_start=496, + serialized_end=1186, ) _PRODUCTSEARCHPARAMS.fields_by_name[ @@ -352,6 +468,7 @@ google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2._PRODUCT ) _PRODUCTSEARCHRESULTS_RESULT.containing_type = _PRODUCTSEARCHRESULTS +_PRODUCTSEARCHRESULTS_OBJECTANNOTATION.containing_type = _PRODUCTSEARCHRESULTS _PRODUCTSEARCHRESULTS_GROUPEDRESULT.fields_by_name[ "bounding_poly" ].message_type = ( @@ -360,6 +477,9 @@ _PRODUCTSEARCHRESULTS_GROUPEDRESULT.fields_by_name[ "results" ].message_type = _PRODUCTSEARCHRESULTS_RESULT +_PRODUCTSEARCHRESULTS_GROUPEDRESULT.fields_by_name[ + "object_annotations" +].message_type = _PRODUCTSEARCHRESULTS_OBJECTANNOTATION _PRODUCTSEARCHRESULTS_GROUPEDRESULT.containing_type = _PRODUCTSEARCHRESULTS _PRODUCTSEARCHRESULTS.fields_by_name[ "index_time" @@ -386,8 +506,7 @@ Attributes: bounding_poly: The bounding polygon around the area of interest in the image. - Optional. If it is not specified, system discretion will be - applied. + If it is not specified, system discretion will be applied. product_set: The resource name of a [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be @@ -407,9 +526,11 @@ The filtering expression. This can be used to restrict search results based on Product labels. We currently support an AND of OR of key-value expressions, where each expression within - an OR must have the same key. For example, "(color = red OR - color = blue) AND brand = Google" is acceptable, but not - "(color = red OR brand = Google)" or "color: red". + an OR must have the same key. An '=' should be used to connect + the key and value. For example, "(color = red OR color = + blue) AND brand = Google" is acceptable, but "(color = red OR + brand = Google)" is not acceptable. "color: red" is not + acceptable because it uses a ':' instead of an '='. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchParams) ), @@ -442,6 +563,30 @@ # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) ), ), + ObjectAnnotation=_reflection.GeneratedProtocolMessageType( + "ObjectAnnotation", + (_message.Message,), + dict( + DESCRIPTOR=_PRODUCTSEARCHRESULTS_OBJECTANNOTATION, + __module__="google.cloud.vision_v1p4beta1.proto.product_search_pb2", + __doc__="""Prediction for what the object in the bounding box is. + + + Attributes: + mid: + Object ID that should align with EntityAnnotation mid. + language_code: + The BCP-47 language code, such as "en-US" or "sr-Latn". For + more information, see http://www.unicode.org/reports/tr35/#Uni + code\_locale\_identifier. + name: + Object name, expressed in its ``language_code`` language. + score: + Score of the result. Range [0, 1]. + """, + # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation) + ), + ), GroupedResult=_reflection.GeneratedProtocolMessageType( "GroupedResult", (_message.Message,), @@ -458,6 +603,9 @@ image. results: List of results, one for each product match. + object_annotations: + List of generic predictions for the object in the bounding + box. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) ), @@ -469,8 +617,9 @@ Attributes: index_time: - Timestamp of the index which provided these results. Changes - made after this time are not reflected in the current results. + Timestamp of the index which provided these results. Products + added to the product set and products removed from the product + set after this time are not reflected in the current results. results: List of results, one for each product match. product_grouped_results: @@ -485,8 +634,10 @@ ) _sym_db.RegisterMessage(ProductSearchResults) _sym_db.RegisterMessage(ProductSearchResults.Result) +_sym_db.RegisterMessage(ProductSearchResults.ObjectAnnotation) _sym_db.RegisterMessage(ProductSearchResults.GroupedResult) DESCRIPTOR._options = None +_PRODUCTSEARCHPARAMS.fields_by_name["product_set"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/vision/google/cloud/vision_v1p4beta1/proto/product_search_service.proto b/vision/google/cloud/vision_v1p4beta1/proto/product_search_service.proto index 28d7378b249c..1a165c708831 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/product_search_service.proto +++ b/vision/google/cloud/vision_v1p4beta1/proto/product_search_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,9 @@ syntax = "proto3"; package google.cloud.vision.v1p4beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1p4beta1/geometry.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -51,6 +54,11 @@ option objc_class_prefix = "GCVN"; // named // `projects/*/locations/*/products/*/referenceImages/*` service ProductSearch { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Creates and returns a new ProductSet resource. // // Possible errors: @@ -62,6 +70,7 @@ service ProductSearch { post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" body: "product_set" }; + option (google.api.method_signature) = "parent,product_set,product_set_id"; } // Lists ProductSets in an unspecified order. @@ -75,6 +84,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{parent=projects/*/locations/*}/productSets" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ProductSet. @@ -86,6 +96,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a ProductSet resource. @@ -101,21 +112,19 @@ service ProductSearch { patch: "/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}" body: "product_set" }; + option (google.api.method_signature) = "product_set,update_mask"; } // 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. rpc DeleteProductSet(DeleteProductSetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new product resource. @@ -131,6 +140,7 @@ service ProductSearch { post: "/v1p4beta1/{parent=projects/*/locations/*}/products" body: "product" }; + option (google.api.method_signature) = "parent,product,product_id"; } // Lists products in an unspecified order. @@ -142,6 +152,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{parent=projects/*/locations/*}/products" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a Product. @@ -153,6 +164,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a Product resource. @@ -175,6 +187,7 @@ service ProductSearch { patch: "/v1p4beta1/{product.name=projects/*/locations/*/products/*}" body: "product" }; + option (google.api.method_signature) = "product,update_mask"; } // Permanently deletes a product and its reference images. @@ -182,14 +195,11 @@ service ProductSearch { // 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. rpc DeleteProduct(DeleteProductRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1p4beta1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new ReferenceImage resource. @@ -217,6 +227,8 @@ service ProductSearch { post: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" body: "reference_image" }; + option (google.api.method_signature) = + "parent,reference_image,reference_image_id"; } // Permanently deletes a reference image. @@ -226,15 +238,12 @@ service ProductSearch { // 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. rpc DeleteReferenceImage(DeleteReferenceImageRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Lists reference images. @@ -249,6 +258,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ReferenceImage. @@ -260,6 +270,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Adds a Product to the specified ProductSet. If the Product is already @@ -276,19 +287,17 @@ service ProductSearch { post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Removes a Product from the specified ProductSet. - // - // Possible errors: - // - // * Returns NOT_FOUND If the Product is not found under the ProductSet. rpc RemoveProductFromProductSet(RemoveProductFromProductSetRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Lists the Products in a ProductSet, in an unspecified order. If the @@ -303,6 +312,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products" }; + option (google.api.method_signature) = "name"; } // Asynchronous API that imports a list of reference images to specified @@ -322,11 +332,58 @@ service ProductSearch { post: "/v1p4beta1/{parent=projects/*/locations/*}/productSets:import" body: "*" }; + option (google.api.method_signature) = "parent,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportProductSetsResponse" + metadata_type: "BatchOperationMetadata" + }; + } + + // Asynchronous API to delete all Products in a ProductSet or all Products + // that are in no ProductSet. + // + // If a Product is a member of the specified ProductSet in addition to other + // ProductSets, the Product will still be deleted. + // + // It is recommended to not delete the specified ProductSet until after this + // operation has completed. It is also recommended to not add any of the + // Products involved in the batch delete to a new ProductSet while this + // operation is running because those Products may still end up deleted. + // + // It's not possible to undo the PurgeProducts operation. Therefore, it is + // recommended to keep the csv files used in ImportProductSets (if that was + // how you originally built the Product Set) before starting PurgeProducts, in + // case you need to re-import the data after deletion. + // + // If the plan is to purge all of the Products from a ProductSet and then + // re-use the empty ProductSet to re-import new Products into the empty + // ProductSet, you must wait until the PurgeProducts operation has finished + // for that ProductSet. + // + // 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) + rpc PurgeProducts(PurgeProductsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/{parent=projects/*/locations/*}/products:purge" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "BatchOperationMetadata" + }; } } // A Product contains ReferenceImages. message Product { + option (google.api.resource) = { + type: "vision.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + }; + // A product label represented as a key-value pair. message KeyValue { // The key of the label attached to the product. Cannot be empty and cannot @@ -354,13 +411,11 @@ message Product { // characters long. string description = 3; - // The category for the product identified by the reference image. This should - // be either "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1", or - // "general-v1" The legacy categories "homegoods", "apparel", and "toys" are - // still supported, but these should not be used for new products. - // - // This field is immutable. - string product_category = 4; + // Immutable. The category for the product identified by the reference image. + // This should be either "homegoods-v2", "apparel-v2", or "toys-v2". The + // legacy categories "homegoods", "apparel", and "toys" are still supported, + // but these should not be used for new products. + string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; // Key-value pairs that can be attached to a product. At query time, // constraints can be specified based on the product_labels. @@ -370,7 +425,11 @@ message Product { // to be supported soon. // // Multiple values can be assigned to the same key. One product may have up to - // 100 product_labels. + // 500 product_labels. + // + // Notice that the total number of distinct product_labels over all products + // in one ProductSet cannot exceed 1M, otherwise the product search pipeline + // will refuse to work for that ProductSet. repeated KeyValue product_labels = 5; } @@ -378,6 +437,11 @@ message Product { // million reference images. If the limit is exceeded, periodic indexing will // fail. message ProductSet { + option (google.api.resource) = { + type: "vision.googleapis.com/ProductSet" + pattern: "projects/{project}/locations/{location}/productSets/{product_set}" + }; + // The resource name of the ProductSet. // // Format is: @@ -396,18 +460,24 @@ message ProductSet { // "1970-01-01T00:00:00Z". // // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3; + google.protobuf.Timestamp index_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If there was an error with indexing the product set, the field // is populated. // // This field is ignored when creating a ProductSet. - google.rpc.Status index_error = 4; + google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A `ReferenceImage` represents a product image and its associated metadata, // such as bounding boxes. message ReferenceImage { + option (google.api.resource) = { + type: "vision.googleapis.com/ReferenceImage" + pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }; + // The resource name of the reference image. // // Format is: @@ -417,34 +487,38 @@ message ReferenceImage { // This field is ignored when creating a reference image. string name = 1; - // The Google Cloud Storage URI of the reference image. + // Required. The Google Cloud Storage URI of the reference image. // // The URI must start with `gs://`. - // - // Required. - string uri = 2; + string uri = 2 [(google.api.field_behavior) = REQUIRED]; - // Bounding polygons around the areas of interest in the reference image. - // Optional. If this field is empty, the system will try to detect regions of + // Optional. Bounding polygons around the areas of interest in the reference + // image. If this field is empty, the system will try to detect regions of // interest. At most 10 bounding polygons will be used. // // The provided shape is converted into a non-rotated rectangle. Once // converted, the small edge of the rectangle must be greater than or equal // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 // is not). - repeated BoundingPoly bounding_polys = 3; + repeated BoundingPoly bounding_polys = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for the `CreateProduct` method. message CreateProductRequest { - // The project in which the Product should be created. + // Required. The project in which the Product should be created. // // Format is // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The product to create. - Product product = 2; + // Required. The product to create. + Product product = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this Product. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -455,11 +529,16 @@ message CreateProductRequest { // Request message for the `ListProducts` method. message ListProductsRequest { - // The project OR ProductSet from which Products should be listed. + // Required. The project OR ProductSet from which Products should be listed. // // Format: // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -480,18 +559,21 @@ message ListProductsResponse { // Request message for the `GetProduct` method. message GetProductRequest { - // Resource name of the Product to get. + // Required. Resource name of the Product to get. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; } // Request message for the `UpdateProduct` method. message UpdateProductRequest { - // The Product resource which replaces the one on the server. + // Required. The Product resource which replaces the one on the server. // product.name is immutable. - Product product = 1; + Product product = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields // to update. @@ -503,22 +585,30 @@ message UpdateProductRequest { // Request message for the `DeleteProduct` method. message DeleteProductRequest { - // Resource name of product to delete. + // Required. Resource name of product to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; } // Request message for the `CreateProductSet` method. message CreateProductSetRequest { - // The project in which the ProductSet should be created. + // Required. The project in which the ProductSet should be created. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The ProductSet to create. - ProductSet product_set = 2; + // Required. The ProductSet to create. + ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this ProductSet. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -529,10 +619,15 @@ message CreateProductSetRequest { // Request message for the `ListProductSets` method. message ListProductSetsRequest { - // The project from which ProductSets should be listed. + // Required. The project from which ProductSets should be listed. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -553,17 +648,22 @@ message ListProductSetsResponse { // Request message for the `GetProductSet` method. message GetProductSetRequest { - // Resource name of the ProductSet to get. + // Required. Resource name of the ProductSet to get. // // Format is: // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `UpdateProductSet` method. message UpdateProductSetRequest { - // The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1; + // Required. The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to // update. @@ -574,24 +674,33 @@ message UpdateProductSetRequest { // Request message for the `DeleteProductSet` method. message DeleteProductSetRequest { - // Resource name of the ProductSet to delete. + // Required. Resource name of the ProductSet to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `CreateReferenceImage` method. message CreateReferenceImageRequest { - // Resource name of the product in which to create the reference image. + // Required. Resource name of the product in which to create the reference + // image. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; - // The reference image to create. + // Required. The reference image to create. // If an image ID is specified, it is ignored. - ReferenceImage reference_image = 2; + ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for the ReferenceImage to be added. If set, // the server will attempt to use this value as the resource id. If it is @@ -602,11 +711,14 @@ message CreateReferenceImageRequest { // Request message for the `ListReferenceImages` method. message ListReferenceImagesRequest { - // Resource name of the product containing the reference images. + // Required. Resource name of the product containing the reference images. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -632,61 +744,93 @@ message ListReferenceImagesResponse { // Request message for the `GetReferenceImage` method. message GetReferenceImageRequest { - // The resource name of the ReferenceImage to get. + // Required. The resource name of the ReferenceImage to get. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `DeleteReferenceImage` method. message DeleteReferenceImageRequest { - // The resource name of the reference image to delete. + // Required. The resource name of the reference image to delete. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `AddProductToProductSet` method. message AddProductToProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be added to this ProductSet. + // Required. 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; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; } // Request message for the `RemoveProductFromProductSet` method. message RemoveProductFromProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be removed from this ProductSet. + // Required. The resource name for the Product to be removed from this + // ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "vision.googleapis.com/Product" } + ]; } // Request message for the `ListProductsInProductSet` method. message ListProductsInProductSetRequest { - // The ProductSet resource for which to retrieve Products. + // Required. The ProductSet resource for which to retrieve Products. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -786,13 +930,19 @@ message ImportProductSetsInputConfig { // Request message for the `ImportProductSets` method. message ImportProductSetsRequest { - // The project in which the ProductSets should be imported. + // Required. The project in which the ProductSets should be imported. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; - - // The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The input content for the list of requests. + ImportProductSetsInputConfig input_config = 2 + [(google.api.field_behavior) = REQUIRED]; } // Response message for the `ImportProductSets` method. @@ -852,3 +1002,38 @@ message BatchOperationMetadata { // set to true. google.protobuf.Timestamp end_time = 3; } + +// Config to control which ProductSet contains the Products to be deleted. +message ProductSetPurgeConfig { + // The ProductSet that contains the Products to delete. If a Product is a + // member of product_set_id in addition to other ProductSets, the Product will + // still be deleted. + string product_set_id = 1; +} + +// Request message for the `PurgeProducts` method. +message PurgeProductsRequest { + // The Products to delete. + oneof target { + // Specify which ProductSet contains the Products to be deleted. + ProductSetPurgeConfig product_set_purge_config = 2; + + // If delete_orphan_products is true, all Products that are not in any + // ProductSet will be deleted. + bool delete_orphan_products = 3; + } + + // Required. The project and location in which the Products should be deleted. + // + // Format is `projects/PROJECT_ID/locations/LOC_ID`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The default value is false. Override this value to true to actually perform + // the purge. + bool force = 4; +} diff --git a/vision/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py b/vision/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py index f2f075fb63a9..34f1d9d09ecd 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py +++ b/vision/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py @@ -16,6 +16,9 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.vision_v1p4beta1.proto import ( geometry_pb2 as google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_geometry__pb2, ) @@ -36,10 +39,13 @@ "\n!com.google.cloud.vision.v1p4beta1B\031ProductSearchServiceProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN" ), serialized_pb=_b( - '\n@google/cloud/vision_v1p4beta1/proto/product_search_service.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"\xcd\x01\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x18\n\x10product_category\x18\x04 \x01(\t\x12G\n\x0eproduct_labels\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.Product.KeyValue\x1a&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t"\x89\x01\n\nProductSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12.\n\nindex_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x0bindex_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status"p\n\x0eReferenceImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x43\n\x0e\x62ounding_polys\x18\x03 \x03(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly"s\n\x14\x43reateProductRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x37\n\x07product\x18\x02 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.Product\x12\x12\n\nproduct_id\x18\x03 \x01(\t"L\n\x13ListProductsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"i\n\x14ListProductsResponse\x12\x38\n\x08products\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"!\n\x11GetProductRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x80\x01\n\x14UpdateProductRequest\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.Product\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"$\n\x14\x44\x65leteProductRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x81\x01\n\x17\x43reateProductSetRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12>\n\x0bproduct_set\x18\x02 \x01(\x0b\x32).google.cloud.vision.v1p4beta1.ProductSet\x12\x16\n\x0eproduct_set_id\x18\x03 \x01(\t"O\n\x16ListProductSetsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"s\n\x17ListProductSetsResponse\x12?\n\x0cproduct_sets\x18\x01 \x03(\x0b\x32).google.cloud.vision.v1p4beta1.ProductSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"$\n\x14GetProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x8a\x01\n\x17UpdateProductSetRequest\x12>\n\x0bproduct_set\x18\x01 \x01(\x0b\x32).google.cloud.vision.v1p4beta1.ProductSet\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\'\n\x17\x44\x65leteProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x91\x01\n\x1b\x43reateReferenceImageRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x46\n\x0freference_image\x18\x02 \x01(\x0b\x32-.google.cloud.vision.v1p4beta1.ReferenceImage\x12\x1a\n\x12reference_image_id\x18\x03 \x01(\t"S\n\x1aListReferenceImagesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x92\x01\n\x1bListReferenceImagesResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p4beta1.ReferenceImage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t"(\n\x18GetReferenceImageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"+\n\x1b\x44\x65leteReferenceImageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t">\n\x1d\x41\x64\x64ProductToProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07product\x18\x02 \x01(\t"C\n"RemoveProductFromProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07product\x18\x02 \x01(\t"V\n\x1fListProductsInProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"u\n ListProductsInProductSetResponse\x12\x38\n\x08products\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"2\n\x1aImportProductSetsGcsSource\x12\x14\n\x0c\x63sv_file_uri\x18\x01 \x01(\t"y\n\x1cImportProductSetsInputConfig\x12O\n\ngcs_source\x18\x01 \x01(\x0b\x32\x39.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceH\x00\x42\x08\n\x06source"}\n\x18ImportProductSetsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12Q\n\x0cinput_config\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig"\x8a\x01\n\x19ImportProductSetsResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p4beta1.ReferenceImage\x12$\n\x08statuses\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status"\x9e\x02\n\x16\x42\x61tchOperationMetadata\x12J\n\x05state\x18\x01 \x01(\x0e\x32;.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\x0e\n\nSUCCESSFUL\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x32\x9f\x1b\n\rProductSearch\x12\xc2\x01\n\x10\x43reateProductSet\x12\x36.google.cloud.vision.v1p4beta1.CreateProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet"K\x82\xd3\xe4\x93\x02\x45"6/v1p4beta1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\x12\xc0\x01\n\x0fListProductSets\x12\x35.google.cloud.vision.v1p4beta1.ListProductSetsRequest\x1a\x36.google.cloud.vision.v1p4beta1.ListProductSetsResponse">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p4beta1/{parent=projects/*/locations/*}/productSets\x12\xaf\x01\n\rGetProductSet\x12\x33.google.cloud.vision.v1p4beta1.GetProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p4beta1/{name=projects/*/locations/*/productSets/*}\x12\xce\x01\n\x10UpdateProductSet\x12\x36.google.cloud.vision.v1p4beta1.UpdateProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet"W\x82\xd3\xe4\x93\x02Q2B/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\x12\xa2\x01\n\x10\x44\x65leteProductSet\x12\x36.google.cloud.vision.v1p4beta1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty">\x82\xd3\xe4\x93\x02\x38*6/v1p4beta1/{name=projects/*/locations/*/productSets/*}\x12\xb2\x01\n\rCreateProduct\x12\x33.google.cloud.vision.v1p4beta1.CreateProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product"D\x82\xd3\xe4\x93\x02>"3/v1p4beta1/{parent=projects/*/locations/*}/products:\x07product\x12\xb4\x01\n\x0cListProducts\x12\x32.google.cloud.vision.v1p4beta1.ListProductsRequest\x1a\x33.google.cloud.vision.v1p4beta1.ListProductsResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p4beta1/{parent=projects/*/locations/*}/products\x12\xa3\x01\n\nGetProduct\x12\x30.google.cloud.vision.v1p4beta1.GetProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product";\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p4beta1/{name=projects/*/locations/*/products/*}\x12\xba\x01\n\rUpdateProduct\x12\x33.google.cloud.vision.v1p4beta1.UpdateProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product"L\x82\xd3\xe4\x93\x02\x46\x32;/v1p4beta1/{product.name=projects/*/locations/*/products/*}:\x07product\x12\x99\x01\n\rDeleteProduct\x12\x33.google.cloud.vision.v1p4beta1.DeleteProductRequest\x1a\x16.google.protobuf.Empty";\x82\xd3\xe4\x93\x02\x35*3/v1p4beta1/{name=projects/*/locations/*/products/*}\x12\xe1\x01\n\x14\x43reateReferenceImage\x12:.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest\x1a-.google.cloud.vision.v1p4beta1.ReferenceImage"^\x82\xd3\xe4\x93\x02X"E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\x12\xb9\x01\n\x14\x44\x65leteReferenceImage\x12:.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty"M\x82\xd3\xe4\x93\x02G*E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\x12\xdb\x01\n\x13ListReferenceImages\x12\x39.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest\x1a:.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse"M\x82\xd3\xe4\x93\x02G\x12\x45/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages\x12\xca\x01\n\x11GetReferenceImage\x12\x37.google.cloud.vision.v1p4beta1.GetReferenceImageRequest\x1a-.google.cloud.vision.v1p4beta1.ReferenceImage"M\x82\xd3\xe4\x93\x02G\x12\x45/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\x12\xbc\x01\n\x16\x41\x64\x64ProductToProductSet\x12<.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty"L\x82\xd3\xe4\x93\x02\x46"A/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\x12\xc9\x01\n\x1bRemoveProductFromProductSet\x12\x41.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty"O\x82\xd3\xe4\x93\x02I"D/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\x12\xe4\x01\n\x18ListProductsInProductSet\x12>.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest\x1a?.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse"G\x82\xd3\xe4\x93\x02\x41\x12?/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products\x12\xb5\x01\n\x11ImportProductSets\x12\x37.google.cloud.vision.v1p4beta1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation"H\x82\xd3\xe4\x93\x02\x42"=/v1p4beta1/{parent=projects/*/locations/*}/productSets:import:\x01*B\x8f\x01\n!com.google.cloud.vision.v1p4beta1B\x19ProductSearchServiceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' + '\n@google/cloud/vision_v1p4beta1/proto/product_search_service.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto"\xb2\x02\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x10product_category\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12G\n\x0eproduct_labels\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.Product.KeyValue\x1a&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:^\xea\x41[\n\x1dvision.googleapis.com/Product\x12:projects/{project}/locations/{location}/products/{product}"\xfd\x01\n\nProductSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x33\n\nindex_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\x0bindex_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:h\xea\x41\x65\n vision.googleapis.com/ProductSet\x12\x41projects/{project}/locations/{location}/productSets/{product_set}"\x85\x02\n\x0eReferenceImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\x0e\x62ounding_polys\x18\x03 \x03(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPolyB\x03\xe0\x41\x01:\x88\x01\xea\x41\x84\x01\n$vision.googleapis.com/ReferenceImage\x12\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}"\xa3\x01\n\x14\x43reateProductRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x07product\x18\x02 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.ProductB\x03\xe0\x41\x02\x12\x12\n\nproduct_id\x18\x03 \x01(\t"w\n\x13ListProductsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"i\n\x14ListProductsResponse\x12\x38\n\x08products\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\x11GetProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product"\x85\x01\n\x14UpdateProductRequest\x12<\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p4beta1.ProductB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"K\n\x14\x44\x65leteProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product"\xb1\x01\n\x17\x43reateProductSetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x0bproduct_set\x18\x02 \x01(\x0b\x32).google.cloud.vision.v1p4beta1.ProductSetB\x03\xe0\x41\x02\x12\x16\n\x0eproduct_set_id\x18\x03 \x01(\t"z\n\x16ListProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"s\n\x17ListProductSetsResponse\x12?\n\x0cproduct_sets\x18\x01 \x03(\x0b\x32).google.cloud.vision.v1p4beta1.ProductSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"N\n\x14GetProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n vision.googleapis.com/ProductSet"\x8f\x01\n\x17UpdateProductSetRequest\x12\x43\n\x0bproduct_set\x18\x01 \x01(\x0b\x32).google.cloud.vision.v1p4beta1.ProductSetB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"Q\n\x17\x44\x65leteProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n vision.googleapis.com/ProductSet"\xbd\x01\n\x1b\x43reateReferenceImageRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12K\n\x0freference_image\x18\x02 \x01(\x0b\x32-.google.cloud.vision.v1p4beta1.ReferenceImageB\x03\xe0\x41\x02\x12\x1a\n\x12reference_image_id\x18\x03 \x01(\t"z\n\x1aListReferenceImagesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x92\x01\n\x1bListReferenceImagesResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p4beta1.ReferenceImage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t"V\n\x18GetReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage"Y\n\x1b\x44\x65leteReferenceImageRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$vision.googleapis.com/ReferenceImage"\x8f\x01\n\x1d\x41\x64\x64ProductToProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product"\x94\x01\n"RemoveProductFromProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n vision.googleapis.com/ProductSet\x12\x36\n\x07product\x18\x02 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dvision.googleapis.com/Product"\x80\x01\n\x1fListProductsInProductSetRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41"\n vision.googleapis.com/ProductSet\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"u\n ListProductsInProductSetResponse\x12\x38\n\x08products\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"2\n\x1aImportProductSetsGcsSource\x12\x14\n\x0c\x63sv_file_uri\x18\x01 \x01(\t"y\n\x1cImportProductSetsInputConfig\x12O\n\ngcs_source\x18\x01 \x01(\x0b\x32\x39.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSourceH\x00\x42\x08\n\x06source"\xad\x01\n\x18ImportProductSetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x0cinput_config\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfigB\x03\xe0\x41\x02"\x8a\x01\n\x19ImportProductSetsResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p4beta1.ReferenceImage\x12$\n\x08statuses\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status"\x9e\x02\n\x16\x42\x61tchOperationMetadata\x12J\n\x05state\x18\x01 \x01(\x0e\x32;.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State\x12/\n\x0bsubmit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"Y\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nPROCESSING\x10\x01\x12\x0e\n\nSUCCESSFUL\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04"/\n\x15ProductSetPurgeConfig\x12\x16\n\x0eproduct_set_id\x18\x01 \x01(\t"\xe6\x01\n\x14PurgeProductsRequest\x12X\n\x18product_set_purge_config\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1p4beta1.ProductSetPurgeConfigH\x00\x12 \n\x16\x64\x65lete_orphan_products\x18\x03 \x01(\x08H\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05\x66orce\x18\x04 \x01(\x08\x42\x08\n\x06target2\xd2 \n\rProductSearch\x12\xe6\x01\n\x10\x43reateProductSet\x12\x36.google.cloud.vision.v1p4beta1.CreateProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet"o\x82\xd3\xe4\x93\x02\x45"6/v1p4beta1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\xda\x41!parent,product_set,product_set_id\x12\xc9\x01\n\x0fListProductSets\x12\x35.google.cloud.vision.v1p4beta1.ListProductSetsRequest\x1a\x36.google.cloud.vision.v1p4beta1.ListProductSetsResponse"G\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p4beta1/{parent=projects/*/locations/*}/productSets\xda\x41\x06parent\x12\xb6\x01\n\rGetProductSet\x12\x33.google.cloud.vision.v1p4beta1.GetProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet"E\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p4beta1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xe8\x01\n\x10UpdateProductSet\x12\x36.google.cloud.vision.v1p4beta1.UpdateProductSetRequest\x1a).google.cloud.vision.v1p4beta1.ProductSet"q\x82\xd3\xe4\x93\x02Q2B/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\xda\x41\x17product_set,update_mask\x12\xa9\x01\n\x10\x44\x65leteProductSet\x12\x36.google.cloud.vision.v1p4beta1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty"E\x82\xd3\xe4\x93\x02\x38*6/v1p4beta1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xce\x01\n\rCreateProduct\x12\x33.google.cloud.vision.v1p4beta1.CreateProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product"`\x82\xd3\xe4\x93\x02>"3/v1p4beta1/{parent=projects/*/locations/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xbd\x01\n\x0cListProducts\x12\x32.google.cloud.vision.v1p4beta1.ListProductsRequest\x1a\x33.google.cloud.vision.v1p4beta1.ListProductsResponse"D\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p4beta1/{parent=projects/*/locations/*}/products\xda\x41\x06parent\x12\xaa\x01\n\nGetProduct\x12\x30.google.cloud.vision.v1p4beta1.GetProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product"B\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p4beta1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xd0\x01\n\rUpdateProduct\x12\x33.google.cloud.vision.v1p4beta1.UpdateProductRequest\x1a&.google.cloud.vision.v1p4beta1.Product"b\x82\xd3\xe4\x93\x02\x46\x32;/v1p4beta1/{product.name=projects/*/locations/*/products/*}:\x07product\xda\x41\x13product,update_mask\x12\xa0\x01\n\rDeleteProduct\x12\x33.google.cloud.vision.v1p4beta1.DeleteProductRequest\x1a\x16.google.protobuf.Empty"B\x82\xd3\xe4\x93\x02\x35*3/v1p4beta1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\x8e\x02\n\x14\x43reateReferenceImage\x12:.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest\x1a-.google.cloud.vision.v1p4beta1.ReferenceImage"\x8a\x01\x82\xd3\xe4\x93\x02X"E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\xda\x41)parent,reference_image,reference_image_id\x12\xc0\x01\n\x14\x44\x65leteReferenceImage\x12:.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty"T\x82\xd3\xe4\x93\x02G*E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xe4\x01\n\x13ListReferenceImages\x12\x39.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest\x1a:.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse"V\x82\xd3\xe4\x93\x02G\x12\x45/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages\xda\x41\x06parent\x12\xd1\x01\n\x11GetReferenceImage\x12\x37.google.cloud.vision.v1p4beta1.GetReferenceImageRequest\x1a-.google.cloud.vision.v1p4beta1.ReferenceImage"T\x82\xd3\xe4\x93\x02G\x12\x45/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xcb\x01\n\x16\x41\x64\x64ProductToProductSet\x12<.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty"[\x82\xd3\xe4\x93\x02\x46"A/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\xda\x41\x0cname,product\x12\xd8\x01\n\x1bRemoveProductFromProductSet\x12\x41.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty"^\x82\xd3\xe4\x93\x02I"D/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\xda\x41\x0cname,product\x12\xeb\x01\n\x18ListProductsInProductSet\x12>.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest\x1a?.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse"N\x82\xd3\xe4\x93\x02\x41\x12?/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products\xda\x41\x04name\x12\x82\x02\n\x11ImportProductSets\x12\x37.google.cloud.vision.v1p4beta1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation"\x94\x01\x82\xd3\xe4\x93\x02\x42"=/v1p4beta1/{parent=projects/*/locations/*}/productSets:import:\x01*\xda\x41\x13parent,input_config\xca\x41\x33\n\x19ImportProductSetsResponse\x12\x16\x42\x61tchOperationMetadata\x12\xe4\x01\n\rPurgeProducts\x12\x33.google.cloud.vision.v1p4beta1.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation"\x7f\x82\xd3\xe4\x93\x02>"9/v1p4beta1/{parent=projects/*/locations/*}/products:purge:\x01*\xda\x41\x06parent\xca\x41/\n\x15google.protobuf.Empty\x12\x16\x42\x61tchOperationMetadata\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionB\x8f\x01\n!com.google.cloud.vision.v1p4beta1B\x19ProductSearchServiceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, + google_dot_api_dot_client__pb2.DESCRIPTOR, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, @@ -78,8 +84,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3307, - serialized_end=3396, + serialized_start=4545, + serialized_end=4634, ) _sym_db.RegisterEnumDescriptor(_BATCHOPERATIONMETADATA_STATE) @@ -136,8 +142,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=507, - serialized_end=545, + serialized_start=597, + serialized_end=635, ) _PRODUCT = _descriptor.Descriptor( @@ -216,7 +222,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\005"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -241,13 +247,15 @@ extensions=[], nested_types=[_PRODUCT_KEYVALUE], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A[\n\035vision.googleapis.com/Product\022:projects/{project}/locations/{location}/products/{product}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=340, - serialized_end=545, + serialized_start=425, + serialized_end=731, ) @@ -309,7 +317,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\003"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -327,20 +335,22 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\003"), file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352Ae\n vision.googleapis.com/ProductSet\022Aprojects/{project}/locations/{location}/productSets/{product_set}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=548, - serialized_end=685, + serialized_start=734, + serialized_end=987, ) @@ -384,7 +394,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -402,20 +412,22 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A\204\001\n$vision.googleapis.com/ReferenceImage\022\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=687, - serialized_end=799, + serialized_start=990, + serialized_end=1251, ) @@ -441,7 +453,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -459,7 +473,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -489,8 +503,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=801, - serialized_end=916, + serialized_start=1254, + serialized_end=1417, ) @@ -516,7 +530,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -564,8 +580,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=918, - serialized_end=994, + serialized_start=1419, + serialized_end=1538, ) @@ -621,8 +637,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=996, - serialized_end=1101, + serialized_start=1540, + serialized_end=1645, ) @@ -648,7 +664,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ) ], @@ -660,8 +678,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1103, - serialized_end=1136, + serialized_start=1647, + serialized_end=1719, ) @@ -687,7 +705,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -717,8 +735,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1139, - serialized_end=1267, + serialized_start=1722, + serialized_end=1855, ) @@ -744,7 +762,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ) ], @@ -756,8 +776,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1269, - serialized_end=1305, + serialized_start=1857, + serialized_end=1932, ) @@ -783,7 +803,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -801,7 +823,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -831,8 +853,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1308, - serialized_end=1437, + serialized_start=1935, + serialized_end=2112, ) @@ -858,7 +880,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -906,8 +930,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1439, - serialized_end=1518, + serialized_start=2114, + serialized_end=2236, ) @@ -963,8 +987,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1520, - serialized_end=1635, + serialized_start=2238, + serialized_end=2353, ) @@ -990,7 +1014,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ) ], @@ -1002,8 +1026,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1637, - serialized_end=1673, + serialized_start=2355, + serialized_end=2433, ) @@ -1029,7 +1053,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1059,8 +1083,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1676, - serialized_end=1814, + serialized_start=2436, + serialized_end=2579, ) @@ -1086,7 +1110,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ) ], @@ -1098,8 +1122,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1816, - serialized_end=1855, + serialized_start=2581, + serialized_end=2662, ) @@ -1125,7 +1149,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1143,7 +1169,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1173,8 +1199,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1858, - serialized_end=2003, + serialized_start=2665, + serialized_end=2854, ) @@ -1200,7 +1226,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1248,8 +1276,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2005, - serialized_end=2088, + serialized_start=2856, + serialized_end=2978, ) @@ -1323,8 +1351,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2091, - serialized_end=2237, + serialized_start=2981, + serialized_end=3127, ) @@ -1350,7 +1378,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A&\n$vision.googleapis.com/ReferenceImage" + ), file=DESCRIPTOR, ) ], @@ -1362,8 +1392,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2239, - serialized_end=2279, + serialized_start=3129, + serialized_end=3215, ) @@ -1389,7 +1419,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A&\n$vision.googleapis.com/ReferenceImage" + ), file=DESCRIPTOR, ) ], @@ -1401,8 +1433,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2281, - serialized_end=2324, + serialized_start=3217, + serialized_end=3306, ) @@ -1428,7 +1460,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1446,7 +1478,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ), ], @@ -1458,8 +1492,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2326, - serialized_end=2388, + serialized_start=3309, + serialized_end=3452, ) @@ -1485,7 +1519,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1503,7 +1537,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ), ], @@ -1515,8 +1551,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2390, - serialized_end=2457, + serialized_start=3455, + serialized_end=3603, ) @@ -1542,7 +1578,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1590,8 +1626,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2459, - serialized_end=2545, + serialized_start=3606, + serialized_end=3734, ) @@ -1647,8 +1683,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2547, - serialized_end=2664, + serialized_start=3736, + serialized_end=3853, ) @@ -1686,8 +1722,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2666, - serialized_end=2716, + serialized_start=3855, + serialized_end=3905, ) @@ -1733,8 +1769,8 @@ fields=[], ) ], - serialized_start=2718, - serialized_end=2839, + serialized_start=3907, + serialized_end=4028, ) @@ -1760,7 +1796,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1778,7 +1816,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1790,8 +1828,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2841, - serialized_end=2966, + serialized_start=4031, + serialized_end=4204, ) @@ -1847,8 +1885,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2969, - serialized_end=3107, + serialized_start=4207, + serialized_end=4345, ) @@ -1922,8 +1960,150 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3110, - serialized_end=3396, + serialized_start=4348, + serialized_end=4634, +) + + +_PRODUCTSETPURGECONFIG = _descriptor.Descriptor( + name="ProductSetPurgeConfig", + full_name="google.cloud.vision.v1p4beta1.ProductSetPurgeConfig", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="product_set_id", + full_name="google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.product_set_id", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ) + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=4636, + serialized_end=4683, +) + + +_PURGEPRODUCTSREQUEST = _descriptor.Descriptor( + name="PurgeProductsRequest", + full_name="google.cloud.vision.v1p4beta1.PurgeProductsRequest", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="product_set_purge_config", + full_name="google.cloud.vision.v1p4beta1.PurgeProductsRequest.product_set_purge_config", + index=0, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="delete_orphan_products", + full_name="google.cloud.vision.v1p4beta1.PurgeProductsRequest.delete_orphan_products", + index=1, + number=3, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="parent", + full_name="google.cloud.vision.v1p4beta1.PurgeProductsRequest.parent", + index=2, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="force", + full_name="google.cloud.vision.v1p4beta1.PurgeProductsRequest.force", + index=3, + number=4, + type=8, + cpp_type=7, + label=1, + has_default_value=False, + default_value=False, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name="target", + full_name="google.cloud.vision.v1p4beta1.PurgeProductsRequest.target", + index=0, + containing_type=None, + fields=[], + ) + ], + serialized_start=4686, + serialized_end=4916, ) _PRODUCT_KEYVALUE.containing_type = _PRODUCT @@ -1986,6 +2166,21 @@ "end_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _BATCHOPERATIONMETADATA_STATE.containing_type = _BATCHOPERATIONMETADATA +_PURGEPRODUCTSREQUEST.fields_by_name[ + "product_set_purge_config" +].message_type = _PRODUCTSETPURGECONFIG +_PURGEPRODUCTSREQUEST.oneofs_by_name["target"].fields.append( + _PURGEPRODUCTSREQUEST.fields_by_name["product_set_purge_config"] +) +_PURGEPRODUCTSREQUEST.fields_by_name[ + "product_set_purge_config" +].containing_oneof = _PURGEPRODUCTSREQUEST.oneofs_by_name["target"] +_PURGEPRODUCTSREQUEST.oneofs_by_name["target"].fields.append( + _PURGEPRODUCTSREQUEST.fields_by_name["delete_orphan_products"] +) +_PURGEPRODUCTSREQUEST.fields_by_name[ + "delete_orphan_products" +].containing_oneof = _PURGEPRODUCTSREQUEST.oneofs_by_name["target"] DESCRIPTOR.message_types_by_name["Product"] = _PRODUCT DESCRIPTOR.message_types_by_name["ProductSet"] = _PRODUCTSET DESCRIPTOR.message_types_by_name["ReferenceImage"] = _REFERENCEIMAGE @@ -2037,6 +2232,8 @@ "ImportProductSetsResponse" ] = _IMPORTPRODUCTSETSRESPONSE DESCRIPTOR.message_types_by_name["BatchOperationMetadata"] = _BATCHOPERATIONMETADATA +DESCRIPTOR.message_types_by_name["ProductSetPurgeConfig"] = _PRODUCTSETPURGECONFIG +DESCRIPTOR.message_types_by_name["PurgeProductsRequest"] = _PURGEPRODUCTSREQUEST _sym_db.RegisterFileDescriptor(DESCRIPTOR) Product = _reflection.GeneratedProtocolMessageType( @@ -2080,12 +2277,11 @@ User-provided metadata to be stored with this product. Must be at most 4096 characters long. product_category: - The category for the product identified by the reference - image. This should be either "homegoods-v2", "apparel-v2", - "toys-v2", "packagedgoods-v1", or "general-v1" The legacy - categories "homegoods", "apparel", and "toys" are still - supported, but these should not be used for new products. - This field is immutable. + Immutable. The category for the product identified by the + reference image. This should be either "homegoods-v2", + "apparel-v2", or "toys-v2". The legacy categories "homegoods", + "apparel", and "toys" are still supported, but these should + not be used for new products. product_labels: Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the @@ -2093,7 +2289,10 @@ strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product - may have up to 100 product\_labels. + may have up to 500 product\_labels. Notice that the total + number of distinct product\_labels over all products in one + ProductSet cannot exceed 1M, otherwise the product search + pipeline will refuse to work for that ProductSet. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Product) ), @@ -2153,12 +2352,12 @@ mages/IMAGE_ID``. This field is ignored when creating a reference image. uri: - The Google Cloud Storage URI of the reference image. The URI - must start with ``gs://``. Required. + Required. The Google Cloud Storage URI of the reference image. + The URI must start with ``gs://``. bounding_polys: - Bounding polygons around the areas of interest in the - reference image. Optional. If this field is empty, the system - will try to detect regions of interest. At most 10 bounding + Optional. Bounding polygons around the areas of interest in + the reference image. If this field is empty, the system will + try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The @@ -2180,10 +2379,10 @@ Attributes: parent: - The project in which the Product should be created. Format is - ``projects/PROJECT_ID/locations/LOC_ID``. + Required. The project in which the Product should be created. + Format is ``projects/PROJECT_ID/locations/LOC_ID``. product: - The product to create. + Required. The product to create. product_id: A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If @@ -2207,8 +2406,8 @@ Attributes: parent: - The project OR ProductSet from which Products should be - listed. Format: ``projects/PROJECT_ID/locations/LOC_ID`` + Required. The project OR ProductSet from which Products should + be listed. Format: ``projects/PROJECT_ID/locations/LOC_ID`` page_size: The maximum number of items to return. Default 10, maximum 100. @@ -2253,7 +2452,7 @@ Attributes: name: - Resource name of the Product to get. Format is: + Required. Resource name of the Product to get. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetProductRequest) @@ -2272,8 +2471,8 @@ Attributes: product: - The Product resource which replaces the one on the server. - product.name is immutable. + Required. The Product resource which replaces the one on the + server. product.name is immutable. update_mask: The [FieldMask][google.protobuf.FieldMask] that specifies which fields to update. If update\_mask isn't specified, all @@ -2296,7 +2495,7 @@ Attributes: name: - Resource name of product to delete. Format is: + Required. Resource name of product to delete. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteProductRequest) @@ -2315,10 +2514,10 @@ Attributes: parent: - The project in which the ProductSet should be created. Format - is ``projects/PROJECT_ID/locations/LOC_ID``. + Required. The project in which the ProductSet should be + created. Format is ``projects/PROJECT_ID/locations/LOC_ID``. product_set: - The ProductSet to create. + Required. The ProductSet to create. product_set_id: A user-supplied resource id for this ProductSet. If set, the server will attempt to use this value as the resource id. If @@ -2342,8 +2541,8 @@ Attributes: parent: - The project from which ProductSets should be listed. Format - is ``projects/PROJECT_ID/locations/LOC_ID``. + Required. The project from which ProductSets should be listed. + Format is ``projects/PROJECT_ID/locations/LOC_ID``. page_size: The maximum number of items to return. Default 10, maximum 100. @@ -2388,8 +2587,9 @@ Attributes: name: - Resource name of the ProductSet to get. Format is: ``projects - /PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`` + Required. Resource name of the ProductSet to get. Format is: + ``projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET + _ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetProductSetRequest) ), @@ -2407,7 +2607,8 @@ Attributes: product_set: - The ProductSet resource which replaces the one on the server. + Required. The ProductSet resource which replaces the one on + the server. update_mask: The [FieldMask][google.protobuf.FieldMask] that specifies which fields to update. If update\_mask isn't specified, all @@ -2430,8 +2631,9 @@ Attributes: name: - Resource name of the ProductSet to delete. Format is: ``proje - cts/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` + Required. Resource name of the ProductSet to delete. Format + is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT + _SET_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) ), @@ -2449,12 +2651,12 @@ Attributes: parent: - Resource name of the product in which to create the reference - image. Format is + Required. Resource name of the product in which to create the + reference image. Format is ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID``. reference_image: - The reference image to create. If an image ID is specified, it - is ignored. + Required. The reference image to create. If an image ID is + specified, it is ignored. reference_image_id: A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as @@ -2478,8 +2680,8 @@ Attributes: parent: - Resource name of the product containing the reference images. - Format is + Required. Resource name of the product containing the + reference images. Format is ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID``. page_size: The maximum number of items to return. Default 10, maximum @@ -2530,9 +2732,9 @@ Attributes: name: - The resource name of the ReferenceImage to get. Format is: ` - `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/refe - renceImages/IMAGE_ID``. + Required. The resource name of the ReferenceImage to get. + Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PR + ODUCT_ID/referenceImages/IMAGE_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) ), @@ -2550,9 +2752,9 @@ Attributes: name: - The resource name of the reference image to delete. Format - is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_I - D/referenceImages/IMAGE_ID`` + Required. The resource name of the reference image to delete. + Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PR + ODUCT_ID/referenceImages/IMAGE_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) ), @@ -2570,12 +2772,12 @@ Attributes: name: - The resource name for the ProductSet to modify. Format is: `` - projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_I - D`` + Required. The resource name for the ProductSet to modify. + Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/ + PRODUCT_SET_ID`` product: - The resource name for the Product to be added to this - ProductSet. Format is: + Required. The resource name for the Product to be added to + this ProductSet. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) @@ -2594,12 +2796,12 @@ Attributes: name: - The resource name for the ProductSet to modify. Format is: `` - projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_I - D`` + Required. The resource name for the ProductSet to modify. + Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/ + PRODUCT_SET_ID`` product: - The resource name for the Product to be removed from this - ProductSet. Format is: + Required. The resource name for the Product to be removed from + this ProductSet. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) @@ -2618,9 +2820,9 @@ Attributes: name: - The ProductSet resource for which to retrieve Products. - Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/ - PRODUCT_SET_ID`` + Required. The ProductSet resource for which to retrieve + Products. Format is: ``projects/PROJECT_ID/locations/LOC_ID/p + roductSets/PRODUCT_SET_ID`` page_size: The maximum number of items to return. Default 10, maximum 100. @@ -2750,10 +2952,10 @@ Attributes: parent: - The project in which the ProductSets should be imported. - Format is ``projects/PROJECT_ID/locations/LOC_ID``. + Required. The project in which the ProductSets should be + imported. Format is ``projects/PROJECT_ID/locations/LOC_ID``. input_config: - The input content for the list of requests. + Required. The input content for the list of requests. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) ), @@ -2818,17 +3020,102 @@ ) _sym_db.RegisterMessage(BatchOperationMetadata) +ProductSetPurgeConfig = _reflection.GeneratedProtocolMessageType( + "ProductSetPurgeConfig", + (_message.Message,), + dict( + DESCRIPTOR=_PRODUCTSETPURGECONFIG, + __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + __doc__="""Config to control which ProductSet contains the Products to be deleted. + + + Attributes: + product_set_id: + The ProductSet that contains the Products to delete. If a + Product is a member of product\_set\_id in addition to other + ProductSets, the Product will still be deleted. + """, + # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSetPurgeConfig) + ), +) +_sym_db.RegisterMessage(ProductSetPurgeConfig) + +PurgeProductsRequest = _reflection.GeneratedProtocolMessageType( + "PurgeProductsRequest", + (_message.Message,), + dict( + DESCRIPTOR=_PURGEPRODUCTSREQUEST, + __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + __doc__="""Request message for the ``PurgeProducts`` method. + + + Attributes: + target: + The Products to delete. + product_set_purge_config: + Specify which ProductSet contains the Products to be deleted. + delete_orphan_products: + If delete\_orphan\_products is true, all Products that are not + in any ProductSet will be deleted. + parent: + Required. The project and location in which the Products + should be deleted. Format is + ``projects/PROJECT_ID/locations/LOC_ID``. + force: + The default value is false. Override this value to true to + actually perform the purge. + """, + # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.PurgeProductsRequest) + ), +) +_sym_db.RegisterMessage(PurgeProductsRequest) + DESCRIPTOR._options = None +_PRODUCT.fields_by_name["product_category"]._options = None +_PRODUCT._options = None +_PRODUCTSET.fields_by_name["index_time"]._options = None +_PRODUCTSET.fields_by_name["index_error"]._options = None +_PRODUCTSET._options = None +_REFERENCEIMAGE.fields_by_name["uri"]._options = None +_REFERENCEIMAGE.fields_by_name["bounding_polys"]._options = None +_REFERENCEIMAGE._options = None +_CREATEPRODUCTREQUEST.fields_by_name["parent"]._options = None +_CREATEPRODUCTREQUEST.fields_by_name["product"]._options = None +_LISTPRODUCTSREQUEST.fields_by_name["parent"]._options = None +_GETPRODUCTREQUEST.fields_by_name["name"]._options = None +_UPDATEPRODUCTREQUEST.fields_by_name["product"]._options = None +_DELETEPRODUCTREQUEST.fields_by_name["name"]._options = None +_CREATEPRODUCTSETREQUEST.fields_by_name["parent"]._options = None +_CREATEPRODUCTSETREQUEST.fields_by_name["product_set"]._options = None +_LISTPRODUCTSETSREQUEST.fields_by_name["parent"]._options = None +_GETPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_UPDATEPRODUCTSETREQUEST.fields_by_name["product_set"]._options = None +_DELETEPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_CREATEREFERENCEIMAGEREQUEST.fields_by_name["parent"]._options = None +_CREATEREFERENCEIMAGEREQUEST.fields_by_name["reference_image"]._options = None +_LISTREFERENCEIMAGESREQUEST.fields_by_name["parent"]._options = None +_GETREFERENCEIMAGEREQUEST.fields_by_name["name"]._options = None +_DELETEREFERENCEIMAGEREQUEST.fields_by_name["name"]._options = None +_ADDPRODUCTTOPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_ADDPRODUCTTOPRODUCTSETREQUEST.fields_by_name["product"]._options = None +_REMOVEPRODUCTFROMPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_REMOVEPRODUCTFROMPRODUCTSETREQUEST.fields_by_name["product"]._options = None +_LISTPRODUCTSINPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_IMPORTPRODUCTSETSREQUEST.fields_by_name["parent"]._options = None +_IMPORTPRODUCTSETSREQUEST.fields_by_name["input_config"]._options = None +_PURGEPRODUCTSREQUEST.fields_by_name["parent"]._options = None _PRODUCTSEARCH = _descriptor.ServiceDescriptor( name="ProductSearch", full_name="google.cloud.vision.v1p4beta1.ProductSearch", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=3399, - serialized_end=6886, + serialized_options=_b( + "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" + ), + serialized_start=4919, + serialized_end=9097, methods=[ _descriptor.MethodDescriptor( name="CreateProductSet", @@ -2838,7 +3125,7 @@ input_type=_CREATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, serialized_options=_b( - '\202\323\344\223\002E"6/v1p4beta1/{parent=projects/*/locations/*}/productSets:\013product_set' + '\202\323\344\223\002E"6/v1p4beta1/{parent=projects/*/locations/*}/productSets:\013product_set\332A!parent,product_set,product_set_id' ), ), _descriptor.MethodDescriptor( @@ -2849,7 +3136,7 @@ input_type=_LISTPRODUCTSETSREQUEST, output_type=_LISTPRODUCTSETSRESPONSE, serialized_options=_b( - "\202\323\344\223\0028\0226/v1p4beta1/{parent=projects/*/locations/*}/productSets" + "\202\323\344\223\0028\0226/v1p4beta1/{parent=projects/*/locations/*}/productSets\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -2860,7 +3147,7 @@ input_type=_GETPRODUCTSETREQUEST, output_type=_PRODUCTSET, serialized_options=_b( - "\202\323\344\223\0028\0226/v1p4beta1/{name=projects/*/locations/*/productSets/*}" + "\202\323\344\223\0028\0226/v1p4beta1/{name=projects/*/locations/*/productSets/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2871,7 +3158,7 @@ input_type=_UPDATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, serialized_options=_b( - "\202\323\344\223\002Q2B/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set" + "\202\323\344\223\002Q2B/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set\332A\027product_set,update_mask" ), ), _descriptor.MethodDescriptor( @@ -2882,7 +3169,7 @@ input_type=_DELETEPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\0028*6/v1p4beta1/{name=projects/*/locations/*/productSets/*}" + "\202\323\344\223\0028*6/v1p4beta1/{name=projects/*/locations/*/productSets/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2893,7 +3180,7 @@ input_type=_CREATEPRODUCTREQUEST, output_type=_PRODUCT, serialized_options=_b( - '\202\323\344\223\002>"3/v1p4beta1/{parent=projects/*/locations/*}/products:\007product' + '\202\323\344\223\002>"3/v1p4beta1/{parent=projects/*/locations/*}/products:\007product\332A\031parent,product,product_id' ), ), _descriptor.MethodDescriptor( @@ -2904,7 +3191,7 @@ input_type=_LISTPRODUCTSREQUEST, output_type=_LISTPRODUCTSRESPONSE, serialized_options=_b( - "\202\323\344\223\0025\0223/v1p4beta1/{parent=projects/*/locations/*}/products" + "\202\323\344\223\0025\0223/v1p4beta1/{parent=projects/*/locations/*}/products\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -2915,7 +3202,7 @@ input_type=_GETPRODUCTREQUEST, output_type=_PRODUCT, serialized_options=_b( - "\202\323\344\223\0025\0223/v1p4beta1/{name=projects/*/locations/*/products/*}" + "\202\323\344\223\0025\0223/v1p4beta1/{name=projects/*/locations/*/products/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2926,7 +3213,7 @@ input_type=_UPDATEPRODUCTREQUEST, output_type=_PRODUCT, serialized_options=_b( - "\202\323\344\223\002F2;/v1p4beta1/{product.name=projects/*/locations/*/products/*}:\007product" + "\202\323\344\223\002F2;/v1p4beta1/{product.name=projects/*/locations/*/products/*}:\007product\332A\023product,update_mask" ), ), _descriptor.MethodDescriptor( @@ -2937,7 +3224,7 @@ input_type=_DELETEPRODUCTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\0025*3/v1p4beta1/{name=projects/*/locations/*/products/*}" + "\202\323\344\223\0025*3/v1p4beta1/{name=projects/*/locations/*/products/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2948,7 +3235,7 @@ input_type=_CREATEREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, serialized_options=_b( - '\202\323\344\223\002X"E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image' + '\202\323\344\223\002X"E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image\332A)parent,reference_image,reference_image_id' ), ), _descriptor.MethodDescriptor( @@ -2959,7 +3246,7 @@ input_type=_DELETEREFERENCEIMAGEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - "\202\323\344\223\002G*E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + "\202\323\344\223\002G*E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2970,7 +3257,7 @@ input_type=_LISTREFERENCEIMAGESREQUEST, output_type=_LISTREFERENCEIMAGESRESPONSE, serialized_options=_b( - "\202\323\344\223\002G\022E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + "\202\323\344\223\002G\022E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -2981,7 +3268,7 @@ input_type=_GETREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, serialized_options=_b( - "\202\323\344\223\002G\022E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + "\202\323\344\223\002G\022E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2992,7 +3279,7 @@ input_type=_ADDPRODUCTTOPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - '\202\323\344\223\002F"A/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\001*' + '\202\323\344\223\002F"A/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\001*\332A\014name,product' ), ), _descriptor.MethodDescriptor( @@ -3003,7 +3290,7 @@ input_type=_REMOVEPRODUCTFROMPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=_b( - '\202\323\344\223\002I"D/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\001*' + '\202\323\344\223\002I"D/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\001*\332A\014name,product' ), ), _descriptor.MethodDescriptor( @@ -3014,7 +3301,7 @@ input_type=_LISTPRODUCTSINPRODUCTSETREQUEST, output_type=_LISTPRODUCTSINPRODUCTSETRESPONSE, serialized_options=_b( - "\202\323\344\223\002A\022?/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products" + "\202\323\344\223\002A\022?/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -3025,7 +3312,18 @@ input_type=_IMPORTPRODUCTSETSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002B"=/v1p4beta1/{parent=projects/*/locations/*}/productSets:import:\001*' + '\202\323\344\223\002B"=/v1p4beta1/{parent=projects/*/locations/*}/productSets:import:\001*\332A\023parent,input_config\312A3\n\031ImportProductSetsResponse\022\026BatchOperationMetadata' + ), + ), + _descriptor.MethodDescriptor( + name="PurgeProducts", + full_name="google.cloud.vision.v1p4beta1.ProductSearch.PurgeProducts", + index=18, + containing_service=None, + input_type=_PURGEPRODUCTSREQUEST, + output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, + serialized_options=_b( + '\202\323\344\223\002>"9/v1p4beta1/{parent=projects/*/locations/*}/products:purge:\001*\332A\006parent\312A/\n\025google.protobuf.Empty\022\026BatchOperationMetadata' ), ), ], diff --git a/vision/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2_grpc.py b/vision/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2_grpc.py index de2ba5996cb5..0d1f9704cb5a 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2_grpc.py +++ b/vision/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2_grpc.py @@ -127,6 +127,11 @@ def __init__(self, channel): request_serializer=google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ImportProductSetsRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) + self.PurgeProducts = channel.unary_unary( + "/google.cloud.vision.v1p4beta1.ProductSearch/PurgeProducts", + request_serializer=google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.PurgeProductsRequest.SerializeToString, + response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, + ) class ProductSearchServicer(object): @@ -204,10 +209,6 @@ def DeleteProductSet(self, request, context): 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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -276,10 +277,6 @@ def DeleteProduct(self, request, context): 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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -318,10 +315,6 @@ def DeleteReferenceImage(self, request, context): 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. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -367,10 +360,6 @@ def AddProductToProductSet(self, request, context): def RemoveProductFromProductSet(self, request, context): """Removes a Product from the specified ProductSet. - - Possible errors: - - * Returns NOT_FOUND If the Product is not found under the ProductSet. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") @@ -406,6 +395,36 @@ def ImportProductSets(self, request, context): context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") + def PurgeProducts(self, request, context): + """Asynchronous API to delete all Products in a ProductSet or all Products + that are in no ProductSet. + + If a Product is a member of the specified ProductSet in addition to other + ProductSets, the Product will still be deleted. + + It is recommended to not delete the specified ProductSet until after this + operation has completed. It is also recommended to not add any of the + Products involved in the batch delete to a new ProductSet while this + operation is running because those Products may still end up deleted. + + It's not possible to undo the PurgeProducts operation. Therefore, it is + recommended to keep the csv files used in ImportProductSets (if that was + how you originally built the Product Set) before starting PurgeProducts, in + case you need to re-import the data after deletion. + + If the plan is to purge all of the Products from a ProductSet and then + re-use the empty ProductSet to re-import new Products into the empty + ProductSet, you must wait until the PurgeProducts operation has finished + for that ProductSet. + + 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) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") + def add_ProductSearchServicer_to_server(servicer, server): rpc_method_handlers = { @@ -499,6 +518,11 @@ def add_ProductSearchServicer_to_server(servicer, server): request_deserializer=google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ImportProductSetsRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), + "PurgeProducts": grpc.unary_unary_rpc_method_handler( + servicer.PurgeProducts, + request_deserializer=google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.PurgeProductsRequest.FromString, + response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( "google.cloud.vision.v1p4beta1.ProductSearch", rpc_method_handlers diff --git a/vision/google/cloud/vision_v1p4beta1/proto/text_annotation.proto b/vision/google/cloud/vision_v1p4beta1/proto/text_annotation.proto index 542677f271e3..fbc35bb5458f 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/text_annotation.proto +++ b/vision/google/cloud/vision_v1p4beta1/proto/text_annotation.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -194,7 +194,7 @@ message Paragraph { // and the vertex order will still be (0, 1, 2, 3). BoundingPoly bounding_box = 2; - // List of words in this paragraph. + // List of all words in this paragraph. repeated Word words = 3; // Confidence of the OCR results for the paragraph. Range [0, 1]. @@ -250,7 +250,7 @@ message Symbol { // 2----3 // | | // 1----0 - // and the vertice order will still be (0, 1, 2, 3). + // and the vertex order will still be (0, 1, 2, 3). BoundingPoly bounding_box = 2; // The actual UTF-8 representation of the symbol. diff --git a/vision/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py b/vision/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py index 5eef841be026..435e1cfa0073 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py +++ b/vision/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py @@ -1058,7 +1058,7 @@ corner it becomes: 2----3 \| \| 1----0 and the vertex order will still be (0, 1, 2, 3). words: - List of words in this paragraph. + List of all words in this paragraph. confidence: Confidence of the OCR results for the paragraph. Range [0, 1]. """, @@ -1120,7 +1120,7 @@ text is read in the 'natural' orientation. For example: \* when the text is horizontal it might look like: 0----1 \| \| 3 ----2 \* when it's rotated 180 degrees around the top-left - corner it becomes: 2----3 \| \| 1----0 and the vertice order + corner it becomes: 2----3 \| \| 1----0 and the vertex order will still be (0, 1, 2, 3). text: The actual UTF-8 representation of the symbol. diff --git a/vision/google/cloud/vision_v1p4beta1/proto/web_detection.proto b/vision/google/cloud/vision_v1p4beta1/proto/web_detection.proto index 15822563b847..446a937f1c8e 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/web_detection.proto +++ b/vision/google/cloud/vision_v1p4beta1/proto/web_detection.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -50,17 +50,6 @@ message WebDetection { float score = 2; } - // Label to provide extra metadata for the web detection. - message WebLabel { - // Label for extra metadata. - string label = 1; - - // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". - // For more information, see - // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - string language_code = 2; - } - // Metadata for web pages. message WebPage { // The result web page URL. @@ -83,6 +72,17 @@ message WebDetection { repeated WebImage partial_matching_images = 5; } + // Label to provide extra metadata for the web detection. + message WebLabel { + // Label for extra metadata. + string label = 1; + + // The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". + // For more information, see + // http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 2; + } + // Deduced entities from similar images on the Internet. repeated WebEntity web_entities = 1; diff --git a/vision/google/cloud/vision_v1p4beta1/proto/web_detection_pb2.py b/vision/google/cloud/vision_v1p4beta1/proto/web_detection_pb2.py index 5a318c648b4d..b87762541a5a 100644 --- a/vision/google/cloud/vision_v1p4beta1/proto/web_detection_pb2.py +++ b/vision/google/cloud/vision_v1p4beta1/proto/web_detection_pb2.py @@ -26,7 +26,7 @@ "\n!com.google.cloud.vision.v1p4beta1B\021WebDetectionProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN" ), serialized_pb=_b( - '\n7google/cloud/vision_v1p4beta1/proto/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p4beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebLabel\x1a\x42\n\tWebEntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x1a&\n\x08WebImage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\t\x1a\xe4\x01\n\x07WebPage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x12\n\npage_title\x18\x03 \x01(\t\x12R\n\x14\x66ull_matching_images\x18\x04 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImageB\x87\x01\n!com.google.cloud.vision.v1p4beta1B\x11WebDetectionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' + '\n7google/cloud/vision_v1p4beta1/proto/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p4beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebLabel\x1a\x42\n\tWebEntity\x12\x11\n\tentity_id\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x1a&\n\x08WebImage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x1a\xe4\x01\n\x07WebPage\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x12\x12\n\npage_title\x18\x03 \x01(\t\x12R\n\x14\x66ull_matching_images\x18\x04 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tB\x87\x01\n!com.google.cloud.vision.v1p4beta1B\x11WebDetectionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' ), dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], ) @@ -162,62 +162,6 @@ serialized_end=748, ) -_WEBDETECTION_WEBLABEL = _descriptor.Descriptor( - name="WebLabel", - full_name="google.cloud.vision.v1p4beta1.WebDetection.WebLabel", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="label", - full_name="google.cloud.vision.v1p4beta1.WebDetection.WebLabel.label", - index=0, - number=1, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="language_code", - full_name="google.cloud.vision.v1p4beta1.WebDetection.WebLabel.language_code", - index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=750, - serialized_end=798, -) - _WEBDETECTION_WEBPAGE = _descriptor.Descriptor( name="WebPage", full_name="google.cloud.vision.v1p4beta1.WebDetection.WebPage", @@ -324,7 +268,63 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=801, + serialized_start=751, + serialized_end=979, +) + +_WEBDETECTION_WEBLABEL = _descriptor.Descriptor( + name="WebLabel", + full_name="google.cloud.vision.v1p4beta1.WebDetection.WebLabel", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="label", + full_name="google.cloud.vision.v1p4beta1.WebDetection.WebLabel.label", + index=0, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="language_code", + full_name="google.cloud.vision.v1p4beta1.WebDetection.WebLabel.language_code", + index=1, + number=2, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=981, serialized_end=1029, ) @@ -448,8 +448,8 @@ nested_types=[ _WEBDETECTION_WEBENTITY, _WEBDETECTION_WEBIMAGE, - _WEBDETECTION_WEBLABEL, _WEBDETECTION_WEBPAGE, + _WEBDETECTION_WEBLABEL, ], enum_types=[], serialized_options=None, @@ -463,7 +463,6 @@ _WEBDETECTION_WEBENTITY.containing_type = _WEBDETECTION _WEBDETECTION_WEBIMAGE.containing_type = _WEBDETECTION -_WEBDETECTION_WEBLABEL.containing_type = _WEBDETECTION _WEBDETECTION_WEBPAGE.fields_by_name[ "full_matching_images" ].message_type = _WEBDETECTION_WEBIMAGE @@ -471,6 +470,7 @@ "partial_matching_images" ].message_type = _WEBDETECTION_WEBIMAGE _WEBDETECTION_WEBPAGE.containing_type = _WEBDETECTION +_WEBDETECTION_WEBLABEL.containing_type = _WEBDETECTION _WEBDETECTION.fields_by_name["web_entities"].message_type = _WEBDETECTION_WEBENTITY _WEBDETECTION.fields_by_name[ "full_matching_images" @@ -531,26 +531,6 @@ # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebImage) ), ), - WebLabel=_reflection.GeneratedProtocolMessageType( - "WebLabel", - (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBLABEL, - __module__="google.cloud.vision_v1p4beta1.proto.web_detection_pb2", - __doc__="""Label to provide extra metadata for the web detection. - - - Attributes: - label: - Label for extra metadata. - language_code: - The BCP-47 language code for ``label``, such as "en-US" or - "sr-Latn". For more information, see http://www.unicode.org/re - ports/tr35/#Unicode\_locale\_identifier. - """, - # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) - ), - ), WebPage=_reflection.GeneratedProtocolMessageType( "WebPage", (_message.Message,), @@ -579,6 +559,26 @@ # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebPage) ), ), + WebLabel=_reflection.GeneratedProtocolMessageType( + "WebLabel", + (_message.Message,), + dict( + DESCRIPTOR=_WEBDETECTION_WEBLABEL, + __module__="google.cloud.vision_v1p4beta1.proto.web_detection_pb2", + __doc__="""Label to provide extra metadata for the web detection. + + + Attributes: + label: + Label for extra metadata. + language_code: + The BCP-47 language code for ``label``, such as "en-US" or + "sr-Latn". For more information, see http://www.unicode.org/re + ports/tr35/#Unicode\_locale\_identifier. + """, + # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) + ), + ), DESCRIPTOR=_WEBDETECTION, __module__="google.cloud.vision_v1p4beta1.proto.web_detection_pb2", __doc__="""Relevant information for the image from the Internet. @@ -609,8 +609,8 @@ _sym_db.RegisterMessage(WebDetection) _sym_db.RegisterMessage(WebDetection.WebEntity) _sym_db.RegisterMessage(WebDetection.WebImage) -_sym_db.RegisterMessage(WebDetection.WebLabel) _sym_db.RegisterMessage(WebDetection.WebPage) +_sym_db.RegisterMessage(WebDetection.WebLabel) DESCRIPTOR._options = None diff --git a/vision/google/cloud/vision_v1p4beta1/types.py b/vision/google/cloud/vision_v1p4beta1/types.py index 6949fdf83948..c5d4ef429dd7 100644 --- a/vision/google/cloud/vision_v1p4beta1/types.py +++ b/vision/google/cloud/vision_v1p4beta1/types.py @@ -20,6 +20,7 @@ from google.api_core.protobuf_helpers import get_messages +from google.cloud.vision_v1p4beta1.proto import face_pb2 from google.cloud.vision_v1p4beta1.proto import geometry_pb2 from google.cloud.vision_v1p4beta1.proto import image_annotator_pb2 from google.cloud.vision_v1p4beta1.proto import product_search_pb2 @@ -50,6 +51,7 @@ ] _local_modules = [ + face_pb2, geometry_pb2, image_annotator_pb2, product_search_pb2, diff --git a/vision/synth.metadata b/vision/synth.metadata index 04fdeb1da711..3e9809cfe9f0 100644 --- a/vision/synth.metadata +++ b/vision/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-10-10T12:48:24.197145Z", + "updateTime": "2019-11-06T13:44:16.072107Z", "sources": [ { "generator": { "name": "artman", - "version": "0.38.0", - "dockerImage": "googleapis/artman@sha256:0d2f8d429110aeb8d82df6550ef4ede59d40df9062d260a1580fce688b0512bf" + "version": "0.41.0", + "dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "10f91fa12f70e8e0209a45fc10807ed1f77c7e4e", - "internalRef": "273826591" + "sha": "5691fcb7c1a926b52577aa1834f31d9c50efda54", + "internalRef": "278731899" } }, { "template": { "name": "python_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], diff --git a/vision/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py b/vision/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py index 1846fe24822b..9f854f842b41 100644 --- a/vision/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py +++ b/vision/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py @@ -856,3 +856,36 @@ def test_import_product_sets_exception(self): response = client.import_product_sets(parent, input_config) exception = response.exception() assert exception.errors[0] == error + + def test_purge_products(self): + # Setup Expected Response + name = "name3373707" + done = True + expected_response = {"name": name, "done": done} + expected_response = operations_pb2.Operation(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1p4beta1.ProductSearchClient() + + response = client.purge_products() + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = product_search_service_pb2.PurgeProductsRequest() + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_purge_products_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1p4beta1.ProductSearchClient() + + with pytest.raises(CustomException): + client.purge_products()