diff --git a/CHANGELOG.md b/CHANGELOG.md index ae60e641..3377e01a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-vision/#history +### [1.0.1](https://github.com/googleapis/python-vision/compare/v1.0.0...v1.0.1) (2022-04-01) + + +### Bug Fixes + +* **deps:** require google-api-core >= 1.31.5, >= 2.3.2 on v1 release ([#324](https://github.com/googleapis/python-vision/issues/324)) ([a3d3d66](https://github.com/googleapis/python-vision/commit/a3d3d665b7982598eb816c8fcfb3a66078c93a06)) + ## [1.0.0](https://www.github.com/googleapis/python-vision/compare/v0.42.0...v1.0.0) (2020-02-28) diff --git a/docs/conf.py b/docs/conf.py index 72420fde..973852aa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,9 +65,9 @@ master_doc = "index" # General information about the project. -project = u"google-cloud-vision" -copyright = u"2019, Google" -author = u"Google APIs" +project = "google-cloud-vision" +copyright = "2019, Google" +author = "Google APIs" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -261,7 +261,7 @@ ( master_doc, "google-cloud-vision.tex", - u"google-cloud-vision Documentation", + "google-cloud-vision Documentation", author, "manual", ) @@ -296,7 +296,7 @@ ( master_doc, "google-cloud-vision", - u"google-cloud-vision Documentation", + "google-cloud-vision Documentation", [author], 1, ) @@ -315,7 +315,7 @@ ( master_doc, "google-cloud-vision", - u"google-cloud-vision Documentation", + "google-cloud-vision Documentation", author, "google-cloud-vision", "google-cloud-vision Library", diff --git a/google/cloud/vision_v1/proto/image_annotator_pb2_grpc.py b/google/cloud/vision_v1/proto/image_annotator_pb2_grpc.py index 01068cb9..0b7d5373 100644 --- a/google/cloud/vision_v1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1/proto/image_annotator_pb2_grpc.py @@ -11,16 +11,16 @@ class ImageAnnotatorStub(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.BatchAnnotateImages = channel.unary_unary( "/google.cloud.vision.v1.ImageAnnotator/BatchAnnotateImages", request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, @@ -45,26 +45,25 @@ def __init__(self, channel): class ImageAnnotatorServicer(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def BatchAnnotateImages(self, request, context): - """Run image detection and annotation for a batch of images. - """ + """Run image detection and annotation for a batch of images.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchAnnotateFiles(self, request, context): """Service that performs image detection and annotation for a batch of files. - Now only "application/pdf", "image/tiff" and "image/gif" are supported. + Now only "application/pdf", "image/tiff" and "image/gif" are supported. - This service will extract at most 5 (customers can specify which 5 in - AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - file provided and perform detection and annotation for each image - extracted. - """ + This service will extract at most 5 (customers can specify which 5 in + AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + file provided and perform detection and annotation for each image + extracted. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -72,26 +71,26 @@ def BatchAnnotateFiles(self, request, context): def AsyncBatchAnnotateImages(self, request, context): """Run asynchronous image detection and annotation for a list of images. - Progress and results can be retrieved through the - `google.longrunning.Operations` interface. - `Operation.metadata` contains `OperationMetadata` (metadata). - `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + Progress and results can be retrieved through the + `google.longrunning.Operations` interface. + `Operation.metadata` contains `OperationMetadata` (metadata). + `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - This service will write image annotation outputs to json files in customer - GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - """ + This service will write image annotation outputs to json files in customer + GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def AsyncBatchAnnotateFiles(self, request, context): """Run asynchronous image detection and annotation for a list of generic - files, such as PDF files, which may contain multiple pages and multiple - images per page. Progress and results can be retrieved through the - `google.longrunning.Operations` interface. - `Operation.metadata` contains `OperationMetadata` (metadata). - `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - """ + files, such as PDF files, which may contain multiple pages and multiple + images per page. Progress and results can be retrieved through the + `google.longrunning.Operations` interface. + `Operation.metadata` contains `OperationMetadata` (metadata). + `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") diff --git a/google/cloud/vision_v1/proto/product_search_service_pb2_grpc.py b/google/cloud/vision_v1/proto/product_search_service_pb2_grpc.py index d40d1a11..dd05a31d 100644 --- a/google/cloud/vision_v1/proto/product_search_service_pb2_grpc.py +++ b/google/cloud/vision_v1/proto/product_search_service_pb2_grpc.py @@ -12,27 +12,27 @@ class ProductSearchStub(object): """Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + search. It uses the following resource model: - - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named - `projects/*/locations/*/productSets/*`, which acts as a way to put different - products into groups to limit identification. + - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. - In parallel, + In parallel, - - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named - `projects/*/locations/*/products/*` + - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named + `projects/*/locations/*/products/*` - - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named - `projects/*/locations/*/products/*/referenceImages/*` - """ + - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named + `projects/*/locations/*/products/*/referenceImages/*` + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateProductSet = channel.unary_unary( "/google.cloud.vision.v1.ProductSearch/CreateProductSet", request_serializer=google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.CreateProductSetRequest.SerializeToString, @@ -132,29 +132,29 @@ def __init__(self, channel): class ProductSearchServicer(object): """Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + search. It uses the following resource model: - - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named - `projects/*/locations/*/productSets/*`, which acts as a way to put different - products into groups to limit identification. + - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. - In parallel, + In parallel, - - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named - `projects/*/locations/*/products/*` + - The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named + `projects/*/locations/*/products/*` - - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named - `projects/*/locations/*/products/*/referenceImages/*` - """ + - Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named + `projects/*/locations/*/products/*/referenceImages/*` + """ def CreateProductSet(self, request, context): """Creates and returns a new ProductSet resource. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - 4096 characters. - """ + * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + 4096 characters. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -162,11 +162,11 @@ def CreateProductSet(self, request, context): def ListProductSets(self, request, context): """Lists ProductSets in an unspecified order. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -174,34 +174,34 @@ def ListProductSets(self, request, context): def GetProductSet(self, request, context): """Gets information associated with a ProductSet. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the ProductSet does not exist. - """ + * Returns NOT_FOUND if the ProductSet does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateProductSet(self, request, context): """Makes changes to a ProductSet resource. - Only display_name can be updated currently. + Only display_name can be updated currently. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the ProductSet does not exist. - * Returns INVALID_ARGUMENT if display_name is present in update_mask but - missing from the request or longer than 4096 characters. - """ + * Returns NOT_FOUND if the ProductSet does not exist. + * Returns INVALID_ARGUMENT if display_name is present in update_mask but + missing from the request or longer than 4096 characters. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteProductSet(self, request, context): """Permanently deletes a ProductSet. Products and ReferenceImages in the - ProductSet are not deleted. + ProductSet are not deleted. - The actual image files are not deleted from Google Cloud Storage. - """ + The actual image files are not deleted from Google Cloud Storage. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -209,13 +209,13 @@ def DeleteProductSet(self, request, context): def CreateProduct(self, request, context): """Creates and returns a new product resource. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - characters. - * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - * Returns INVALID_ARGUMENT if product_category is missing or invalid. - """ + * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + characters. + * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * Returns INVALID_ARGUMENT if product_category is missing or invalid. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -223,10 +223,10 @@ def CreateProduct(self, request, context): def ListProducts(self, request, context): """Lists products in an unspecified order. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -234,31 +234,31 @@ def ListProducts(self, request, context): def GetProduct(self, request, context): """Gets information associated with a Product. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product does not exist. - """ + * Returns NOT_FOUND if the Product does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateProduct(self, request, context): """Makes changes to a Product resource. - Only the `display_name`, `description`, and `labels` fields can be updated - right now. + Only the `display_name`, `description`, and `labels` fields can be updated + right now. - If labels are updated, the change will not be reflected in queries until - the next index time. + If labels are updated, the change will not be reflected in queries until + the next index time. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product does not exist. - * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - missing from the request or longer than 4096 characters. - * Returns INVALID_ARGUMENT if description is present in update_mask but is - longer than 4096 characters. - * Returns INVALID_ARGUMENT if product_category is present in update_mask. - """ + * Returns NOT_FOUND if the Product does not exist. + * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + missing from the request or longer than 4096 characters. + * Returns INVALID_ARGUMENT if description is present in update_mask but is + longer than 4096 characters. + * Returns INVALID_ARGUMENT if product_category is present in update_mask. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -266,10 +266,10 @@ def UpdateProduct(self, request, context): def DeleteProduct(self, request, context): """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. - """ + 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. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -277,24 +277,24 @@ def DeleteProduct(self, request, context): def CreateReferenceImage(self, request, context): """Creates and returns a new ReferenceImage resource. - The `bounding_poly` field is optional. If `bounding_poly` is not specified, - the system will try to detect regions of interest in the image that are - compatible with the product_category on the parent product. If it is - specified, detection is ALWAYS skipped. The system converts polygons into - non-rotated rectangles. + The `bounding_poly` field is optional. If `bounding_poly` is not specified, + the system will try to detect regions of interest in the image that are + compatible with the product_category on the parent product. If it is + specified, detection is ALWAYS skipped. The system converts polygons into + non-rotated rectangles. - Note that the pipeline will resize the image if the image resolution is too - large to process (above 50MP). + Note that the pipeline will resize the image if the image resolution is too + large to process (above 50MP). - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - characters. - * Returns INVALID_ARGUMENT if the product does not exist. - * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - compatible with the parent product's product_category is detected. - * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - """ + * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + characters. + * Returns INVALID_ARGUMENT if the product does not exist. + * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + compatible with the parent product's product_category is detected. + * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -302,12 +302,12 @@ def CreateReferenceImage(self, request, context): def DeleteReferenceImage(self, request, context): """Permanently deletes a reference image. - The image metadata will be deleted right away, but search queries - against ProductSets containing the image may still work until all related - caches are refreshed. + The image metadata will be deleted right away, but search queries + against ProductSets containing the image may still work until all related + caches are refreshed. - The actual image files are not deleted from Google Cloud Storage. - """ + The actual image files are not deleted from Google Cloud Storage. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -315,12 +315,12 @@ def DeleteReferenceImage(self, request, context): def ListReferenceImages(self, request, context): """Lists reference images. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the parent product does not exist. - * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - than 1. - """ + * Returns NOT_FOUND if the parent product does not exist. + * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -328,91 +328,90 @@ def ListReferenceImages(self, request, context): def GetReferenceImage(self, request, context): """Gets information associated with a ReferenceImage. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the specified image does not exist. - """ + * Returns NOT_FOUND if the specified image does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def AddProductToProductSet(self, request, context): """Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + present, no change is made. - One Product can be added to at most 100 ProductSets. + One Product can be added to at most 100 ProductSets. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - """ + * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def RemoveProductFromProductSet(self, request, context): - """Removes a Product from the specified ProductSet. - """ + """Removes a Product from the specified ProductSet.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListProductsInProductSet(self, request, context): """Lists the Products in a ProductSet, in an unspecified order. If the - ProductSet does not exist, the products field of the response will be - empty. + ProductSet does not exist, the products field of the response will be + empty. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ImportProductSets(self, request, context): """Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. + product sets based on a list of image information. - The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the - progress and results of the request. - `Operation.metadata` contains `BatchOperationMetadata`. (progress) - `Operation.response` contains `ImportProductSetsResponse`. (results) + The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the + progress and results of the request. + `Operation.metadata` contains `BatchOperationMetadata`. (progress) + `Operation.response` contains `ImportProductSetsResponse`. (results) - The input source of this method is a csv file on Google Cloud Storage. - For the format of the csv file please see - [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. - """ + The input source of this method is a csv file on Google Cloud Storage. + For the format of the csv file please see + [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri]. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) 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) - """ + 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!") diff --git a/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2_grpc.py b/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2_grpc.py index f945f4db..0883cec7 100644 --- a/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2_grpc.py @@ -8,16 +8,16 @@ class ImageAnnotatorStub(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.BatchAnnotateImages = channel.unary_unary( "/google.cloud.vision.v1p1beta1.ImageAnnotator/BatchAnnotateImages", request_serializer=google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, @@ -27,13 +27,12 @@ def __init__(self, channel): class ImageAnnotatorServicer(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def BatchAnnotateImages(self, request, context): - """Run image detection and annotation for a batch of images. - """ + """Run image detection and annotation for a batch of images.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") diff --git a/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2_grpc.py b/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2_grpc.py index 9fb21458..941b0766 100644 --- a/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2_grpc.py @@ -11,16 +11,16 @@ class ImageAnnotatorStub(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.BatchAnnotateImages = channel.unary_unary( "/google.cloud.vision.v1p2beta1.ImageAnnotator/BatchAnnotateImages", request_serializer=google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, @@ -35,25 +35,24 @@ def __init__(self, channel): class ImageAnnotatorServicer(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def BatchAnnotateImages(self, request, context): - """Run image detection and annotation for a batch of images. - """ + """Run image detection and annotation for a batch of images.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def AsyncBatchAnnotateFiles(self, request, context): """Run async image detection and annotation for a list of generic files (e.g. - PDF) which may contain multiple pages and multiple images per page. - Progress and results can be retrieved through the - `google.longrunning.Operations` interface. - `Operation.metadata` contains `OperationMetadata` (metadata). - `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - """ + PDF) which may contain multiple pages and multiple images per page. + Progress and results can be retrieved through the + `google.longrunning.Operations` interface. + `Operation.metadata` contains `OperationMetadata` (metadata). + `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") diff --git a/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2_grpc.py b/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2_grpc.py index 4d5a8fdb..6a881b93 100644 --- a/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2_grpc.py @@ -11,16 +11,16 @@ class ImageAnnotatorStub(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.BatchAnnotateImages = channel.unary_unary( "/google.cloud.vision.v1p3beta1.ImageAnnotator/BatchAnnotateImages", request_serializer=google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, @@ -35,25 +35,24 @@ def __init__(self, channel): class ImageAnnotatorServicer(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def BatchAnnotateImages(self, request, context): - """Run image detection and annotation for a batch of images. - """ + """Run image detection and annotation for a batch of images.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def AsyncBatchAnnotateFiles(self, request, context): """Run asynchronous image detection and annotation for a list of generic - files, such as PDF files, which may contain multiple pages and multiple - images per page. Progress and results can be retrieved through the - `google.longrunning.Operations` interface. - `Operation.metadata` contains `OperationMetadata` (metadata). - `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - """ + files, such as PDF files, which may contain multiple pages and multiple + images per page. Progress and results can be retrieved through the + `google.longrunning.Operations` interface. + `Operation.metadata` contains `OperationMetadata` (metadata). + `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") diff --git a/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2_grpc.py b/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2_grpc.py index 2fae7057..7df4f8dc 100644 --- a/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2_grpc.py +++ b/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2_grpc.py @@ -12,27 +12,27 @@ class ProductSearchStub(object): """Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + search. It uses the following resource model: - - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named - `projects/*/locations/*/productSets/*`, which acts as a way to put different - products into groups to limit identification. + - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. - In parallel, + In parallel, - - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named - `projects/*/locations/*/products/*` + - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named + `projects/*/locations/*/products/*` - - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named - `projects/*/locations/*/products/*/referenceImages/*` - """ + - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named + `projects/*/locations/*/products/*/referenceImages/*` + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateProductSet = channel.unary_unary( "/google.cloud.vision.v1p3beta1.ProductSearch/CreateProductSet", request_serializer=google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.CreateProductSetRequest.SerializeToString, @@ -127,29 +127,29 @@ def __init__(self, channel): class ProductSearchServicer(object): """Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + search. It uses the following resource model: - - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named - `projects/*/locations/*/productSets/*`, which acts as a way to put different - products into groups to limit identification. + - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. - In parallel, + In parallel, - - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named - `projects/*/locations/*/products/*` + - The API has a collection of [Product][google.cloud.vision.v1p3beta1.Product] resources, named + `projects/*/locations/*/products/*` - - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named - `projects/*/locations/*/products/*/referenceImages/*` - """ + - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named + `projects/*/locations/*/products/*/referenceImages/*` + """ def CreateProductSet(self, request, context): """Creates and returns a new ProductSet resource. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - 4096 characters. - """ + * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + 4096 characters. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -157,11 +157,11 @@ def CreateProductSet(self, request, context): def ListProductSets(self, request, context): """Lists ProductSets in an unspecified order. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -169,38 +169,38 @@ def ListProductSets(self, request, context): def GetProductSet(self, request, context): """Gets information associated with a ProductSet. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the ProductSet does not exist. - """ + * Returns NOT_FOUND if the ProductSet does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateProductSet(self, request, context): """Makes changes to a ProductSet resource. - Only display_name can be updated currently. + Only display_name can be updated currently. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the ProductSet does not exist. - * Returns INVALID_ARGUMENT if display_name is present in update_mask but - missing from the request or longer than 4096 characters. - """ + * Returns NOT_FOUND if the ProductSet does not exist. + * Returns INVALID_ARGUMENT if display_name is present in update_mask but + missing from the request or longer than 4096 characters. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteProductSet(self, request, context): """Permanently deletes a ProductSet. All Products and ReferenceImages in the - ProductSet will be deleted. + ProductSet will be deleted. - The actual image files are not deleted from Google Cloud Storage. + The actual image files are not deleted from Google Cloud Storage. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the ProductSet does not exist. - """ + * Returns NOT_FOUND if the ProductSet does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -208,13 +208,13 @@ def DeleteProductSet(self, request, context): def CreateProduct(self, request, context): """Creates and returns a new product resource. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - characters. - * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - * Returns INVALID_ARGUMENT if product_category is missing or invalid. - """ + * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + characters. + * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * Returns INVALID_ARGUMENT if product_category is missing or invalid. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -222,10 +222,10 @@ def CreateProduct(self, request, context): def ListProducts(self, request, context): """Lists products in an unspecified order. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -233,30 +233,30 @@ def ListProducts(self, request, context): def GetProduct(self, request, context): """Gets information associated with a Product. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product does not exist. - """ + * Returns NOT_FOUND if the Product does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateProduct(self, request, context): """Makes changes to a Product resource. - Only display_name, description and labels can be updated right now. + Only display_name, description and labels can be updated right now. - If labels are updated, the change will not be reflected in queries until - the next index time. + If labels are updated, the change will not be reflected in queries until + the next index time. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product does not exist. - * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - missing from the request or longer than 4096 characters. - * Returns INVALID_ARGUMENT if description is present in update_mask but is - longer than 4096 characters. - * Returns INVALID_ARGUMENT if product_category is present in update_mask. - """ + * Returns NOT_FOUND if the Product does not exist. + * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + missing from the request or longer than 4096 characters. + * Returns INVALID_ARGUMENT if description is present in update_mask but is + longer than 4096 characters. + * Returns INVALID_ARGUMENT if product_category is present in update_mask. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -264,14 +264,14 @@ def UpdateProduct(self, request, context): def DeleteProduct(self, request, context): """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. + 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: + Possible errors: - * Returns NOT_FOUND if the product does not exist. - """ + * Returns NOT_FOUND if the product does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -279,24 +279,24 @@ def DeleteProduct(self, request, context): def CreateReferenceImage(self, request, context): """Creates and returns a new ReferenceImage resource. - The `bounding_poly` field is optional. If `bounding_poly` is not specified, - the system will try to detect regions of interest in the image that are - compatible with the product_category on the parent product. If it is - specified, detection is ALWAYS skipped. The system converts polygons into - non-rotated rectangles. + The `bounding_poly` field is optional. If `bounding_poly` is not specified, + the system will try to detect regions of interest in the image that are + compatible with the product_category on the parent product. If it is + specified, detection is ALWAYS skipped. The system converts polygons into + non-rotated rectangles. - Note that the pipeline will resize the image if the image resolution is too - large to process (above 50MP). + Note that the pipeline will resize the image if the image resolution is too + large to process (above 50MP). - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - characters. - * Returns INVALID_ARGUMENT if the product does not exist. - * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - compatible with the parent product's product_category is detected. - * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - """ + * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + characters. + * Returns INVALID_ARGUMENT if the product does not exist. + * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + compatible with the parent product's product_category is detected. + * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -304,16 +304,16 @@ def CreateReferenceImage(self, request, context): def DeleteReferenceImage(self, request, context): """Permanently deletes a reference image. - The image metadata will be deleted right away, but search queries - against ProductSets containing the image may still work until all related - caches are refreshed. + The image metadata will be deleted right away, but search queries + against ProductSets containing the image may still work until all related + caches are refreshed. - The actual image files are not deleted from Google Cloud Storage. + The actual image files are not deleted from Google Cloud Storage. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the reference image does not exist. - """ + * Returns NOT_FOUND if the reference image does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -321,12 +321,12 @@ def DeleteReferenceImage(self, request, context): def ListReferenceImages(self, request, context): """Lists reference images. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the parent product does not exist. - * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - than 1. - """ + * Returns NOT_FOUND if the parent product does not exist. + * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -334,24 +334,24 @@ def ListReferenceImages(self, request, context): def GetReferenceImage(self, request, context): """Gets information associated with a ReferenceImage. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the specified image does not exist. - """ + * Returns NOT_FOUND if the specified image does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def AddProductToProductSet(self, request, context): """Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + present, no change is made. - One Product can be added to at most 100 ProductSets. + One Product can be added to at most 100 ProductSets. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - """ + * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -359,40 +359,40 @@ def AddProductToProductSet(self, request, context): def RemoveProductFromProductSet(self, request, context): """Removes a Product from the specified ProductSet. - Possible errors: + Possible errors: - * Returns NOT_FOUND If the Product is not found under the ProductSet. - """ + * Returns NOT_FOUND If the Product is not found under the ProductSet. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListProductsInProductSet(self, request, context): """Lists the Products in a ProductSet, in an unspecified order. If the - ProductSet does not exist, the products field of the response will be - empty. + ProductSet does not exist, the products field of the response will be + empty. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ImportProductSets(self, request, context): """Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. + product sets based on a list of image information. - The [google.longrunning.Operation][google.longrunning.Operation] API can be - used to keep track of the progress and results of the request. - `Operation.metadata` contains `BatchOperationMetadata`. (progress) - `Operation.response` contains `ImportProductSetsResponse`. (results) + The [google.longrunning.Operation][google.longrunning.Operation] API can be + used to keep track of the progress and results of the request. + `Operation.metadata` contains `BatchOperationMetadata`. (progress) + `Operation.response` contains `ImportProductSetsResponse`. (results) - The input source of this method is a csv file on Google Cloud Storage. - For the format of the csv file please see - [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. - """ + The input source of this method is a csv file on Google Cloud Storage. + For the format of the csv file please see + [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri]. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") diff --git a/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2_grpc.py b/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2_grpc.py index 380e78b0..25163775 100644 --- a/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2_grpc.py @@ -11,16 +11,16 @@ class ImageAnnotatorStub(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.BatchAnnotateImages = channel.unary_unary( "/google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateImages", request_serializer=google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, @@ -45,26 +45,25 @@ def __init__(self, channel): class ImageAnnotatorServicer(object): """Service that performs Google Cloud Vision API detection tasks over client - images, such as face, landmark, logo, label, and text detection. The - ImageAnnotator service returns detected entities from the images. - """ + images, such as face, landmark, logo, label, and text detection. The + ImageAnnotator service returns detected entities from the images. + """ def BatchAnnotateImages(self, request, context): - """Run image detection and annotation for a batch of images. - """ + """Run image detection and annotation for a batch of images.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchAnnotateFiles(self, request, context): """Service that performs image detection and annotation for a batch of files. - Now only "application/pdf", "image/tiff" and "image/gif" are supported. + Now only "application/pdf", "image/tiff" and "image/gif" are supported. - This service will extract at most 5 (customers can specify which 5 in - AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each - file provided and perform detection and annotation for each image - extracted. - """ + This service will extract at most 5 (customers can specify which 5 in + AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each + file provided and perform detection and annotation for each image + extracted. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -72,26 +71,26 @@ def BatchAnnotateFiles(self, request, context): def AsyncBatchAnnotateImages(self, request, context): """Run asynchronous image detection and annotation for a list of images. - Progress and results can be retrieved through the - `google.longrunning.Operations` interface. - `Operation.metadata` contains `OperationMetadata` (metadata). - `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). + Progress and results can be retrieved through the + `google.longrunning.Operations` interface. + `Operation.metadata` contains `OperationMetadata` (metadata). + `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). - This service will write image annotation outputs to json files in customer - GCS bucket, each json file containing BatchAnnotateImagesResponse proto. - """ + This service will write image annotation outputs to json files in customer + GCS bucket, each json file containing BatchAnnotateImagesResponse proto. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def AsyncBatchAnnotateFiles(self, request, context): """Run asynchronous image detection and annotation for a list of generic - files, such as PDF files, which may contain multiple pages and multiple - images per page. Progress and results can be retrieved through the - `google.longrunning.Operations` interface. - `Operation.metadata` contains `OperationMetadata` (metadata). - `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - """ + files, such as PDF files, which may contain multiple pages and multiple + images per page. Progress and results can be retrieved through the + `google.longrunning.Operations` interface. + `Operation.metadata` contains `OperationMetadata` (metadata). + `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") diff --git a/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2_grpc.py b/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2_grpc.py index 0d1f9704..a5950e7a 100644 --- a/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2_grpc.py +++ b/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2_grpc.py @@ -12,31 +12,31 @@ class ProductSearchStub(object): """Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + search. It uses the following resource model: - - The API has a collection of - [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named - `projects/*/locations/*/productSets/*`, which acts as a way to put different - products into groups to limit identification. + - The API has a collection of + [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. - In parallel, + In parallel, - - The API has a collection of - [Product][google.cloud.vision.v1p4beta1.Product] resources, named - `projects/*/locations/*/products/*` + - The API has a collection of + [Product][google.cloud.vision.v1p4beta1.Product] resources, named + `projects/*/locations/*/products/*` - - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of - [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, - named - `projects/*/locations/*/products/*/referenceImages/*` - """ + - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of + [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, + named + `projects/*/locations/*/products/*/referenceImages/*` + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.CreateProductSet = channel.unary_unary( "/google.cloud.vision.v1p4beta1.ProductSearch/CreateProductSet", request_serializer=google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.CreateProductSetRequest.SerializeToString, @@ -136,33 +136,33 @@ def __init__(self, channel): class ProductSearchServicer(object): """Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + search. It uses the following resource model: - - The API has a collection of - [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named - `projects/*/locations/*/productSets/*`, which acts as a way to put different - products into groups to limit identification. + - The API has a collection of + [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. - In parallel, + In parallel, - - The API has a collection of - [Product][google.cloud.vision.v1p4beta1.Product] resources, named - `projects/*/locations/*/products/*` + - The API has a collection of + [Product][google.cloud.vision.v1p4beta1.Product] resources, named + `projects/*/locations/*/products/*` - - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of - [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, - named - `projects/*/locations/*/products/*/referenceImages/*` - """ + - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of + [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, + named + `projects/*/locations/*/products/*/referenceImages/*` + """ def CreateProductSet(self, request, context): """Creates and returns a new ProductSet resource. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if display_name is missing, or is longer than - 4096 characters. - """ + * Returns INVALID_ARGUMENT if display_name is missing, or is longer than + 4096 characters. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -170,11 +170,11 @@ def CreateProductSet(self, request, context): def ListProductSets(self, request, context): """Lists ProductSets in an unspecified order. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100, or less - than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100, or less + than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -182,34 +182,34 @@ def ListProductSets(self, request, context): def GetProductSet(self, request, context): """Gets information associated with a ProductSet. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the ProductSet does not exist. - """ + * Returns NOT_FOUND if the ProductSet does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateProductSet(self, request, context): """Makes changes to a ProductSet resource. - Only display_name can be updated currently. + Only display_name can be updated currently. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the ProductSet does not exist. - * Returns INVALID_ARGUMENT if display_name is present in update_mask but - missing from the request or longer than 4096 characters. - """ + * Returns NOT_FOUND if the ProductSet does not exist. + * Returns INVALID_ARGUMENT if display_name is present in update_mask but + missing from the request or longer than 4096 characters. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteProductSet(self, request, context): """Permanently deletes a ProductSet. Products and ReferenceImages in the - ProductSet are not deleted. + ProductSet are not deleted. - The actual image files are not deleted from Google Cloud Storage. - """ + The actual image files are not deleted from Google Cloud Storage. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -217,13 +217,13 @@ def DeleteProductSet(self, request, context): def CreateProduct(self, request, context): """Creates and returns a new product resource. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 - characters. - * Returns INVALID_ARGUMENT if description is longer than 4096 characters. - * Returns INVALID_ARGUMENT if product_category is missing or invalid. - """ + * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 + characters. + * Returns INVALID_ARGUMENT if description is longer than 4096 characters. + * Returns INVALID_ARGUMENT if product_category is missing or invalid. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -231,10 +231,10 @@ def CreateProduct(self, request, context): def ListProducts(self, request, context): """Lists products in an unspecified order. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -242,31 +242,31 @@ def ListProducts(self, request, context): def GetProduct(self, request, context): """Gets information associated with a Product. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product does not exist. - """ + * Returns NOT_FOUND if the Product does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def UpdateProduct(self, request, context): """Makes changes to a Product resource. - Only the `display_name`, `description`, and `labels` fields can be updated - right now. + Only the `display_name`, `description`, and `labels` fields can be updated + right now. - If labels are updated, the change will not be reflected in queries until - the next index time. + If labels are updated, the change will not be reflected in queries until + the next index time. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product does not exist. - * Returns INVALID_ARGUMENT if display_name is present in update_mask but is - missing from the request or longer than 4096 characters. - * Returns INVALID_ARGUMENT if description is present in update_mask but is - longer than 4096 characters. - * Returns INVALID_ARGUMENT if product_category is present in update_mask. - """ + * Returns NOT_FOUND if the Product does not exist. + * Returns INVALID_ARGUMENT if display_name is present in update_mask but is + missing from the request or longer than 4096 characters. + * Returns INVALID_ARGUMENT if description is present in update_mask but is + longer than 4096 characters. + * Returns INVALID_ARGUMENT if product_category is present in update_mask. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -274,10 +274,10 @@ def UpdateProduct(self, request, context): def DeleteProduct(self, request, context): """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. - """ + 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. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -285,24 +285,24 @@ def DeleteProduct(self, request, context): def CreateReferenceImage(self, request, context): """Creates and returns a new ReferenceImage resource. - The `bounding_poly` field is optional. If `bounding_poly` is not specified, - the system will try to detect regions of interest in the image that are - compatible with the product_category on the parent product. If it is - specified, detection is ALWAYS skipped. The system converts polygons into - non-rotated rectangles. + The `bounding_poly` field is optional. If `bounding_poly` is not specified, + the system will try to detect regions of interest in the image that are + compatible with the product_category on the parent product. If it is + specified, detection is ALWAYS skipped. The system converts polygons into + non-rotated rectangles. - Note that the pipeline will resize the image if the image resolution is too - large to process (above 50MP). + Note that the pipeline will resize the image if the image resolution is too + large to process (above 50MP). - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 - characters. - * Returns INVALID_ARGUMENT if the product does not exist. - * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing - compatible with the parent product's product_category is detected. - * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. - """ + * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 + characters. + * Returns INVALID_ARGUMENT if the product does not exist. + * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing + compatible with the parent product's product_category is detected. + * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -310,12 +310,12 @@ def CreateReferenceImage(self, request, context): def DeleteReferenceImage(self, request, context): """Permanently deletes a reference image. - The image metadata will be deleted right away, but search queries - against ProductSets containing the image may still work until all related - caches are refreshed. + The image metadata will be deleted right away, but search queries + against ProductSets containing the image may still work until all related + caches are refreshed. - The actual image files are not deleted from Google Cloud Storage. - """ + The actual image files are not deleted from Google Cloud Storage. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -323,12 +323,12 @@ def DeleteReferenceImage(self, request, context): def ListReferenceImages(self, request, context): """Lists reference images. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the parent product does not exist. - * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less - than 1. - """ + * Returns NOT_FOUND if the parent product does not exist. + * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less + than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -336,91 +336,90 @@ def ListReferenceImages(self, request, context): def GetReferenceImage(self, request, context): """Gets information associated with a ReferenceImage. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the specified image does not exist. - """ + * Returns NOT_FOUND if the specified image does not exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def AddProductToProductSet(self, request, context): """Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + present, no change is made. - One Product can be added to at most 100 ProductSets. + One Product can be added to at most 100 ProductSets. - Possible errors: + Possible errors: - * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. - """ + * Returns NOT_FOUND if the Product or the ProductSet doesn't exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def RemoveProductFromProductSet(self, request, context): - """Removes a Product from the specified ProductSet. - """ + """Removes a Product from the specified ProductSet.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListProductsInProductSet(self, request, context): """Lists the Products in a ProductSet, in an unspecified order. If the - ProductSet does not exist, the products field of the response will be - empty. + ProductSet does not exist, the products field of the response will be + empty. - Possible errors: + Possible errors: - * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. - """ + * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ImportProductSets(self, request, context): """Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. + product sets based on a list of image information. - The [google.longrunning.Operation][google.longrunning.Operation] API can be - used to keep track of the progress and results of the request. - `Operation.metadata` contains `BatchOperationMetadata`. (progress) - `Operation.response` contains `ImportProductSetsResponse`. (results) + The [google.longrunning.Operation][google.longrunning.Operation] API can be + used to keep track of the progress and results of the request. + `Operation.metadata` contains `BatchOperationMetadata`. (progress) + `Operation.response` contains `ImportProductSetsResponse`. (results) - The input source of this method is a csv file on Google Cloud Storage. - For the format of the csv file please see - [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. - """ + The input source of this method is a csv file on Google Cloud Storage. + For the format of the csv file please see + [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri]. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) 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) - """ + 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!") diff --git a/noxfile.py b/noxfile.py index 04373e0b..1ed2813e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,7 +23,7 @@ import nox -BLACK_VERSION = "black==19.3b0" +BLACK_VERSION = "black==22.3.0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] if os.path.exists("samples"): diff --git a/setup.py b/setup.py index 2cde0d48..cd60ccc1 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ name = "google-cloud-vision" description = "Cloud Vision API API client library" -version = "1.0.0" +version = "1.0.1" release_status = "Development Status :: 5 - Production/Stable" dependencies = [ "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", diff --git a/tests/unit/gapic/v1/test_product_search_client_v1.py b/tests/unit/gapic/v1/test_product_search_client_v1.py index 5a3ac654..ec58432a 100644 --- a/tests/unit/gapic/v1/test_product_search_client_v1.py +++ b/tests/unit/gapic/v1/test_product_search_client_v1.py @@ -718,8 +718,10 @@ def test_remove_product_from_product_set(self): client.remove_product_from_product_set(name, product) assert len(channel.requests) == 1 - expected_request = product_search_service_pb2.RemoveProductFromProductSetRequest( - name=name, product=product + expected_request = ( + product_search_service_pb2.RemoveProductFromProductSetRequest( + name=name, product=product + ) ) actual_request = channel.requests[0][1] assert expected_request == actual_request diff --git a/tests/unit/gapic/v1p3beta1/test_product_search_client_v1p3beta1.py b/tests/unit/gapic/v1p3beta1/test_product_search_client_v1p3beta1.py index 7790314c..60c22132 100644 --- a/tests/unit/gapic/v1p3beta1/test_product_search_client_v1p3beta1.py +++ b/tests/unit/gapic/v1p3beta1/test_product_search_client_v1p3beta1.py @@ -733,8 +733,10 @@ def test_remove_product_from_product_set(self): client.remove_product_from_product_set(name, product) assert len(channel.requests) == 1 - expected_request = product_search_service_pb2.RemoveProductFromProductSetRequest( - name=name, product=product + expected_request = ( + product_search_service_pb2.RemoveProductFromProductSetRequest( + name=name, product=product + ) ) actual_request = channel.requests[0][1] assert expected_request == actual_request diff --git a/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py b/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py index 35aad821..95d75239 100644 --- a/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py +++ b/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py @@ -733,8 +733,10 @@ def test_remove_product_from_product_set(self): client.remove_product_from_product_set(name, product) assert len(channel.requests) == 1 - expected_request = product_search_service_pb2.RemoveProductFromProductSetRequest( - name=name, product=product + expected_request = ( + product_search_service_pb2.RemoveProductFromProductSetRequest( + name=name, product=product + ) ) actual_request = channel.requests[0][1] assert expected_request == actual_request