diff --git a/.flake8 b/.flake8 index 20fe9bda..ed931638 100644 --- a/.flake8 +++ b/.flake8 @@ -21,6 +21,8 @@ exclude = # Exclude generated code. **/proto/** **/gapic/** + **/services/** + **/types/** *_pb2.py # Standard linting exemptions. diff --git a/.gitignore b/.gitignore index 3fb06e09..b87e1ed5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ dist build eggs +.eggs parts bin var @@ -49,6 +50,7 @@ bigquery/docs/generated # Virtual environment env/ coverage.xml +sponge_log.xml # System test environment variables. system_tests/local_test_setup diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index c5ebca90..237f0e87 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/bin/bash - set -eo pipefail # Disable buffering, so that the logs stream through. diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 6a730710..345a8dc0 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/bin/bash - set -eo pipefail # Start the releasetool reporter diff --git a/.kokoro/samples/lint/common.cfg b/.kokoro/samples/lint/common.cfg new file mode 100644 index 00000000..fbab9a31 --- /dev/null +++ b/.kokoro/samples/lint/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "lint" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-vision/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-vision/.kokoro/trampoline.sh" \ No newline at end of file diff --git a/.kokoro/samples/lint/continuous.cfg b/.kokoro/samples/lint/continuous.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/lint/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/lint/periodic.cfg b/.kokoro/samples/lint/periodic.cfg new file mode 100644 index 00000000..50fec964 --- /dev/null +++ b/.kokoro/samples/lint/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} \ No newline at end of file diff --git a/.kokoro/samples/lint/presubmit.cfg b/.kokoro/samples/lint/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/lint/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg new file mode 100644 index 00000000..3d483d87 --- /dev/null +++ b/.kokoro/samples/python3.6/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.6" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-vision/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-vision/.kokoro/trampoline.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.6/continuous.cfg b/.kokoro/samples/python3.6/continuous.cfg new file mode 100644 index 00000000..7218af14 --- /dev/null +++ b/.kokoro/samples/python3.6/continuous.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} + diff --git a/.kokoro/samples/python3.6/periodic.cfg b/.kokoro/samples/python3.6/periodic.cfg new file mode 100644 index 00000000..50fec964 --- /dev/null +++ b/.kokoro/samples/python3.6/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.6/presubmit.cfg b/.kokoro/samples/python3.6/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.6/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg new file mode 100644 index 00000000..abd4954b --- /dev/null +++ b/.kokoro/samples/python3.7/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.7" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-vision/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-vision/.kokoro/trampoline.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.7/continuous.cfg b/.kokoro/samples/python3.7/continuous.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.7/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.7/periodic.cfg b/.kokoro/samples/python3.7/periodic.cfg new file mode 100644 index 00000000..50fec964 --- /dev/null +++ b/.kokoro/samples/python3.7/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.7/presubmit.cfg b/.kokoro/samples/python3.7/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.7/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg new file mode 100644 index 00000000..f6e94bf7 --- /dev/null +++ b/.kokoro/samples/python3.8/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-vision/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-vision/.kokoro/trampoline.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.8/continuous.cfg b/.kokoro/samples/python3.8/continuous.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.8/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.8/periodic.cfg b/.kokoro/samples/python3.8/periodic.cfg new file mode 100644 index 00000000..50fec964 --- /dev/null +++ b/.kokoro/samples/python3.8/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.8/presubmit.cfg b/.kokoro/samples/python3.8/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.8/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh new file mode 100755 index 00000000..40daa396 --- /dev/null +++ b/.kokoro/test-samples.sh @@ -0,0 +1,104 @@ +#!/bin/bash +# Copyright 2020 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 +# +# https://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. + + +# `-e` enables the script to automatically fail when a command fails +# `-o pipefail` sets the exit code to the rightmost comment to exit with a non-zero +set -eo pipefail +# Enables `**` to include files nested inside sub-folders +shopt -s globstar + +cd github/python-vision + +# Run periodic samples tests at latest release +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then + LATEST_RELEASE=$(git describe --abbrev=0 --tags) + git checkout $LATEST_RELEASE +fi + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Debug: show build environment +env | grep KOKORO + +# Install nox +python3.6 -m pip install --upgrade --quiet nox + +# Use secrets acessor service account to get secrets +if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then + gcloud auth activate-service-account \ + --key-file="${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" \ + --project="cloud-devrel-kokoro-resources" +fi + +# This script will create 3 files: +# - testing/test-env.sh +# - testing/service-account.json +# - testing/client-secrets.json +./scripts/decrypt-secrets.sh + +source ./testing/test-env.sh +export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json + +# For cloud-run session, we activate the service account for gcloud sdk. +gcloud auth activate-service-account \ + --key-file "${GOOGLE_APPLICATION_CREDENTIALS}" + +export GOOGLE_CLIENT_SECRETS=$(pwd)/testing/client-secrets.json + +echo -e "\n******************** TESTING PROJECTS ********************" + +# Switch to 'fail at end' to allow all tests to complete before exiting. +set +e +# Use RTN to return a non-zero value if the test fails. +RTN=0 +ROOT=$(pwd) +# Find all requirements.txt in the samples directory (may break on whitespace). +for file in samples/**/requirements.txt; do + cd "$ROOT" + # Navigate to the project folder. + file=$(dirname "$file") + cd "$file" + + echo "------------------------------------------------------------" + echo "- testing $file" + echo "------------------------------------------------------------" + + # Use nox to execute the tests for the project. + python3.6 -m nox -s "$RUN_TESTS_SESSION" + EXIT=$? + + # If this is a periodic build, send the test log to the Build Cop Bot. + # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop. + if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then + chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop + $KOKORO_GFILE_DIR/linux_amd64/buildcop + fi + + if [[ $EXIT -ne 0 ]]; then + RTN=1 + echo -e "\n Testing failed: Nox returned a non-zero exit code. \n" + else + echo -e "\n Testing completed.\n" + fi + +done +cd "$ROOT" + +# Workaround for Kokoro permissions issue: delete secrets +rm testing/{test-env.sh,client-secrets.json,service-account.json} + +exit "$RTN" \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 68855abc..e9e29d12 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -20,3 +20,6 @@ recursive-include google *.json *.proto recursive-include tests * global-exclude *.py[co] global-exclude __pycache__ + +# Exclude scripts for samples readmegen +prune scripts/readme-gen \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 72420fde..aa411bea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,21 +38,18 @@ "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", + "recommonmark", ] # autodoc/autosummary flags autoclass_content = "both" -autodoc_default_flags = ["members"] +autodoc_default_options = {"members": True} autosummary_generate = True # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] -# Allow markdown includes (so releases.md can include CHANGLEOG.md) -# http://www.sphinx-doc.org/en/master/markdown.html -source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} - # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # source_suffix = ['.rst', '.md'] @@ -340,7 +337,7 @@ intersphinx_mapping = { "python": ("http://python.readthedocs.org/en/latest/", None), "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None), + "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), "grpc": ("https://grpc.io/grpc/python/", None), } diff --git a/docs/index.rst b/docs/index.rst index 3bc60512..5e21d999 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,8 @@ .. include:: README.rst +.. include:: multiprocessing.rst + + Using the Library ----------------- diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst new file mode 100644 index 00000000..1cb29d4c --- /dev/null +++ b/docs/multiprocessing.rst @@ -0,0 +1,7 @@ +.. note:: + + Because this client uses :mod:`grpcio` library, it is safe to + share instances across threads. In multiprocessing scenarios, the best + practice is to create client instances *after* the invocation of + :func:`os.fork` by :class:`multiprocessing.Pool` or + :class:`multiprocessing.Process`. diff --git a/google/cloud/vision_v1/__init__.py b/google/cloud/vision_v1/__init__.py index 3c62fcc6..7714adb4 100644 --- a/google/cloud/vision_v1/__init__.py +++ b/google/cloud/vision_v1/__init__.py @@ -30,8 +30,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) @@ -48,4 +48,9 @@ class ImageAnnotatorClient(VisionHelpers, iac.ImageAnnotatorClient): enums = enums -__all__ = ("enums", "types", "ProductSearchClient", "ImageAnnotatorClient") +__all__ = ( + "enums", + "types", + "ProductSearchClient", + "ImageAnnotatorClient", +) diff --git a/google/cloud/vision_v1/gapic/enums.py b/google/cloud/vision_v1/gapic/enums.py index 80aa4fce..911d2e7c 100644 --- a/google/cloud/vision_v1/gapic/enums.py +++ b/google/cloud/vision_v1/gapic/enums.py @@ -181,9 +181,9 @@ class Type(enum.IntEnum): LANDMARK_DETECTION (int): Run landmark detection. LOGO_DETECTION (int): Run logo detection. LABEL_DETECTION (int): Run label detection. - TEXT_DETECTION (int): Run text detection / optical character recognition (OCR). Text detection - is optimized for areas of text within a larger image; if the image is a - document, use ``DOCUMENT_TEXT_DETECTION`` instead. + TEXT_DETECTION (int): Run text detection / optical character recognition (OCR). Text + detection is optimized for areas of text within a larger image; if the + image is a document, use ``DOCUMENT_TEXT_DETECTION`` instead. DOCUMENT_TEXT_DETECTION (int): Run dense text document OCR. Takes precedence when both ``DOCUMENT_TEXT_DETECTION`` and ``TEXT_DETECTION`` are present. SAFE_SEARCH_DETECTION (int): Run Safe Search to detect potentially unsafe diff --git a/google/cloud/vision_v1/gapic/image_annotator_client.py b/google/cloud/vision_v1/gapic/image_annotator_client.py index a8512a4d..d56c69f2 100644 --- a/google/cloud/vision_v1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1/gapic/image_annotator_client.py @@ -42,7 +42,7 @@ from google.protobuf import field_mask_pb2 -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision").version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision",).version class ImageAnnotatorClient(object): @@ -166,12 +166,12 @@ def __init__( self.transport = transport else: self.transport = image_annotator_grpc_transport.ImageAnnotatorGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -182,7 +182,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -192,92 +192,6 @@ def __init__( self._inner_api_calls = {} # Service calls - def batch_annotate_images( - self, - requests, - parent=None, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Run image detection and annotation for a batch of images. - - Example: - >>> from google.cloud import vision_v1 - >>> - >>> client = vision_v1.ImageAnnotatorClient() - >>> - >>> # TODO: Initialize `requests`: - >>> requests = [] - >>> - >>> response = client.batch_annotate_images(requests) - - Args: - requests (list[Union[dict, ~google.cloud.vision_v1.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_v1.types.AnnotateImageRequest` - parent (str): Optional. Target project and location to make a call. - - Format: ``projects/{project-id}/locations/{location-id}``. - - If no parent is specified, a region will be chosen automatically. - - Supported location-ids: ``us``: USA country only, ``asia``: East asia - areas, like Japan, Taiwan, ``eu``: The European Union. - - Example: ``projects/project-A/locations/eu``. - 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_v1.types.BatchAnnotateImagesResponse` 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 "batch_annotate_images" not in self._inner_api_calls: - self._inner_api_calls[ - "batch_annotate_images" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_annotate_images, - default_retry=self._method_configs["BatchAnnotateImages"].retry, - default_timeout=self._method_configs["BatchAnnotateImages"].timeout, - client_info=self._client_info, - ) - - request = image_annotator_pb2.BatchAnnotateImagesRequest( - requests=requests, parent=parent - ) - 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["batch_annotate_images"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - def batch_annotate_files( self, requests, @@ -352,7 +266,7 @@ def batch_annotate_files( ) request = image_annotator_pb2.BatchAnnotateFilesRequest( - requests=requests, parent=parent + requests=requests, parent=parent, ) if metadata is None: metadata = [] @@ -381,7 +295,8 @@ def async_batch_annotate_images( metadata=None, ): """ - Run asynchronous image detection and annotation for a list of images. + 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`` @@ -466,7 +381,7 @@ def async_batch_annotate_images( ) request = image_annotator_pb2.AsyncBatchAnnotateImagesRequest( - requests=requests, output_config=output_config, parent=parent + requests=requests, output_config=output_config, parent=parent, ) if metadata is None: metadata = [] @@ -500,10 +415,10 @@ def async_batch_annotate_files( metadata=None, ): """ - 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`` + 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). @@ -572,7 +487,7 @@ def async_batch_annotate_files( ) request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest( - requests=requests, parent=parent + requests=requests, parent=parent, ) if metadata is None: metadata = [] @@ -596,3 +511,89 @@ def async_batch_annotate_files( image_annotator_pb2.AsyncBatchAnnotateFilesResponse, metadata_type=image_annotator_pb2.OperationMetadata, ) + + def batch_annotate_images( + self, + requests, + parent=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Run image detection and annotation for a batch of images. + + Example: + >>> from google.cloud import vision_v1 + >>> + >>> client = vision_v1.ImageAnnotatorClient() + >>> + >>> # TODO: Initialize `requests`: + >>> requests = [] + >>> + >>> response = client.batch_annotate_images(requests) + + Args: + requests (list[Union[dict, ~google.cloud.vision_v1.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_v1.types.AnnotateImageRequest` + parent (str): Optional. Target project and location to make a call. + + Format: ``projects/{project-id}/locations/{location-id}``. + + If no parent is specified, a region will be chosen automatically. + + Supported location-ids: ``us``: USA country only, ``asia``: East asia + areas, like Japan, Taiwan, ``eu``: The European Union. + + Example: ``projects/project-A/locations/eu``. + 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_v1.types.BatchAnnotateImagesResponse` 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 "batch_annotate_images" not in self._inner_api_calls: + self._inner_api_calls[ + "batch_annotate_images" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.batch_annotate_images, + default_retry=self._method_configs["BatchAnnotateImages"].retry, + default_timeout=self._method_configs["BatchAnnotateImages"].timeout, + client_info=self._client_info, + ) + + request = image_annotator_pb2.BatchAnnotateImagesRequest( + requests=requests, parent=parent, + ) + 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["batch_annotate_images"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) diff --git a/google/cloud/vision_v1/gapic/image_annotator_client_config.py b/google/cloud/vision_v1/gapic/image_annotator_client_config.py index f533bb71..d1b1f9e5 100644 --- a/google/cloud/vision_v1/gapic/image_annotator_client_config.py +++ b/google/cloud/vision_v1/gapic/image_annotator_client_config.py @@ -2,40 +2,49 @@ "interfaces": { "google.cloud.vision.v1.ImageAnnotator": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "no_retry_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, }, "methods": { - "BatchAnnotateImages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, "BatchAnnotateFiles": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "AsyncBatchAnnotateImages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "AsyncBatchAnnotateFiles": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + "BatchAnnotateImages": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/google/cloud/vision_v1/gapic/product_search_client.py b/google/cloud/vision_v1/gapic/product_search_client.py index f2794d69..123d2949 100644 --- a/google/cloud/vision_v1/gapic/product_search_client.py +++ b/google/cloud/vision_v1/gapic/product_search_client.py @@ -44,13 +44,13 @@ from google.protobuf import field_mask_pb2 -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision").version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision",).version class ProductSearchClient(object): """ - Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + Manages Products and ProductSets of reference images for use in + product search. It uses the following resource model: - The API has a collection of ``ProductSet`` resources, named ``projects/*/locations/*/productSets/*``, which acts as a way to put @@ -219,12 +219,12 @@ def __init__( self.transport = transport else: self.transport = product_search_grpc_transport.ProductSearchGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -235,7 +235,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -245,6 +245,245 @@ def __init__( self._inner_api_calls = {} # Service calls + def import_product_sets( + self, + parent, + input_config, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Asynchronous API that imports a list of reference images to + specified product sets based on a list of image information. + + The ``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``. + + Example: + >>> from google.cloud import vision_v1 + >>> + >>> client = vision_v1.ProductSearchClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> # TODO: Initialize `input_config`: + >>> input_config = {} + >>> + >>> response = client.import_product_sets(parent, input_config) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() + + Args: + 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_v1.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_v1.types.ImportProductSetsInputConfig` + 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_v1.types._OperationFuture` 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 "import_product_sets" not in self._inner_api_calls: + self._inner_api_calls[ + "import_product_sets" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.import_product_sets, + default_retry=self._method_configs["ImportProductSets"].retry, + default_timeout=self._method_configs["ImportProductSets"].timeout, + client_info=self._client_info, + ) + + request = product_search_service_pb2.ImportProductSetsRequest( + parent=parent, input_config=input_config, + ) + 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) + + operation = self._inner_api_calls["import_product_sets"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + product_search_service_pb2.ImportProductSetsResponse, + metadata_type=product_search_service_pb2.BatchOperationMetadata, + ) + + def purge_products( + self, + parent, + product_set_purge_config=None, + delete_orphan_products=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_v1 + >>> + >>> client = vision_v1.ProductSearchClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> response = client.purge_products(parent) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() + + Args: + parent (str): Required. The project and location in which the Products should be + deleted. + + Format is ``projects/PROJECT_ID/locations/LOC_ID``. + product_set_purge_config (Union[dict, ~google.cloud.vision_v1.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_v1.types.ProductSetPurgeConfig` + delete_orphan_products (bool): If delete_orphan_products is true, all Products that are not in any + ProductSet will be deleted. + 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_v1.types._OperationFuture` 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( + parent=parent, + product_set_purge_config=product_set_purge_config, + delete_orphan_products=delete_orphan_products, + 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) + + operation = self._inner_api_calls["purge_products"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + empty_pb2.Empty, + metadata_type=product_search_service_pb2.BatchOperationMetadata, + ) + def create_product_set( self, parent, @@ -259,7 +498,7 @@ def create_product_set( Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing, or is longer + - Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. Example: @@ -282,9 +521,9 @@ def create_product_set( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1.types.ProductSet` - product_set_id (str): 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 error is returned with code ALREADY\_EXISTS. Must be at most 128 + product_set_id (str): 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 error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character ``/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -317,7 +556,7 @@ def create_product_set( ) request = product_search_service_pb2.CreateProductSetRequest( - parent=parent, product_set=product_set, product_set_id=product_set_id + parent=parent, product_set=product_set, product_set_id=product_set_id, ) if metadata is None: metadata = [] @@ -349,7 +588,7 @@ def list_product_sets( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100, or less + - Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. Example: @@ -416,7 +655,7 @@ def list_product_sets( ) request = product_search_service_pb2.ListProductSetsRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -458,7 +697,7 @@ def get_product_set( Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. + - Returns NOT_FOUND if the ProductSet does not exist. Example: >>> from google.cloud import vision_v1 @@ -504,7 +743,7 @@ def get_product_set( client_info=self._client_info, ) - request = product_search_service_pb2.GetProductSetRequest(name=name) + request = product_search_service_pb2.GetProductSetRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -531,13 +770,13 @@ def update_product_set( metadata=None, ): """ - Makes changes to a ProductSet resource. Only display\_name can be + Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. - - Returns INVALID\_ARGUMENT if display\_name is present in update\_mask + - 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. Example: @@ -555,9 +794,9 @@ def update_product_set( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1.types.ProductSet` - update_mask (Union[dict, ~google.cloud.vision_v1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If update\_mask - isn't specified, all mutable fields are to be updated. Valid mask path - is ``display_name``. + update_mask (Union[dict, ~google.cloud.vision_v1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If + update_mask isn't specified, all mutable fields are to be updated. Valid + mask path is ``display_name``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1.types.FieldMask` @@ -592,7 +831,7 @@ def update_product_set( ) request = product_search_service_pb2.UpdateProductSetRequest( - product_set=product_set, update_mask=update_mask + product_set=product_set, update_mask=update_mask, ) if metadata is None: metadata = [] @@ -665,7 +904,7 @@ def delete_product_set( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteProductSetRequest(name=name) + request = product_search_service_pb2.DeleteProductSetRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -697,11 +936,11 @@ def create_product( Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing or longer than + - Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - - Returns INVALID\_ARGUMENT if description is longer than 4096 + - Returns INVALID_ARGUMENT if description is longer than 4096 characters. - - Returns INVALID\_ARGUMENT if product\_category is missing or invalid. + - Returns INVALID_ARGUMENT if product_category is missing or invalid. Example: >>> from google.cloud import vision_v1 @@ -723,9 +962,9 @@ def create_product( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1.types.Product` - product_id (str): 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 error is returned with code ALREADY\_EXISTS. Must be at most 128 + product_id (str): 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 error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character ``/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -758,7 +997,7 @@ def create_product( ) request = product_search_service_pb2.CreateProductRequest( - parent=parent, product=product, product_id=product_id + parent=parent, product=product, product_id=product_id, ) if metadata is None: metadata = [] @@ -790,7 +1029,7 @@ def list_products( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Example: @@ -858,7 +1097,7 @@ def list_products( ) request = product_search_service_pb2.ListProductsRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -900,7 +1139,7 @@ def get_product( Possible errors: - - Returns NOT\_FOUND if the Product does not exist. + - Returns NOT_FOUND if the Product does not exist. Example: >>> from google.cloud import vision_v1 @@ -945,7 +1184,7 @@ def get_product( client_info=self._client_info, ) - request = product_search_service_pb2.GetProductRequest(name=name) + request = product_search_service_pb2.GetProductRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -980,13 +1219,13 @@ def update_product( Possible errors: - - Returns NOT\_FOUND if the Product does not exist. - - Returns INVALID\_ARGUMENT if display\_name 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. + - 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. Example: >>> from google.cloud import vision_v1 @@ -1004,9 +1243,10 @@ def update_product( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1.types.Product` - update_mask (Union[dict, ~google.cloud.vision_v1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If update\_mask - isn't specified, all mutable fields are to be updated. Valid mask paths - include ``product_labels``, ``display_name``, and ``description``. + update_mask (Union[dict, ~google.cloud.vision_v1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If + update_mask isn't specified, all mutable fields are to be updated. Valid + mask paths include ``product_labels``, ``display_name``, and + ``description``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1.types.FieldMask` @@ -1041,7 +1281,7 @@ def update_product( ) request = product_search_service_pb2.UpdateProductRequest( - product=product, update_mask=update_mask + product=product, update_mask=update_mask, ) if metadata is None: metadata = [] @@ -1114,7 +1354,7 @@ def delete_product( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteProductRequest(name=name) + request = product_search_service_pb2.DeleteProductRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1146,7 +1386,7 @@ def create_reference_image( 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 + 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. @@ -1155,13 +1395,13 @@ def create_reference_image( Possible errors: - - Returns INVALID\_ARGUMENT if the image\_uri is missing or longer than + - 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 + - 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 + - Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. Example: @@ -1177,8 +1417,8 @@ def create_reference_image( >>> response = client.create_reference_image(parent, reference_image) Args: - parent (str): Required. 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_v1.types.ReferenceImage]): Required. The reference image to create. @@ -1186,10 +1426,10 @@ def create_reference_image( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1.types.ReferenceImage` - reference_image_id (str): 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 - already in use, an error is returned with code ALREADY\_EXISTS. Must be - at most 128 characters long. It cannot contain the character ``/``. + reference_image_id (str): 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 already in use, an error is returned with code ALREADY_EXISTS. Must + be at most 128 characters long. It cannot contain the character ``/``. 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. @@ -1300,7 +1540,7 @@ def delete_reference_image( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteReferenceImageRequest(name=name) + request = product_search_service_pb2.DeleteReferenceImageRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1331,8 +1571,8 @@ def list_reference_images( Possible errors: - - Returns NOT\_FOUND if the parent product does not exist. - - Returns INVALID\_ARGUMENT if the page\_size is greater than 100, or + - 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. Example: @@ -1357,7 +1597,8 @@ def list_reference_images( ... pass Args: - parent (str): Required. 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 @@ -1399,7 +1640,7 @@ def list_reference_images( ) request = product_search_service_pb2.ListReferenceImagesRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -1441,7 +1682,7 @@ def get_reference_image( Possible errors: - - Returns NOT\_FOUND if the specified image does not exist. + - Returns NOT_FOUND if the specified image does not exist. Example: >>> from google.cloud import vision_v1 @@ -1488,7 +1729,7 @@ def get_reference_image( client_info=self._client_info, ) - request = product_search_service_pb2.GetReferenceImageRequest(name=name) + request = product_search_service_pb2.GetReferenceImageRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1515,14 +1756,14 @@ def add_product_to_product_set( metadata=None, ): """ - Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + Adds a Product to the specified ProductSet. If the Product is + already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: - - Returns NOT\_FOUND if the Product or the ProductSet doesn't exist. + - Returns NOT_FOUND if the Product or the ProductSet doesn't exist. Example: >>> from google.cloud import vision_v1 @@ -1571,7 +1812,7 @@ def add_product_to_product_set( ) request = product_search_service_pb2.AddProductToProductSetRequest( - name=name, product=product + name=name, product=product, ) if metadata is None: metadata = [] @@ -1650,7 +1891,7 @@ def remove_product_from_product_set( ) request = product_search_service_pb2.RemoveProductFromProductSetRequest( - name=name, product=product + name=name, product=product, ) if metadata is None: metadata = [] @@ -1684,7 +1925,7 @@ def list_products_in_product_set( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Example: @@ -1754,7 +1995,7 @@ def list_products_in_product_set( ) request = product_search_service_pb2.ListProductsInProductSetRequest( - name=name, page_size=page_size + name=name, page_size=page_size, ) if metadata is None: metadata = [] @@ -1783,242 +2024,3 @@ def list_products_in_product_set( response_token_field="next_page_token", ) return iterator - - def import_product_sets( - self, - parent, - input_config, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. - - The ``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``. - - Example: - >>> from google.cloud import vision_v1 - >>> - >>> client = vision_v1.ProductSearchClient() - >>> - >>> parent = client.location_path('[PROJECT]', '[LOCATION]') - >>> - >>> # TODO: Initialize `input_config`: - >>> input_config = {} - >>> - >>> response = client.import_product_sets(parent, input_config) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() - - Args: - 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_v1.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_v1.types.ImportProductSetsInputConfig` - 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_v1.types._OperationFuture` 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 "import_product_sets" not in self._inner_api_calls: - self._inner_api_calls[ - "import_product_sets" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.import_product_sets, - default_retry=self._method_configs["ImportProductSets"].retry, - default_timeout=self._method_configs["ImportProductSets"].timeout, - client_info=self._client_info, - ) - - request = product_search_service_pb2.ImportProductSetsRequest( - parent=parent, input_config=input_config - ) - 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) - - operation = self._inner_api_calls["import_product_sets"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - product_search_service_pb2.ImportProductSetsResponse, - metadata_type=product_search_service_pb2.BatchOperationMetadata, - ) - - def purge_products( - self, - parent, - product_set_purge_config=None, - delete_orphan_products=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_v1 - >>> - >>> client = vision_v1.ProductSearchClient() - >>> - >>> parent = client.location_path('[PROJECT]', '[LOCATION]') - >>> - >>> response = client.purge_products(parent) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() - - Args: - parent (str): Required. The project and location in which the Products should be - deleted. - - Format is ``projects/PROJECT_ID/locations/LOC_ID``. - product_set_purge_config (Union[dict, ~google.cloud.vision_v1.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_v1.types.ProductSetPurgeConfig` - delete_orphan_products (bool): If delete\_orphan\_products is true, all Products that are not in any - ProductSet will be deleted. - 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_v1.types._OperationFuture` 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( - parent=parent, - product_set_purge_config=product_set_purge_config, - delete_orphan_products=delete_orphan_products, - 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) - - operation = self._inner_api_calls["purge_products"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - empty_pb2.Empty, - metadata_type=product_search_service_pb2.BatchOperationMetadata, - ) diff --git a/google/cloud/vision_v1/gapic/product_search_client_config.py b/google/cloud/vision_v1/gapic/product_search_client_config.py index 8753ca19..00bbdce0 100644 --- a/google/cloud/vision_v1/gapic/product_search_client_config.py +++ b/google/cloud/vision_v1/gapic/product_search_client_config.py @@ -2,115 +2,134 @@ "interfaces": { "google.cloud.vision.v1.ProductSearch": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "no_retry_codes": [], + "retry_policy_3_codes": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "retry_policy_2_codes": [], }, "retry_params": { - "default": { + "retry_policy_2_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, }, "methods": { + "ImportProductSets": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", + }, + "PurgeProducts": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", + }, "CreateProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "ListProductSets": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "UpdateProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "DeleteProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateProduct": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "ListProducts": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetProduct": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "UpdateProduct": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "DeleteProduct": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "DeleteReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "ListReferenceImages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "AddProductToProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "RemoveProductFromProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "ListProductsInProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, - "ImportProductSets": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", - }, - "PurgeProducts": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, }, } diff --git a/google/cloud/vision_v1/gapic/transports/image_annotator_grpc_transport.py b/google/cloud/vision_v1/gapic/transports/image_annotator_grpc_transport.py index 5c6f0de4..de1ef61f 100644 --- a/google/cloud/vision_v1/gapic/transports/image_annotator_grpc_transport.py +++ b/google/cloud/vision_v1/gapic/transports/image_annotator_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -76,7 +76,9 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "image_annotator_stub": image_annotator_pb2_grpc.ImageAnnotatorStub(channel) + "image_annotator_stub": image_annotator_pb2_grpc.ImageAnnotatorStub( + channel + ), } # Because this API includes a method that returns a @@ -118,19 +120,6 @@ def channel(self): """ return self._channel - @property - def batch_annotate_images(self): - """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_images`. - - Run image detection and annotation for a batch of images. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["image_annotator_stub"].BatchAnnotateImages - @property def batch_annotate_files(self): """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_files`. @@ -154,7 +143,8 @@ def batch_annotate_files(self): def async_batch_annotate_images(self): """Return the gRPC stub for :meth:`ImageAnnotatorClient.async_batch_annotate_images`. - Run asynchronous image detection and annotation for a list of images. + 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`` @@ -176,10 +166,10 @@ def async_batch_annotate_images(self): def async_batch_annotate_files(self): """Return the gRPC stub for :meth:`ImageAnnotatorClient.async_batch_annotate_files`. - 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`` + 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). @@ -189,3 +179,16 @@ def async_batch_annotate_files(self): deserialized response object. """ return self._stubs["image_annotator_stub"].AsyncBatchAnnotateFiles + + @property + def batch_annotate_images(self): + """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_images`. + + Run image detection and annotation for a batch of images. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["image_annotator_stub"].BatchAnnotateImages diff --git a/google/cloud/vision_v1/gapic/transports/product_search_grpc_transport.py b/google/cloud/vision_v1/gapic/transports/product_search_grpc_transport.py index 61324c3c..b237d0a9 100644 --- a/google/cloud/vision_v1/gapic/transports/product_search_grpc_transport.py +++ b/google/cloud/vision_v1/gapic/transports/product_search_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -78,7 +78,7 @@ def __init__( self._stubs = { "product_search_stub": product_search_service_pb2_grpc.ProductSearchStub( channel - ) + ), } # Because this API includes a method that returns a @@ -120,6 +120,65 @@ def channel(self): """ return self._channel + @property + def import_product_sets(self): + """Return the gRPC stub for :meth:`ProductSearchClient.import_product_sets`. + + Asynchronous API that imports a list of reference images to + specified product sets based on a list of image information. + + The ``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``. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + 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 + @property def create_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.create_product_set`. @@ -128,7 +187,7 @@ def create_product_set(self): Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing, or is longer + - Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. Returns: @@ -146,7 +205,7 @@ def list_product_sets(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100, or less + - Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. Returns: @@ -164,7 +223,7 @@ def get_product_set(self): Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. + - Returns NOT_FOUND if the ProductSet does not exist. Returns: Callable: A callable which accepts the appropriate @@ -177,13 +236,13 @@ def get_product_set(self): def update_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.update_product_set`. - Makes changes to a ProductSet resource. Only display\_name can be + Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. - - Returns INVALID\_ARGUMENT if display\_name is present in update\_mask + - 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: @@ -217,11 +276,11 @@ def create_product(self): Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing or longer than + - Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - - Returns INVALID\_ARGUMENT if description is longer than 4096 + - Returns INVALID_ARGUMENT if description is longer than 4096 characters. - - Returns INVALID\_ARGUMENT if product\_category is missing or invalid. + - Returns INVALID_ARGUMENT if product_category is missing or invalid. Returns: Callable: A callable which accepts the appropriate @@ -238,7 +297,7 @@ def list_products(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Returns: @@ -256,7 +315,7 @@ def get_product(self): Possible errors: - - Returns NOT\_FOUND if the Product does not exist. + - Returns NOT_FOUND if the Product does not exist. Returns: Callable: A callable which accepts the appropriate @@ -277,13 +336,13 @@ def update_product(self): Possible errors: - - Returns NOT\_FOUND if the Product does not exist. - - Returns INVALID\_ARGUMENT if display\_name 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. + - 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: Callable: A callable which accepts the appropriate @@ -317,7 +376,7 @@ def create_reference_image(self): 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 + 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. @@ -326,13 +385,13 @@ def create_reference_image(self): Possible errors: - - Returns INVALID\_ARGUMENT if the image\_uri is missing or longer than + - 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 + - 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 + - Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. Returns: @@ -369,8 +428,8 @@ def list_reference_images(self): Possible errors: - - Returns NOT\_FOUND if the parent product does not exist. - - Returns INVALID\_ARGUMENT if the page\_size is greater than 100, or + - 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: @@ -388,7 +447,7 @@ def get_reference_image(self): Possible errors: - - Returns NOT\_FOUND if the specified image does not exist. + - Returns NOT_FOUND if the specified image does not exist. Returns: Callable: A callable which accepts the appropriate @@ -401,14 +460,14 @@ def get_reference_image(self): def add_product_to_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.add_product_to_product_set`. - Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + Adds a Product to the specified ProductSet. If the Product is + already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: - - Returns NOT\_FOUND if the Product or the ProductSet doesn't exist. + - Returns NOT_FOUND if the Product or the ProductSet doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -440,7 +499,7 @@ def list_products_in_product_set(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Returns: @@ -449,62 +508,3 @@ def list_products_in_product_set(self): deserialized response object. """ return self._stubs["product_search_stub"].ListProductsInProductSet - - @property - def import_product_sets(self): - """Return the gRPC stub for :meth:`ProductSearchClient.import_product_sets`. - - Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. - - The ``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``. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - 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/google/cloud/vision_v1/proto/geometry_pb2.py b/google/cloud/vision_v1/proto/geometry_pb2.py index 58881e7f..9629f858 100644 --- a/google/cloud/vision_v1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1/proto/geometry_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1/proto/geometry.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,13 +19,10 @@ name="google/cloud/vision_v1/proto/geometry.proto", package="google.cloud.vision.v1", syntax="proto3", - serialized_options=_b( - "\n\032com.google.cloud.vision.v1B\rGeometryProtoP\001Z\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x42\n\tlandmarks\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1.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:\n\x0ejoy_likelihood\x18\t \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12=\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12<\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12?\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x44\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12>\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12?\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x1a\xb9\x07\n\x08Landmark\x12\x42\n\x04type\x18\x03 \x01(\x0e\x32\x34.google.cloud.vision.v1.FaceAnnotation.Landmark.Type\x12\x32\n\x08position\x18\x04 \x01(\x0b\x32 .google.cloud.vision.v1.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"\xab\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;\n\rbounding_poly\x18\x07 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x37\n\tlocations\x18\x08 \x03(\x0b\x32$.google.cloud.vision.v1.LocationInfo\x12\x34\n\nproperties\x18\t \x03(\x0b\x32 .google.cloud.vision.v1.Property"\x99\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;\n\rbounding_poly\x18\x05 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly"\xb8\x03\n\x14SafeSearchAnnotation\x12\x31\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x31\n\x05spoof\x18\x02 \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x33\n\x07medical\x18\x03 \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x34\n\x08violence\x18\x04 \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x30\n\x04racy\x18\t \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x18\n\x10\x61\x64ult_confidence\x18\x10 \x01(\x02\x12\x18\n\x10spoof_confidence\x18\x12 \x01(\x02\x12\x1a\n\x12medical_confidence\x18\x14 \x01(\x02\x12\x1b\n\x13violence_confidence\x18\x16 \x01(\x02\x12\x17\n\x0fracy_confidence\x18\x18 \x01(\x02\x12\x17\n\x0fnsfw_confidence\x18\x1a \x01(\x02"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"M\n\x18\x44ominantColorsAnnotation\x12\x31\n\x06\x63olors\x18\x01 \x03(\x0b\x32!.google.cloud.vision.v1.ColorInfo"\\\n\x0fImageProperties\x12I\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x30.google.cloud.vision.v1.DominantColorsAnnotation"x\n\x08\x43ropHint\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x1b\n\x13importance_fraction\x18\x03 \x01(\x02"K\n\x13\x43ropHintsAnnotation\x12\x34\n\ncrop_hints\x18\x01 \x03(\x0b\x32 .google.cloud.vision.v1.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"\xbc\x02\n\x0cImageContext\x12:\n\rlat_long_rect\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12\x42\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1.CropHintsParams\x12J\n\x15product_search_params\x18\x05 \x01(\x0b\x32+.google.cloud.vision.v1.ProductSearchParams\x12H\n\x14web_detection_params\x18\x06 \x01(\x0b\x32*.google.cloud.vision.v1.WebDetectionParams"\xb4\x01\n\x14\x41nnotateImageRequest\x12,\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.vision.v1.Image\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05"\xe4\x07\n\x15\x41nnotateImageResponse\x12@\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.FaceAnnotation\x12\x46\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x42\n\x10logo_annotations\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x43\n\x11label_annotations\x18\x04 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12W\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x31.google.cloud.vision.v1.LocalizedObjectAnnotation\x12\x42\n\x10text_annotations\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x44\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32&.google.cloud.vision.v1.TextAnnotation\x12L\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32,.google.cloud.vision.v1.SafeSearchAnnotation\x12L\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32\'.google.cloud.vision.v1.ImageProperties\x12J\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32+.google.cloud.vision.v1.CropHintsAnnotation\x12;\n\rweb_detection\x18\r \x01(\x0b\x32$.google.cloud.vision.v1.WebDetection\x12L\n\x16product_search_results\x18\x0e \x01(\x0b\x32,.google.cloud.vision.v1.ProductSearchResults\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\x12?\n\x07\x63ontext\x18\x15 \x01(\x0b\x32..google.cloud.vision.v1.ImageAnnotationContext"q\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t"_\n\x1b\x42\x61tchAnnotateImagesResponse\x12@\n\tresponses\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse"\xcf\x01\n\x13\x41nnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12\r\n\x05pages\x18\x04 \x03(\x05"\xcb\x01\n\x14\x41nnotateFileResponse\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12@\n\tresponses\x18\x02 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse\x12\x13\n\x0btotal_pages\x18\x03 \x01(\x05\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status"o\n\x19\x42\x61tchAnnotateFilesRequest\x12\x42\n\x08requests\x18\x01 \x03(\x0b\x32+.google.cloud.vision.v1.AnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x03 \x01(\t"]\n\x1a\x42\x61tchAnnotateFilesResponse\x12?\n\tresponses\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateFileResponse"\x82\x02\n\x18\x41syncAnnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12;\n\routput_config\x18\x04 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig"X\n\x19\x41syncAnnotateFileResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig"\xb8\x01\n\x1f\x41syncBatchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12@\n\routput_config\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfigB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t"_\n AsyncBatchAnnotateImagesResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig"y\n\x1e\x41syncBatchAnnotateFilesRequest\x12G\n\x08requests\x18\x01 \x03(\x0b\x32\x30.google.cloud.vision.v1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t"g\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x44\n\tresponses\x18\x01 \x03(\x0b\x32\x31.google.cloud.vision.v1.AsyncAnnotateFileResponse"h\n\x0bInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.vision.v1.GcsSource\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t"c\n\x0cOutputConfig\x12?\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1.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"\x88\x02\n\x11OperationMetadata\x12>\n\x05state\x18\x01 \x01(\x0e\x32/.google.cloud.vision.v1.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\xf5\n\n\x0eImageAnnotator\x12\x93\x02\n\x13\x42\x61tchAnnotateImages\x12\x32.google.cloud.vision.v1.BatchAnnotateImagesRequest\x1a\x33.google.cloud.vision.v1.BatchAnnotateImagesResponse"\x92\x01\x82\xd3\xe4\x93\x02\x80\x01"\x13/v1/images:annotate:\x01*Z8"3/v1/{parent=projects/*/locations/*}/images:annotate:\x01*Z,"\'/v1/{parent=projects/*}/images:annotate:\x01*\xda\x41\x08requests\x12\x8c\x02\n\x12\x42\x61tchAnnotateFiles\x12\x31.google.cloud.vision.v1.BatchAnnotateFilesRequest\x1a\x32.google.cloud.vision.v1.BatchAnnotateFilesResponse"\x8e\x01\x82\xd3\xe4\x93\x02}"\x12/v1/files:annotate:\x01*Z7"2/v1/{parent=projects/*/locations/*}/files:annotate:\x01*Z+"&/v1/{parent=projects/*}/files:annotate:\x01*\xda\x41\x08requests\x12\xeb\x02\n\x18\x41syncBatchAnnotateImages\x12\x37.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest\x1a\x1d.google.longrunning.Operation"\xf6\x01\x82\xd3\xe4\x93\x02\x9e\x01"\x1d/v1/images:asyncBatchAnnotate:\x01*ZB"=/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate:\x01*Z6"1/v1/{parent=projects/*}/images:asyncBatchAnnotate:\x01*\xda\x41\x16requests,output_config\xca\x41\x35\n AsyncBatchAnnotateImagesResponse\x12\x11OperationMetadata\x12\xd7\x02\n\x17\x41syncBatchAnnotateFiles\x12\x36.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation"\xe4\x01\x82\xd3\xe4\x93\x02\x9b\x01"\x1c/v1/files:asyncBatchAnnotate:\x01*ZA"\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x42\n\tlandmarks\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1.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:\n\x0ejoy_likelihood\x18\t \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12=\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12<\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12?\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x44\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12>\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12?\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x1a\xb9\x07\n\x08Landmark\x12\x42\n\x04type\x18\x03 \x01(\x0e\x32\x34.google.cloud.vision.v1.FaceAnnotation.Landmark.Type\x12\x32\n\x08position\x18\x04 \x01(\x0b\x32 .google.cloud.vision.v1.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"\xab\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;\n\rbounding_poly\x18\x07 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x37\n\tlocations\x18\x08 \x03(\x0b\x32$.google.cloud.vision.v1.LocationInfo\x12\x34\n\nproperties\x18\t \x03(\x0b\x32 .google.cloud.vision.v1.Property"\x99\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;\n\rbounding_poly\x18\x05 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly"\xb8\x03\n\x14SafeSearchAnnotation\x12\x31\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x31\n\x05spoof\x18\x02 \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x33\n\x07medical\x18\x03 \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x34\n\x08violence\x18\x04 \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x30\n\x04racy\x18\t \x01(\x0e\x32".google.cloud.vision.v1.Likelihood\x12\x18\n\x10\x61\x64ult_confidence\x18\x10 \x01(\x02\x12\x18\n\x10spoof_confidence\x18\x12 \x01(\x02\x12\x1a\n\x12medical_confidence\x18\x14 \x01(\x02\x12\x1b\n\x13violence_confidence\x18\x16 \x01(\x02\x12\x17\n\x0fracy_confidence\x18\x18 \x01(\x02\x12\x17\n\x0fnsfw_confidence\x18\x1a \x01(\x02"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"M\n\x18\x44ominantColorsAnnotation\x12\x31\n\x06\x63olors\x18\x01 \x03(\x0b\x32!.google.cloud.vision.v1.ColorInfo"\\\n\x0fImageProperties\x12I\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x30.google.cloud.vision.v1.DominantColorsAnnotation"x\n\x08\x43ropHint\x12;\n\rbounding_poly\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12\x1b\n\x13importance_fraction\x18\x03 \x01(\x02"K\n\x13\x43ropHintsAnnotation\x12\x34\n\ncrop_hints\x18\x01 \x03(\x0b\x32 .google.cloud.vision.v1.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"\xbc\x02\n\x0cImageContext\x12:\n\rlat_long_rect\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12\x42\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1.CropHintsParams\x12J\n\x15product_search_params\x18\x05 \x01(\x0b\x32+.google.cloud.vision.v1.ProductSearchParams\x12H\n\x14web_detection_params\x18\x06 \x01(\x0b\x32*.google.cloud.vision.v1.WebDetectionParams"\xb4\x01\n\x14\x41nnotateImageRequest\x12,\n\x05image\x18\x01 \x01(\x0b\x32\x1d.google.cloud.vision.v1.Image\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05"\xe4\x07\n\x15\x41nnotateImageResponse\x12@\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1.FaceAnnotation\x12\x46\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x42\n\x10logo_annotations\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x43\n\x11label_annotations\x18\x04 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12W\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x31.google.cloud.vision.v1.LocalizedObjectAnnotation\x12\x42\n\x10text_annotations\x18\x05 \x03(\x0b\x32(.google.cloud.vision.v1.EntityAnnotation\x12\x44\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32&.google.cloud.vision.v1.TextAnnotation\x12L\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32,.google.cloud.vision.v1.SafeSearchAnnotation\x12L\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32\'.google.cloud.vision.v1.ImageProperties\x12J\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32+.google.cloud.vision.v1.CropHintsAnnotation\x12;\n\rweb_detection\x18\r \x01(\x0b\x32$.google.cloud.vision.v1.WebDetection\x12L\n\x16product_search_results\x18\x0e \x01(\x0b\x32,.google.cloud.vision.v1.ProductSearchResults\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status\x12?\n\x07\x63ontext\x18\x15 \x01(\x0b\x32..google.cloud.vision.v1.ImageAnnotationContext"q\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t"_\n\x1b\x42\x61tchAnnotateImagesResponse\x12@\n\tresponses\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse"\xcf\x01\n\x13\x41nnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12\r\n\x05pages\x18\x04 \x03(\x05"\xcb\x01\n\x14\x41nnotateFileResponse\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12@\n\tresponses\x18\x02 \x03(\x0b\x32-.google.cloud.vision.v1.AnnotateImageResponse\x12\x13\n\x0btotal_pages\x18\x03 \x01(\x05\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status"o\n\x19\x42\x61tchAnnotateFilesRequest\x12\x42\n\x08requests\x18\x01 \x03(\x0b\x32+.google.cloud.vision.v1.AnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x03 \x01(\t"]\n\x1a\x42\x61tchAnnotateFilesResponse\x12?\n\tresponses\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateFileResponse"\x82\x02\n\x18\x41syncAnnotateFileRequest\x12\x39\n\x0cinput_config\x18\x01 \x01(\x0b\x32#.google.cloud.vision.v1.InputConfig\x12\x31\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32\x1f.google.cloud.vision.v1.Feature\x12;\n\rimage_context\x18\x03 \x01(\x0b\x32$.google.cloud.vision.v1.ImageContext\x12;\n\routput_config\x18\x04 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig"X\n\x19\x41syncAnnotateFileResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig"\xb8\x01\n\x1f\x41syncBatchAnnotateImagesRequest\x12\x43\n\x08requests\x18\x01 \x03(\x0b\x32,.google.cloud.vision.v1.AnnotateImageRequestB\x03\xe0\x41\x02\x12@\n\routput_config\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfigB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t"_\n AsyncBatchAnnotateImagesResponse\x12;\n\routput_config\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1.OutputConfig"y\n\x1e\x41syncBatchAnnotateFilesRequest\x12G\n\x08requests\x18\x01 \x03(\x0b\x32\x30.google.cloud.vision.v1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02\x12\x0e\n\x06parent\x18\x04 \x01(\t"g\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x44\n\tresponses\x18\x01 \x03(\x0b\x32\x31.google.cloud.vision.v1.AsyncAnnotateFileResponse"h\n\x0bInputConfig\x12\x35\n\ngcs_source\x18\x01 \x01(\x0b\x32!.google.cloud.vision.v1.GcsSource\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t"c\n\x0cOutputConfig\x12?\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1.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"\x88\x02\n\x11OperationMetadata\x12>\n\x05state\x18\x01 \x01(\x0e\x32/.google.cloud.vision.v1.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\xf5\n\n\x0eImageAnnotator\x12\x93\x02\n\x13\x42\x61tchAnnotateImages\x12\x32.google.cloud.vision.v1.BatchAnnotateImagesRequest\x1a\x33.google.cloud.vision.v1.BatchAnnotateImagesResponse"\x92\x01\x82\xd3\xe4\x93\x02\x80\x01"\x13/v1/images:annotate:\x01*Z8"3/v1/{parent=projects/*/locations/*}/images:annotate:\x01*Z,"\'/v1/{parent=projects/*}/images:annotate:\x01*\xda\x41\x08requests\x12\x8c\x02\n\x12\x42\x61tchAnnotateFiles\x12\x31.google.cloud.vision.v1.BatchAnnotateFilesRequest\x1a\x32.google.cloud.vision.v1.BatchAnnotateFilesResponse"\x8e\x01\x82\xd3\xe4\x93\x02}"\x12/v1/files:annotate:\x01*Z7"2/v1/{parent=projects/*/locations/*}/files:annotate:\x01*Z+"&/v1/{parent=projects/*}/files:annotate:\x01*\xda\x41\x08requests\x12\xeb\x02\n\x18\x41syncBatchAnnotateImages\x12\x37.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest\x1a\x1d.google.longrunning.Operation"\xf6\x01\x82\xd3\xe4\x93\x02\x9e\x01"\x1d/v1/images:asyncBatchAnnotate:\x01*ZB"=/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate:\x01*Z6"1/v1/{parent=projects/*}/images:asyncBatchAnnotate:\x01*\xda\x41\x16requests,output_config\xca\x41\x35\n AsyncBatchAnnotateImagesResponse\x12\x11OperationMetadata\x12\xd7\x02\n\x17\x41syncBatchAnnotateFiles\x12\x36.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation"\xe4\x01\x82\xd3\xe4\x93\x02\x9b\x01"\x1c/v1/files:asyncBatchAnnotate:\x01*ZA"`__. crop_hints_params: Parameters for crop hints annotation request. @@ -4284,19 +4613,20 @@ Parameters for web detection. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageContext) - ), + }, ) _sym_db.RegisterMessage(ImageContext) AnnotateImageRequest = _reflection.GeneratedProtocolMessageType( "AnnotateImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGEREQUEST, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Request for performing Google Cloud Vision API tasks over a user- + { + "DESCRIPTOR": _ANNOTATEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Request for performing Google Cloud Vision API tasks over a user- provided image, with user-requested features, and with context information. + Attributes: image: The image to be processed. @@ -4306,18 +4636,19 @@ Additional context that may accompany the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateImageRequest) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageRequest) ImageAnnotationContext = _reflection.GeneratedProtocolMessageType( "ImageAnnotationContext", (_message.Message,), - dict( - DESCRIPTOR=_IMAGEANNOTATIONCONTEXT, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""If an image was produced from a file (e.g. a PDF), this message gives + { + "DESCRIPTOR": _IMAGEANNOTATIONCONTEXT, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image. + Attributes: uri: The URI of the file used to produce the image. @@ -4326,17 +4657,18 @@ number within the file used to produce the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.ImageAnnotationContext) - ), + }, ) _sym_db.RegisterMessage(ImageAnnotationContext) AnnotateImageResponse = _reflection.GeneratedProtocolMessageType( "AnnotateImageResponse", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGERESPONSE, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Response to an image annotation request. + { + "DESCRIPTOR": _ANNOTATEIMAGERESPONSE, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Response to an image annotation request. + Attributes: face_annotations: If present, face detection has completed successfully. @@ -4375,18 +4707,19 @@ where this image comes from. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateImageResponse) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageResponse) BatchAnnotateImagesRequest = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Multiple image annotation requests are batched into a single service call. + Attributes: requests: Required. Individual image annotation requests for this batch. @@ -4399,34 +4732,36 @@ Union. Example: ``projects/project-A/locations/eu``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateImagesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesRequest) BatchAnnotateImagesResponse = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESRESPONSE, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Response to a batch image annotation request. + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Response to a batch image annotation request. + Attributes: responses: Individual responses to image annotation requests within the batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateImagesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesResponse) AnnotateFileRequest = _reflection.GeneratedProtocolMessageType( "AnnotateFileRequest", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEFILEREQUEST, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""A request to annotate one single file, e.g. a PDF, TIFF or GIF file. + { + "DESCRIPTOR": _ANNOTATEFILEREQUEST, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """A request to annotate one single file, e.g. a PDF, TIFF or GIF file. + Attributes: input_config: Required. Information about the input file. @@ -4447,18 +4782,19 @@ file. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateFileRequest) - ), + }, ) _sym_db.RegisterMessage(AnnotateFileRequest) AnnotateFileResponse = _reflection.GeneratedProtocolMessageType( "AnnotateFileResponse", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEFILERESPONSE, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Response to a single file annotation request. A file may contain one + { + "DESCRIPTOR": _ANNOTATEFILERESPONSE, + "__module__": "google.cloud.vision_v1.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 @@ -4473,17 +4809,18 @@ The ``responses`` field will not be set in this case. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AnnotateFileResponse) - ), + }, ) _sym_db.RegisterMessage(AnnotateFileResponse) BatchAnnotateFilesRequest = _reflection.GeneratedProtocolMessageType( "BatchAnnotateFilesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEFILESREQUEST, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""A list of requests to annotate files using the BatchAnnotateFiles API. + { + "DESCRIPTOR": _BATCHANNOTATEFILESREQUEST, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """A list of requests to annotate files using the BatchAnnotateFiles API. + Attributes: requests: Required. The list of file annotation requests. Right now we @@ -4498,17 +4835,18 @@ Union. Example: ``projects/project-A/locations/eu``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateFilesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateFilesRequest) BatchAnnotateFilesResponse = _reflection.GeneratedProtocolMessageType( "BatchAnnotateFilesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEFILESRESPONSE, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""A list of file annotation responses. + { + "DESCRIPTOR": _BATCHANNOTATEFILESRESPONSE, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """A list of file annotation responses. + Attributes: responses: The list of file annotation responses, each response @@ -4516,17 +4854,18 @@ BatchAnnotateFilesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.BatchAnnotateFilesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateFilesResponse) AsyncAnnotateFileRequest = _reflection.GeneratedProtocolMessageType( "AsyncAnnotateFileRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCANNOTATEFILEREQUEST, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""An offline file annotation request. + { + "DESCRIPTOR": _ASYNCANNOTATEFILEREQUEST, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """An offline file annotation request. + Attributes: input_config: Required. Information about the input file. @@ -4536,44 +4875,46 @@ Additional context that may accompany the image(s) in the file. output_config: - Required. The desired output location and metadata (e.g. - format). + Required. The desired output location and metadata + (e.g. format). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncAnnotateFileRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncAnnotateFileRequest) AsyncAnnotateFileResponse = _reflection.GeneratedProtocolMessageType( "AsyncAnnotateFileResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCANNOTATEFILERESPONSE, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""The response for a single offline file annotation request. + { + "DESCRIPTOR": _ASYNCANNOTATEFILERESPONSE, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """The response for a single offline file annotation request. + Attributes: output_config: The output location and metadata from AsyncAnnotateFileRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncAnnotateFileResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncAnnotateFileResponse) AsyncBatchAnnotateImagesRequest = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEIMAGESREQUEST, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Request for async image annotation for a list of images. + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Request for async image annotation for a list of images. + Attributes: requests: Required. Individual image annotation requests for this batch. output_config: - Required. The desired output location and metadata (e.g. - format). + Required. The desired output location and metadata + (e.g. format). parent: Optional. Target project and location to make a call. Format: ``projects/{project-id}/locations/{location-id}``. If no @@ -4583,35 +4924,37 @@ Union. Example: ``projects/project-A/locations/eu``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateImagesRequest) AsyncBatchAnnotateImagesResponse = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEIMAGESRESPONSE, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Response to an async batch image annotation request. + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Response to an async batch image annotation request. + Attributes: output_config: The output location and metadata from AsyncBatchAnnotateImagesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateImagesResponse) AsyncBatchAnnotateFilesRequest = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateFilesRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEFILESREQUEST, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Multiple async file annotation requests are batched into a single + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEFILESREQUEST, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Multiple async file annotation requests are batched into a single service call. + Attributes: requests: Required. Individual async file annotation requests for this @@ -4625,34 +4968,36 @@ Union. Example: ``projects/project-A/locations/eu``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateFilesRequest) AsyncBatchAnnotateFilesResponse = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateFilesResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEFILESRESPONSE, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Response to an async batch file annotation request. + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEFILESRESPONSE, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Response to an async batch file annotation request. + Attributes: responses: The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateFilesResponse) InputConfig = _reflection.GeneratedProtocolMessageType( "InputConfig", (_message.Message,), - dict( - DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""The desired input location and metadata. + { + "DESCRIPTOR": _INPUTCONFIG, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """The desired input location and metadata. + Attributes: gcs_source: The Google Cloud Storage location to read the input from. @@ -4664,22 +5009,23 @@ requests. It does not work for AsyncBatchAnnotateFiles requests. mime_type: - The type of the file. Currently only "application/pdf", - "image/tiff" and "image/gif" are supported. Wildcards are not + 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.v1.InputConfig) - ), + }, ) _sym_db.RegisterMessage(InputConfig) OutputConfig = _reflection.GeneratedProtocolMessageType( "OutputConfig", (_message.Message,), - dict( - DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""The desired output location and metadata. + { + "DESCRIPTOR": _OUTPUTCONFIG, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """The desired output location and metadata. + Attributes: gcs_destination: The Google Cloud Storage location to write the output(s) to. @@ -4690,22 +5036,23 @@ pdf file with 100 pages, 100 response protos will be generated. If ``batch_size`` = 20, then 5 json files each containing 20 response protos will be written under the prefix - ``gcs_destination``.\ ``uri``. Currently, batch\_size only + ``gcs_destination``.\ ``uri``. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.OutputConfig) - ), + }, ) _sym_db.RegisterMessage(OutputConfig) GcsSource = _reflection.GeneratedProtocolMessageType( "GcsSource", (_message.Message,), - dict( - DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""The Google Cloud Storage location where the input will be read from. + { + "DESCRIPTOR": _GCSSOURCE, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """The Google Cloud Storage location where the input will be read from. + Attributes: uri: Google Cloud Storage URI for the input file. This must only be @@ -4713,17 +5060,18 @@ supported. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GcsSource) - ), + }, ) _sym_db.RegisterMessage(GcsSource) GcsDestination = _reflection.GeneratedProtocolMessageType( "GcsDestination", (_message.Message,), - dict( - DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""The Google Cloud Storage location where the output will be written to. + { + "DESCRIPTOR": _GCSDESTINATION, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """The Google Cloud Storage location where the output will be written to. + Attributes: uri: Google Cloud Storage URI prefix where the results will be @@ -4735,7 +5083,7 @@ 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". - + 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 @@ -4747,17 +5095,18 @@ multiple sharded files. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.GcsDestination) - ), + }, ) _sym_db.RegisterMessage(GcsDestination) OperationMetadata = _reflection.GeneratedProtocolMessageType( "OperationMetadata", (_message.Message,), - dict( - DESCRIPTOR=_OPERATIONMETADATA, - __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Contains metadata for the BatchAnnotateImages operation. + { + "DESCRIPTOR": _OPERATIONMETADATA, + "__module__": "google.cloud.vision_v1.proto.image_annotator_pb2", + "__doc__": """Contains metadata for the BatchAnnotateImages operation. + Attributes: state: Current state of the batch operation. @@ -4767,7 +5116,7 @@ The time when the operation result was last updated. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.OperationMetadata) - ), + }, ) _sym_db.RegisterMessage(OperationMetadata) @@ -4785,9 +5134,8 @@ full_name="google.cloud.vision.v1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" - ), + serialized_options=b"\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision", + create_key=_descriptor._internal_create_key, serialized_start=8376, serialized_end=9773, methods=[ @@ -4798,9 +5146,8 @@ containing_service=None, input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\200\001"\023/v1/images:annotate:\001*Z8"3/v1/{parent=projects/*/locations/*}/images:annotate:\001*Z,"\'/v1/{parent=projects/*}/images:annotate:\001*\332A\010requests' - ), + serialized_options=b'\202\323\344\223\002\200\001"\023/v1/images:annotate:\001*Z8"3/v1/{parent=projects/*/locations/*}/images:annotate:\001*Z,"\'/v1/{parent=projects/*}/images:annotate:\001*\332A\010requests', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchAnnotateFiles", @@ -4809,9 +5156,8 @@ containing_service=None, input_type=_BATCHANNOTATEFILESREQUEST, output_type=_BATCHANNOTATEFILESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002}"\022/v1/files:annotate:\001*Z7"2/v1/{parent=projects/*/locations/*}/files:annotate:\001*Z+"&/v1/{parent=projects/*}/files:annotate:\001*\332A\010requests' - ), + serialized_options=b'\202\323\344\223\002}"\022/v1/files:annotate:\001*Z7"2/v1/{parent=projects/*/locations/*}/files:annotate:\001*Z+"&/v1/{parent=projects/*}/files:annotate:\001*\332A\010requests', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AsyncBatchAnnotateImages", @@ -4820,9 +5166,8 @@ containing_service=None, input_type=_ASYNCBATCHANNOTATEIMAGESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\236\001"\035/v1/images:asyncBatchAnnotate:\001*ZB"=/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate:\001*Z6"1/v1/{parent=projects/*}/images:asyncBatchAnnotate:\001*\332A\026requests,output_config\312A5\n AsyncBatchAnnotateImagesResponse\022\021OperationMetadata' - ), + serialized_options=b'\202\323\344\223\002\236\001"\035/v1/images:asyncBatchAnnotate:\001*ZB"=/v1/{parent=projects/*/locations/*}/images:asyncBatchAnnotate:\001*Z6"1/v1/{parent=projects/*}/images:asyncBatchAnnotate:\001*\332A\026requests,output_config\312A5\n AsyncBatchAnnotateImagesResponse\022\021OperationMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AsyncBatchAnnotateFiles", @@ -4831,9 +5176,8 @@ containing_service=None, input_type=_ASYNCBATCHANNOTATEFILESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002\233\001"\034/v1/files:asyncBatchAnnotate:\001*ZA""//v1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\xda\x41!parent,product_set,product_set_id\x12\xb4\x01\n\x0fListProductSets\x12..google.cloud.vision.v1.ListProductSetsRequest\x1a/.google.cloud.vision.v1.ListProductSetsResponse"@\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/productSets\xda\x41\x06parent\x12\xa1\x01\n\rGetProductSet\x12,.google.cloud.vision.v1.GetProductSetRequest\x1a".google.cloud.vision.v1.ProductSet">\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xd3\x01\n\x10UpdateProductSet\x12/.google.cloud.vision.v1.UpdateProductSetRequest\x1a".google.cloud.vision.v1.ProductSet"j\x82\xd3\xe4\x93\x02J2;/v1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\xda\x41\x17product_set,update_mask\x12\x9b\x01\n\x10\x44\x65leteProductSet\x12/.google.cloud.vision.v1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty">\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xb9\x01\n\rCreateProduct\x12,.google.cloud.vision.v1.CreateProductRequest\x1a\x1f.google.cloud.vision.v1.Product"Y\x82\xd3\xe4\x93\x02\x37",/v1/{parent=projects/*/locations/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xa8\x01\n\x0cListProducts\x12+.google.cloud.vision.v1.ListProductsRequest\x1a,.google.cloud.vision.v1.ListProductsResponse"=\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/products\xda\x41\x06parent\x12\x95\x01\n\nGetProduct\x12).google.cloud.vision.v1.GetProductRequest\x1a\x1f.google.cloud.vision.v1.Product";\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xbb\x01\n\rUpdateProduct\x12,.google.cloud.vision.v1.UpdateProductRequest\x1a\x1f.google.cloud.vision.v1.Product"[\x82\xd3\xe4\x93\x02?24/v1/{product.name=projects/*/locations/*/products/*}:\x07product\xda\x41\x13product,update_mask\x12\x92\x01\n\rDeleteProduct\x12,.google.cloud.vision.v1.DeleteProductRequest\x1a\x16.google.protobuf.Empty";\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xf9\x01\n\x14\x43reateReferenceImage\x12\x33.google.cloud.vision.v1.CreateReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage"\x83\x01\x82\xd3\xe4\x93\x02Q">/v1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\xda\x41)parent,reference_image,reference_image_id\x12\xb2\x01\n\x14\x44\x65leteReferenceImage\x12\x33.google.cloud.vision.v1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty"M\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xcf\x01\n\x13ListReferenceImages\x12\x32.google.cloud.vision.v1.ListReferenceImagesRequest\x1a\x33.google.cloud.vision.v1.ListReferenceImagesResponse"O\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/products/*}/referenceImages\xda\x41\x06parent\x12\xbc\x01\n\x11GetReferenceImage\x12\x30.google.cloud.vision.v1.GetReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage"M\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xbd\x01\n\x16\x41\x64\x64ProductToProductSet\x12\x35.google.cloud.vision.v1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty"T\x82\xd3\xe4\x93\x02?":/v1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\xda\x41\x0cname,product\x12\xca\x01\n\x1bRemoveProductFromProductSet\x12:.google.cloud.vision.v1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty"W\x82\xd3\xe4\x93\x02\x42"=/v1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\xda\x41\x0cname,product\x12\xd6\x01\n\x18ListProductsInProductSet\x12\x37.google.cloud.vision.v1.ListProductsInProductSetRequest\x1a\x38.google.cloud.vision.v1.ListProductsInProductSetResponse"G\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/productSets/*}/products\xda\x41\x04name\x12\xf4\x01\n\x11ImportProductSets\x12\x30.google.cloud.vision.v1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation"\x8d\x01\x82\xd3\xe4\x93\x02;"6/v1/{parent=projects/*/locations/*}/productSets:import:\x01*\xda\x41\x13parent,input_config\xca\x41\x33\n\x19ImportProductSetsResponse\x12\x16\x42\x61tchOperationMetadata\x12\xd6\x01\n\rPurgeProducts\x12,.google.cloud.vision.v1.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation"x\x82\xd3\xe4\x93\x02\x37"2/v1/{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\x81\x01\n\x1a\x63om.google.cloud.vision.v1B\x19ProductSearchServiceProtoP\x01Z"//v1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\xda\x41!parent,product_set,product_set_id\x12\xb4\x01\n\x0fListProductSets\x12..google.cloud.vision.v1.ListProductSetsRequest\x1a/.google.cloud.vision.v1.ListProductSetsResponse"@\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/productSets\xda\x41\x06parent\x12\xa1\x01\n\rGetProductSet\x12,.google.cloud.vision.v1.GetProductSetRequest\x1a".google.cloud.vision.v1.ProductSet">\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xd3\x01\n\x10UpdateProductSet\x12/.google.cloud.vision.v1.UpdateProductSetRequest\x1a".google.cloud.vision.v1.ProductSet"j\x82\xd3\xe4\x93\x02J2;/v1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\xda\x41\x17product_set,update_mask\x12\x9b\x01\n\x10\x44\x65leteProductSet\x12/.google.cloud.vision.v1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty">\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xb9\x01\n\rCreateProduct\x12,.google.cloud.vision.v1.CreateProductRequest\x1a\x1f.google.cloud.vision.v1.Product"Y\x82\xd3\xe4\x93\x02\x37",/v1/{parent=projects/*/locations/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xa8\x01\n\x0cListProducts\x12+.google.cloud.vision.v1.ListProductsRequest\x1a,.google.cloud.vision.v1.ListProductsResponse"=\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/products\xda\x41\x06parent\x12\x95\x01\n\nGetProduct\x12).google.cloud.vision.v1.GetProductRequest\x1a\x1f.google.cloud.vision.v1.Product";\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xbb\x01\n\rUpdateProduct\x12,.google.cloud.vision.v1.UpdateProductRequest\x1a\x1f.google.cloud.vision.v1.Product"[\x82\xd3\xe4\x93\x02?24/v1/{product.name=projects/*/locations/*/products/*}:\x07product\xda\x41\x13product,update_mask\x12\x92\x01\n\rDeleteProduct\x12,.google.cloud.vision.v1.DeleteProductRequest\x1a\x16.google.protobuf.Empty";\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xf9\x01\n\x14\x43reateReferenceImage\x12\x33.google.cloud.vision.v1.CreateReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage"\x83\x01\x82\xd3\xe4\x93\x02Q">/v1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\xda\x41)parent,reference_image,reference_image_id\x12\xb2\x01\n\x14\x44\x65leteReferenceImage\x12\x33.google.cloud.vision.v1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty"M\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xcf\x01\n\x13ListReferenceImages\x12\x32.google.cloud.vision.v1.ListReferenceImagesRequest\x1a\x33.google.cloud.vision.v1.ListReferenceImagesResponse"O\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/products/*}/referenceImages\xda\x41\x06parent\x12\xbc\x01\n\x11GetReferenceImage\x12\x30.google.cloud.vision.v1.GetReferenceImageRequest\x1a&.google.cloud.vision.v1.ReferenceImage"M\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xbd\x01\n\x16\x41\x64\x64ProductToProductSet\x12\x35.google.cloud.vision.v1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty"T\x82\xd3\xe4\x93\x02?":/v1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\xda\x41\x0cname,product\x12\xca\x01\n\x1bRemoveProductFromProductSet\x12:.google.cloud.vision.v1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty"W\x82\xd3\xe4\x93\x02\x42"=/v1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\xda\x41\x0cname,product\x12\xd6\x01\n\x18ListProductsInProductSet\x12\x37.google.cloud.vision.v1.ListProductsInProductSetRequest\x1a\x38.google.cloud.vision.v1.ListProductsInProductSetResponse"G\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/productSets/*}/products\xda\x41\x04name\x12\xf4\x01\n\x11ImportProductSets\x12\x30.google.cloud.vision.v1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation"\x8d\x01\x82\xd3\xe4\x93\x02;"6/v1/{parent=projects/*/locations/*}/productSets:import:\x01*\xda\x41\x13parent,input_config\xca\x41\x33\n\x19ImportProductSetsResponse\x12\x16\x42\x61tchOperationMetadata\x12\xd6\x01\n\rPurgeProducts\x12,.google.cloud.vision.v1.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation"x\x82\xd3\xe4\x93\x02\x37"2/v1/{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\x81\x01\n\x1a\x63om.google.cloud.vision.v1B\x19ProductSearchServiceProtoP\x01Z"//v1/{parent=projects/*/locations/*}/productSets:\013product_set\332A!parent,product_set,product_set_id' - ), + serialized_options=b'\202\323\344\223\002>"//v1/{parent=projects/*/locations/*}/productSets:\013product_set\332A!parent,product_set,product_set_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProductSets", @@ -3069,9 +3186,8 @@ containing_service=None, input_type=_LISTPRODUCTSETSREQUEST, output_type=_LISTPRODUCTSETSRESPONSE, - serialized_options=_b( - "\202\323\344\223\0021\022//v1/{parent=projects/*/locations/*}/productSets\332A\006parent" - ), + serialized_options=b"\202\323\344\223\0021\022//v1/{parent=projects/*/locations/*}/productSets\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetProductSet", @@ -3080,9 +3196,8 @@ containing_service=None, input_type=_GETPRODUCTSETREQUEST, output_type=_PRODUCTSET, - serialized_options=_b( - "\202\323\344\223\0021\022//v1/{name=projects/*/locations/*/productSets/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0021\022//v1/{name=projects/*/locations/*/productSets/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateProductSet", @@ -3091,9 +3206,8 @@ containing_service=None, input_type=_UPDATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, - serialized_options=_b( - "\202\323\344\223\002J2;/v1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set\332A\027product_set,update_mask" - ), + serialized_options=b"\202\323\344\223\002J2;/v1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set\332A\027product_set,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteProductSet", @@ -3102,9 +3216,8 @@ containing_service=None, input_type=_DELETEPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\0021*//v1/{name=projects/*/locations/*/productSets/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0021*//v1/{name=projects/*/locations/*/productSets/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateProduct", @@ -3113,9 +3226,8 @@ containing_service=None, input_type=_CREATEPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - '\202\323\344\223\0027",/v1/{parent=projects/*/locations/*}/products:\007product\332A\031parent,product,product_id' - ), + serialized_options=b'\202\323\344\223\0027",/v1/{parent=projects/*/locations/*}/products:\007product\332A\031parent,product,product_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProducts", @@ -3124,9 +3236,8 @@ containing_service=None, input_type=_LISTPRODUCTSREQUEST, output_type=_LISTPRODUCTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\002.\022,/v1/{parent=projects/*/locations/*}/products\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002.\022,/v1/{parent=projects/*/locations/*}/products\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetProduct", @@ -3135,9 +3246,8 @@ containing_service=None, input_type=_GETPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - "\202\323\344\223\002.\022,/v1/{name=projects/*/locations/*/products/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002.\022,/v1/{name=projects/*/locations/*/products/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateProduct", @@ -3146,9 +3256,8 @@ containing_service=None, input_type=_UPDATEPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - "\202\323\344\223\002?24/v1/{product.name=projects/*/locations/*/products/*}:\007product\332A\023product,update_mask" - ), + serialized_options=b"\202\323\344\223\002?24/v1/{product.name=projects/*/locations/*/products/*}:\007product\332A\023product,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteProduct", @@ -3157,9 +3266,8 @@ containing_service=None, input_type=_DELETEPRODUCTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002.*,/v1/{name=projects/*/locations/*/products/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002.*,/v1/{name=projects/*/locations/*/products/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateReferenceImage", @@ -3168,9 +3276,8 @@ containing_service=None, input_type=_CREATEREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, - serialized_options=_b( - '\202\323\344\223\002Q">/v1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image\332A)parent,reference_image,reference_image_id' - ), + serialized_options=b'\202\323\344\223\002Q">/v1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image\332A)parent,reference_image,reference_image_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteReferenceImage", @@ -3179,9 +3286,8 @@ containing_service=None, input_type=_DELETEREFERENCEIMAGEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002@*>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002@*>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListReferenceImages", @@ -3190,9 +3296,8 @@ containing_service=None, input_type=_LISTREFERENCEIMAGESREQUEST, output_type=_LISTREFERENCEIMAGESRESPONSE, - serialized_options=_b( - "\202\323\344\223\002@\022>/v1/{parent=projects/*/locations/*/products/*}/referenceImages\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002@\022>/v1/{parent=projects/*/locations/*/products/*}/referenceImages\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetReferenceImage", @@ -3201,9 +3306,8 @@ containing_service=None, input_type=_GETREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, - serialized_options=_b( - "\202\323\344\223\002@\022>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002@\022>/v1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AddProductToProductSet", @@ -3212,9 +3316,8 @@ containing_service=None, input_type=_ADDPRODUCTTOPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - '\202\323\344\223\002?":/v1/{name=projects/*/locations/*/productSets/*}:addProduct:\001*\332A\014name,product' - ), + serialized_options=b'\202\323\344\223\002?":/v1/{name=projects/*/locations/*/productSets/*}:addProduct:\001*\332A\014name,product', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="RemoveProductFromProductSet", @@ -3223,9 +3326,8 @@ containing_service=None, input_type=_REMOVEPRODUCTFROMPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - '\202\323\344\223\002B"=/v1/{name=projects/*/locations/*/productSets/*}:removeProduct:\001*\332A\014name,product' - ), + serialized_options=b'\202\323\344\223\002B"=/v1/{name=projects/*/locations/*/productSets/*}:removeProduct:\001*\332A\014name,product', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProductsInProductSet", @@ -3234,9 +3336,8 @@ containing_service=None, input_type=_LISTPRODUCTSINPRODUCTSETREQUEST, output_type=_LISTPRODUCTSINPRODUCTSETRESPONSE, - serialized_options=_b( - "\202\323\344\223\002:\0228/v1/{name=projects/*/locations/*/productSets/*}/products\332A\004name" - ), + serialized_options=b"\202\323\344\223\002:\0228/v1/{name=projects/*/locations/*/productSets/*}/products\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ImportProductSets", @@ -3245,9 +3346,8 @@ containing_service=None, input_type=_IMPORTPRODUCTSETSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002;"6/v1/{parent=projects/*/locations/*}/productSets:import:\001*\332A\023parent,input_config\312A3\n\031ImportProductSetsResponse\022\026BatchOperationMetadata' - ), + serialized_options=b'\202\323\344\223\002;"6/v1/{parent=projects/*/locations/*}/productSets:import:\001*\332A\023parent,input_config\312A3\n\031ImportProductSetsResponse\022\026BatchOperationMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="PurgeProducts", @@ -3256,9 +3356,8 @@ containing_service=None, input_type=_PURGEPRODUCTSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\0027"2/v1/{parent=projects/*/locations/*}/products:purge:\001*\332A\006parent\312A/\n\025google.protobuf.Empty\022\026BatchOperationMetadata' - ), + serialized_options=b'\202\323\344\223\0027"2/v1/{parent=projects/*/locations/*}/products:purge:\001*\332A\006parent\312A/\n\025google.protobuf.Empty\022\026BatchOperationMetadata', + create_key=_descriptor._internal_create_key, ), ], ) 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..61dd1660 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 @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.vision_v1.proto import ( @@ -12,27 +13,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 +133,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 +163,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 +175,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 +210,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 +224,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 +235,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 +267,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 +278,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 +303,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 +316,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 +329,91 @@ 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. - """ + """ 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!") @@ -520,3 +521,535 @@ def add_ProductSearchServicer_to_server(servicer, server): "google.cloud.vision.v1.ProductSearch", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ProductSearch(object): + """Manages Products and ProductSets of reference images for use in product + search. It uses the following resource model: + + - The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. + + In parallel, + + - The API has a collection of [Product][google.cloud.vision.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/*` + """ + + @staticmethod + def CreateProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/CreateProductSet", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.CreateProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProductSets( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/ListProductSets", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ListProductSetsRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ListProductSetsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/GetProductSet", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.GetProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/UpdateProductSet", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.UpdateProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/DeleteProductSet", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.DeleteProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/CreateProduct", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.CreateProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProducts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/ListProducts", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ListProductsRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ListProductsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/GetProduct", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.GetProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/UpdateProduct", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.UpdateProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/DeleteProduct", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.DeleteProductRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/CreateReferenceImage", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.CreateReferenceImageRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ReferenceImage.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/DeleteReferenceImage", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.DeleteReferenceImageRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListReferenceImages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/ListReferenceImages", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ListReferenceImagesRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ListReferenceImagesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/GetReferenceImage", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.GetReferenceImageRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ReferenceImage.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def AddProductToProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/AddProductToProductSet", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.AddProductToProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def RemoveProductFromProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/RemoveProductFromProductSet", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.RemoveProductFromProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProductsInProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/ListProductsInProductSet", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ListProductsInProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ListProductsInProductSetResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ImportProductSets( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/ImportProductSets", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.ImportProductSetsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def PurgeProducts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1.ProductSearch/PurgeProducts", + google_dot_cloud_dot_vision__v1_dot_proto_dot_product__search__service__pb2.PurgeProductsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/vision_v1/proto/text_annotation_pb2.py b/google/cloud/vision_v1/proto/text_annotation_pb2.py index 2f416448..24a4021b 100644 --- a/google/cloud/vision_v1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1/proto/text_annotation_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1/proto/text_annotation.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -25,12 +22,9 @@ name="google/cloud/vision_v1/proto/text_annotation.proto", package="google.cloud.vision.v1", syntax="proto3", - serialized_options=_b( - "\n\032com.google.cloud.vision.v1B\023TextAnnotationProtoP\001Z.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xb1\x01\n\x0cTextProperty\x12S\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1.TextAnnotation.DetectedLanguage\x12L\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.TextAnnotation.DetectedBreak"\xaf\x01\n\x04Page\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12-\n\x06\x62locks\x18\x04 \x03(\x0b\x32\x1d.google.cloud.vision.v1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\xe6\x02\n\x05\x42lock\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x35\n\nparagraphs\x18\x03 \x03(\x0b\x32!.google.cloud.vision.v1.Paragraph\x12;\n\nblock_type\x18\x04 \x01(\x0e\x32\'.google.cloud.vision.v1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xcf\x01\n\tParagraph\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12+\n\x05words\x18\x03 \x03(\x0b\x32\x1c.google.cloud.vision.v1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xce\x01\n\x04Word\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12/\n\x07symbols\x18\x03 \x03(\x0b\x32\x1e.google.cloud.vision.v1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xad\x01\n\x06Symbol\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42{\n\x1a\x63om.google.cloud.vision.v1B\x13TextAnnotationProtoP\x01Z.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xb1\x01\n\x0cTextProperty\x12S\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1.TextAnnotation.DetectedLanguage\x12L\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32\x34.google.cloud.vision.v1.TextAnnotation.DetectedBreak"\xaf\x01\n\x04Page\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12-\n\x06\x62locks\x18\x04 \x03(\x0b\x32\x1d.google.cloud.vision.v1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\xe6\x02\n\x05\x42lock\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x35\n\nparagraphs\x18\x03 \x03(\x0b\x32!.google.cloud.vision.v1.Paragraph\x12;\n\nblock_type\x18\x04 \x01(\x0e\x32\'.google.cloud.vision.v1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xcf\x01\n\tParagraph\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12+\n\x05words\x18\x03 \x03(\x0b\x32\x1c.google.cloud.vision.v1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xce\x01\n\x04Word\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12/\n\x07symbols\x18\x03 \x03(\x0b\x32\x1e.google.cloud.vision.v1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xad\x01\n\x06Symbol\x12\x45\n\x08property\x18\x01 \x01(\x0b\x32\x33.google.cloud.vision.v1.TextAnnotation.TextProperty\x12:\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32$.google.cloud.vision.v1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42{\n\x1a\x63om.google.cloud.vision.v1B\x13TextAnnotationProtoP\x01Z Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own @@ -949,6 +1047,7 @@ Please refer to the [TextAnnotation.TextProperty][google.cloud.vision. v1.TextAnnotation.TextProperty] message definition below for more detail. + Attributes: pages: List of pages detected by OCR. @@ -956,7 +1055,7 @@ UTF-8 text detected on the pages. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.TextAnnotation) - ), + }, ) _sym_db.RegisterMessage(TextAnnotation) _sym_db.RegisterMessage(TextAnnotation.DetectedLanguage) @@ -966,10 +1065,11 @@ Page = _reflection.GeneratedProtocolMessageType( "Page", (_message.Message,), - dict( - DESCRIPTOR=_PAGE, - __module__="google.cloud.vision_v1.proto.text_annotation_pb2", - __doc__="""Detected page from OCR. + { + "DESCRIPTOR": _PAGE, + "__module__": "google.cloud.vision_v1.proto.text_annotation_pb2", + "__doc__": """Detected page from OCR. + Attributes: property: Additional information detected on the page. @@ -985,17 +1085,18 @@ Confidence of the OCR results on the page. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Page) - ), + }, ) _sym_db.RegisterMessage(Page) Block = _reflection.GeneratedProtocolMessageType( "Block", (_message.Message,), - dict( - DESCRIPTOR=_BLOCK, - __module__="google.cloud.vision_v1.proto.text_annotation_pb2", - __doc__="""Logical element on the page. + { + "DESCRIPTOR": _BLOCK, + "__module__": "google.cloud.vision_v1.proto.text_annotation_pb2", + "__doc__": """Logical element on the page. + Attributes: property: Additional information detected for the block. @@ -1004,12 +1105,12 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - text is read in the 'natural' orientation. For example: - + 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 + 0----1 | | 3----2 - when it’s rotated 180 degrees around the top-left corner it becomes: :: - 2----3 | | 1----0 and the vertex order will - still be (0, 1, 2, 3). + 2----3 | | 1----0 and the vertex order + will still be (0, 1, 2, 3). paragraphs: List of paragraphs in this block (if this blocks is of type text). @@ -1019,18 +1120,19 @@ Confidence of the OCR results on the block. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Block) - ), + }, ) _sym_db.RegisterMessage(Block) Paragraph = _reflection.GeneratedProtocolMessageType( "Paragraph", (_message.Message,), - dict( - DESCRIPTOR=_PARAGRAPH, - __module__="google.cloud.vision_v1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain + { + "DESCRIPTOR": _PARAGRAPH, + "__module__": "google.cloud.vision_v1.proto.text_annotation_pb2", + "__doc__": """Structural unit of text representing a number of words in certain order. + Attributes: property: Additional information detected for the paragraph. @@ -1039,28 +1141,29 @@ order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 vertex order - will still be (0, 1, 2, 3). + 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 vertex order will + still be (0, 1, 2, 3). words: List of all words in this paragraph. confidence: Confidence of the OCR results for the paragraph. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Paragraph) - ), + }, ) _sym_db.RegisterMessage(Paragraph) Word = _reflection.GeneratedProtocolMessageType( "Word", (_message.Message,), - dict( - DESCRIPTOR=_WORD, - __module__="google.cloud.vision_v1.proto.text_annotation_pb2", - __doc__="""A word representation. + { + "DESCRIPTOR": _WORD, + "__module__": "google.cloud.vision_v1.proto.text_annotation_pb2", + "__doc__": """A word representation. + Attributes: property: Additional information detected for the word. @@ -1069,11 +1172,11 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 vertex order - will still be (0, 1, 2, 3). + 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 vertex order will + still be (0, 1, 2, 3). symbols: List of symbols in the word. The order of the symbols follows the natural reading order. @@ -1081,17 +1184,18 @@ Confidence of the OCR results for the word. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Word) - ), + }, ) _sym_db.RegisterMessage(Word) Symbol = _reflection.GeneratedProtocolMessageType( "Symbol", (_message.Message,), - dict( - DESCRIPTOR=_SYMBOL, - __module__="google.cloud.vision_v1.proto.text_annotation_pb2", - __doc__="""A single symbol representation. + { + "DESCRIPTOR": _SYMBOL, + "__module__": "google.cloud.vision_v1.proto.text_annotation_pb2", + "__doc__": """A single symbol representation. + Attributes: property: Additional information detected for the symbol. @@ -1100,18 +1204,18 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 vertex order - will still be (0, 1, 2, 3). + 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 vertex order will + still be (0, 1, 2, 3). text: The actual UTF-8 representation of the symbol. confidence: Confidence of the OCR results for the symbol. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1.Symbol) - ), + }, ) _sym_db.RegisterMessage(Symbol) diff --git a/google/cloud/vision_v1/proto/text_annotation_pb2_grpc.py b/google/cloud/vision_v1/proto/text_annotation_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1/proto/text_annotation_pb2_grpc.py +++ b/google/cloud/vision_v1/proto/text_annotation_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1/proto/web_detection_pb2.py b/google/cloud/vision_v1/proto/web_detection_pb2.py index 27473281..d57e7a80 100644 --- a/google/cloud/vision_v1/proto/web_detection_pb2.py +++ b/google/cloud/vision_v1/proto/web_detection_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1/proto/web_detection.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,13 +19,10 @@ name="google/cloud/vision_v1/proto/web_detection.proto", package="google.cloud.vision.v1", syntax="proto3", - serialized_options=_b( - "\n\032com.google.cloud.vision.v1B\021WebDetectionProtoP\001Z\n\tlocations\x18\x08 \x03(\x0b\x32+.google.cloud.vision.v1p1beta1.LocationInfo\x12;\n\nproperties\x18\t \x03(\x0b\x32\'.google.cloud.vision.v1p1beta1.Property"\xbc\x02\n\x14SafeSearchAnnotation\x12\x38\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12\x38\n\x05spoof\x18\x02 \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12:\n\x07medical\x18\x03 \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12;\n\x08violence\x18\x04 \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12\x37\n\x04racy\x18\t \x01(\x0e\x32).google.cloud.vision.v1p1beta1.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.v1p1beta1.ColorInfo"c\n\x0fImageProperties\x12P\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x37.google.cloud.vision.v1p1beta1.DominantColorsAnnotation"\x7f\n\x08\x43ropHint\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.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.v1p1beta1.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"\x85\x02\n\x0cImageContext\x12\x41\n\rlat_long_rect\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p1beta1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12I\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32..google.cloud.vision.v1p1beta1.CropHintsParams\x12O\n\x14web_detection_params\x18\x06 \x01(\x0b\x32\x31.google.cloud.vision.v1p1beta1.WebDetectionParams"\xc9\x01\n\x14\x41nnotateImageRequest\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1p1beta1.Image\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p1beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.ImageContext"\xc2\x06\n\x15\x41nnotateImageResponse\x12G\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p1beta1.FaceAnnotation\x12M\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p1beta1.EntityAnnotation\x12I\n\x10logo_annotations\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1p1beta1.EntityAnnotation\x12J\n\x11label_annotations\x18\x04 \x03(\x0b\x32/.google.cloud.vision.v1p1beta1.EntityAnnotation\x12I\n\x10text_annotations\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p1beta1.EntityAnnotation\x12K\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32-.google.cloud.vision.v1p1beta1.TextAnnotation\x12S\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32\x33.google.cloud.vision.v1p1beta1.SafeSearchAnnotation\x12S\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32..google.cloud.vision.v1p1beta1.ImageProperties\x12Q\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32\x32.google.cloud.vision.v1p1beta1.CropHintsAnnotation\x12\x42\n\rweb_detection\x18\r \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.WebDetection\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status"h\n\x1a\x42\x61tchAnnotateImagesRequest\x12J\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p1beta1.AnnotateImageRequestB\x03\xe0\x41\x02"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.AnnotateImageResponse*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\xc9\x02\n\x0eImageAnnotator\x12\xbe\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse"0\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p1beta1/images:annotate:\x01*\xda\x41\x08requests\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionB\x82\x01\n!com.google.cloud.vision.v1p1beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p1beta1B\023ImageAnnotatorProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n9google/cloud/vision_v1p1beta1/proto/image_annotator.proto\x12\x1dgoogle.cloud.vision.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x32google/cloud/vision_v1p1beta1/proto/geometry.proto\x1a\x39google/cloud/vision_v1p1beta1/proto/text_annotation.proto\x1a\x37google/cloud/vision_v1p1beta1/proto/web_detection.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x18google/type/latlng.proto"\xe1\x02\n\x07\x46\x65\x61ture\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.vision.v1p1beta1.Feature.Type\x12\x13\n\x0bmax_results\x18\x02 \x01(\x05\x12\r\n\x05model\x18\x03 \x01(\t"\xf6\x01\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"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.v1p1beta1.ImageSource"\x9b\x0e\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12\x45\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12I\n\tlandmarks\x18\x03 \x03(\x0b\x32\x36.google.cloud.vision.v1p1beta1.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.v1p1beta1.Likelihood\x12\x44\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12\x43\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12\x46\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12K\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12\x45\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12\x46\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x1a\xc7\x07\n\x08Landmark\x12I\n\x04type\x18\x03 \x01(\x0e\x32;.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type\x12\x39\n\x08position\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1p1beta1.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"\xbc\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\x12\n\nconfidence\x18\x05 \x01(\x02\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12\x42\n\rbounding_poly\x18\x07 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12>\n\tlocations\x18\x08 \x03(\x0b\x32+.google.cloud.vision.v1p1beta1.LocationInfo\x12;\n\nproperties\x18\t \x03(\x0b\x32\'.google.cloud.vision.v1p1beta1.Property"\xbc\x02\n\x14SafeSearchAnnotation\x12\x38\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12\x38\n\x05spoof\x18\x02 \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12:\n\x07medical\x18\x03 \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12;\n\x08violence\x18\x04 \x01(\x0e\x32).google.cloud.vision.v1p1beta1.Likelihood\x12\x37\n\x04racy\x18\t \x01(\x0e\x32).google.cloud.vision.v1p1beta1.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.v1p1beta1.ColorInfo"c\n\x0fImageProperties\x12P\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x37.google.cloud.vision.v1p1beta1.DominantColorsAnnotation"\x7f\n\x08\x43ropHint\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.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.v1p1beta1.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"\x85\x02\n\x0cImageContext\x12\x41\n\rlat_long_rect\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p1beta1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12I\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32..google.cloud.vision.v1p1beta1.CropHintsParams\x12O\n\x14web_detection_params\x18\x06 \x01(\x0b\x32\x31.google.cloud.vision.v1p1beta1.WebDetectionParams"\xc9\x01\n\x14\x41nnotateImageRequest\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1p1beta1.Image\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p1beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.ImageContext"\xc2\x06\n\x15\x41nnotateImageResponse\x12G\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p1beta1.FaceAnnotation\x12M\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p1beta1.EntityAnnotation\x12I\n\x10logo_annotations\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1p1beta1.EntityAnnotation\x12J\n\x11label_annotations\x18\x04 \x03(\x0b\x32/.google.cloud.vision.v1p1beta1.EntityAnnotation\x12I\n\x10text_annotations\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p1beta1.EntityAnnotation\x12K\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32-.google.cloud.vision.v1p1beta1.TextAnnotation\x12S\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32\x33.google.cloud.vision.v1p1beta1.SafeSearchAnnotation\x12S\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32..google.cloud.vision.v1p1beta1.ImageProperties\x12Q\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32\x32.google.cloud.vision.v1p1beta1.CropHintsAnnotation\x12\x42\n\rweb_detection\x18\r \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.WebDetection\x12!\n\x05\x65rror\x18\t \x01(\x0b\x32\x12.google.rpc.Status"h\n\x1a\x42\x61tchAnnotateImagesRequest\x12J\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p1beta1.AnnotateImageRequestB\x03\xe0\x41\x02"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.AnnotateImageResponse*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\xc9\x02\n\x0eImageAnnotator\x12\xbe\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse"0\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p1beta1/images:annotate:\x01*\xda\x41\x08requests\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionB\x82\x01\n!com.google.cloud.vision.v1p1beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\xf8\x01\x01\x62\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -61,24 +55,55 @@ full_name="google.cloud.vision.v1p1beta1.Likelihood", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERY_UNLIKELY", index=1, number=1, serialized_options=None, type=None + name="VERY_UNLIKELY", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UNLIKELY", index=2, number=2, serialized_options=None, type=None + name="UNLIKELY", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="POSSIBLE", index=3, number=3, serialized_options=None, type=None + name="POSSIBLE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LIKELY", index=4, number=4, serialized_options=None, type=None + name="LIKELY", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERY_LIKELY", index=5, number=5, serialized_options=None, type=None + name="VERY_LIKELY", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -102,6 +127,7 @@ full_name="google.cloud.vision.v1p1beta1.Feature.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TYPE_UNSPECIFIED", @@ -109,9 +135,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FACE_DETECTION", index=1, number=1, serialized_options=None, type=None + name="FACE_DETECTION", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LANDMARK_DETECTION", @@ -119,9 +151,15 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOGO_DETECTION", index=3, number=3, serialized_options=None, type=None + name="LOGO_DETECTION", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LABEL_DETECTION", @@ -129,9 +167,15 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TEXT_DETECTION", index=5, number=5, serialized_options=None, type=None + name="TEXT_DETECTION", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="DOCUMENT_TEXT_DETECTION", @@ -139,6 +183,7 @@ number=11, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SAFE_SEARCH_DETECTION", @@ -146,6 +191,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="IMAGE_PROPERTIES", @@ -153,9 +199,15 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CROP_HINTS", index=9, number=9, serialized_options=None, type=None + name="CROP_HINTS", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="WEB_DETECTION", @@ -163,6 +215,7 @@ number=10, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -177,6 +230,7 @@ full_name="google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="UNKNOWN_LANDMARK", @@ -184,12 +238,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LEFT_EYE", index=1, number=1, serialized_options=None, type=None + name="LEFT_EYE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RIGHT_EYE", index=2, number=2, serialized_options=None, type=None + name="RIGHT_EYE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_OF_LEFT_EYEBROW", @@ -197,6 +262,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_OF_LEFT_EYEBROW", @@ -204,6 +270,7 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_OF_RIGHT_EYEBROW", @@ -211,6 +278,7 @@ number=5, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_OF_RIGHT_EYEBROW", @@ -218,6 +286,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="MIDPOINT_BETWEEN_EYES", @@ -225,24 +294,55 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="NOSE_TIP", index=8, number=8, serialized_options=None, type=None + name="NOSE_TIP", + index=8, + number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UPPER_LIP", index=9, number=9, serialized_options=None, type=None + name="UPPER_LIP", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOWER_LIP", index=10, number=10, serialized_options=None, type=None + name="LOWER_LIP", + index=10, + number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_LEFT", index=11, number=11, serialized_options=None, type=None + name="MOUTH_LEFT", + index=11, + number=11, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_RIGHT", index=12, number=12, serialized_options=None, type=None + name="MOUTH_RIGHT", + index=12, + number=12, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_CENTER", index=13, number=13, serialized_options=None, type=None + name="MOUTH_CENTER", + index=13, + number=13, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_RIGHT", @@ -250,6 +350,7 @@ number=14, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_LEFT", @@ -257,6 +358,7 @@ number=15, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_CENTER", @@ -264,6 +366,7 @@ number=16, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_TOP_BOUNDARY", @@ -271,6 +374,7 @@ number=17, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_RIGHT_CORNER", @@ -278,6 +382,7 @@ number=18, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_BOTTOM_BOUNDARY", @@ -285,6 +390,7 @@ number=19, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_LEFT_CORNER", @@ -292,6 +398,7 @@ number=20, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_TOP_BOUNDARY", @@ -299,6 +406,7 @@ number=21, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_RIGHT_CORNER", @@ -306,6 +414,7 @@ number=22, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_BOTTOM_BOUNDARY", @@ -313,6 +422,7 @@ number=23, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_LEFT_CORNER", @@ -320,6 +430,7 @@ number=24, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYEBROW_UPPER_MIDPOINT", @@ -327,6 +438,7 @@ number=25, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYEBROW_UPPER_MIDPOINT", @@ -334,6 +446,7 @@ number=26, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EAR_TRAGION", @@ -341,6 +454,7 @@ number=27, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EAR_TRAGION", @@ -348,6 +462,7 @@ number=28, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_PUPIL", @@ -355,6 +470,7 @@ number=29, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_PUPIL", @@ -362,6 +478,7 @@ number=30, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="FOREHEAD_GLABELLA", @@ -369,6 +486,7 @@ number=31, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_GNATHION", @@ -376,6 +494,7 @@ number=32, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_LEFT_GONION", @@ -383,6 +502,7 @@ number=33, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_RIGHT_GONION", @@ -390,6 +510,7 @@ number=34, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -406,6 +527,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -424,6 +546,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="max_results", @@ -442,6 +565,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -452,7 +576,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -460,11 +584,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_FEATURE_TYPE], + enum_types=[_FEATURE_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -481,6 +606,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_image_uri", @@ -491,7 +617,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -499,6 +625,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_uri", @@ -509,7 +636,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -517,6 +644,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -538,6 +666,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="content", @@ -548,7 +677,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -556,6 +685,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source", @@ -574,6 +704,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -595,6 +726,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -613,6 +745,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="position", @@ -631,11 +764,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_FACEANNOTATION_LANDMARK_TYPE], + enum_types=[_FACEANNOTATION_LANDMARK_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -651,6 +785,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -669,6 +804,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fd_bounding_poly", @@ -687,6 +823,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmarks", @@ -705,6 +842,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="roll_angle", @@ -723,6 +861,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pan_angle", @@ -741,6 +880,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tilt_angle", @@ -759,6 +899,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detection_confidence", @@ -777,6 +918,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmarking_confidence", @@ -795,6 +937,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="joy_likelihood", @@ -813,6 +956,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sorrow_likelihood", @@ -831,6 +975,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="anger_likelihood", @@ -849,6 +994,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="surprise_likelihood", @@ -867,6 +1013,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="under_exposed_likelihood", @@ -885,6 +1032,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="blurred_likelihood", @@ -903,6 +1051,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="headwear_likelihood", @@ -921,10 +1070,11 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_FACEANNOTATION_LANDMARK], + nested_types=[_FACEANNOTATION_LANDMARK,], enum_types=[], serialized_options=None, is_extendable=False, @@ -942,6 +1092,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="lat_lng", @@ -960,7 +1111,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -981,6 +1133,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -991,7 +1144,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -999,6 +1152,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1009,7 +1163,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1017,6 +1171,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uint64_value", @@ -1035,6 +1190,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1056,6 +1212,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mid", @@ -1066,7 +1223,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1074,6 +1231,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="locale", @@ -1084,7 +1242,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1092,6 +1250,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1102,7 +1261,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1110,6 +1269,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1128,6 +1288,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1146,6 +1307,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="topicality", @@ -1164,6 +1326,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_poly", @@ -1182,6 +1345,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="locations", @@ -1200,6 +1364,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="properties", @@ -1218,6 +1383,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1239,6 +1405,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="adult", @@ -1257,6 +1424,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="spoof", @@ -1275,6 +1443,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="medical", @@ -1293,6 +1462,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="violence", @@ -1311,6 +1481,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="racy", @@ -1329,6 +1500,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1350,6 +1522,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="min_lat_lng", @@ -1368,6 +1541,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="max_lat_lng", @@ -1386,6 +1560,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1407,6 +1582,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="color", @@ -1425,6 +1601,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1443,6 +1620,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pixel_fraction", @@ -1461,6 +1639,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1482,6 +1661,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="colors", @@ -1500,7 +1680,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1521,6 +1702,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="dominant_colors", @@ -1539,7 +1721,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1560,6 +1743,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -1578,6 +1762,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1596,6 +1781,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="importance_fraction", @@ -1614,6 +1800,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1635,6 +1822,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="crop_hints", @@ -1653,7 +1841,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1674,6 +1863,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="aspect_ratios", @@ -1692,7 +1882,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1713,6 +1904,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="include_geo_results", @@ -1731,7 +1923,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1752,6 +1945,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="lat_long_rect", @@ -1770,6 +1964,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_hints", @@ -1788,6 +1983,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="crop_hints_params", @@ -1806,6 +2002,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="web_detection_params", @@ -1824,6 +2021,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1845,6 +2043,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="image", @@ -1863,6 +2062,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="features", @@ -1881,6 +2081,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_context", @@ -1899,6 +2100,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1920,6 +2122,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="face_annotations", @@ -1938,6 +2141,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmark_annotations", @@ -1956,6 +2160,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="logo_annotations", @@ -1974,6 +2179,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="label_annotations", @@ -1992,6 +2198,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text_annotations", @@ -2010,6 +2217,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_text_annotation", @@ -2028,6 +2236,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="safe_search_annotation", @@ -2046,6 +2255,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_properties_annotation", @@ -2064,6 +2274,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="crop_hints_annotation", @@ -2082,6 +2293,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="web_detection", @@ -2100,6 +2312,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="error", @@ -2118,6 +2331,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2139,6 +2353,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -2155,9 +2370,10 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2178,6 +2394,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="responses", @@ -2196,7 +2413,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2351,14 +2569,15 @@ Feature = _reflection.GeneratedProtocolMessageType( "Feature", (_message.Message,), - dict( - DESCRIPTOR=_FEATURE, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Users describe the type of Google Cloud Vision API tasks to perform + { + "DESCRIPTOR": _FEATURE, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Users describe the type of Google Cloud Vision API tasks to perform over images by using *Feature*\ s. Each Feature indicates a type of image detection task to perform. Features encode the Cloud Vision API vertical to operate on and the number of top-scoring results to return. + Attributes: type: The feature type. @@ -2366,20 +2585,21 @@ Maximum number of results of this type. model: Model to use for the feature. Supported values: - "builtin/stable" (the default if unset) and "builtin/latest". + “builtin/stable” (the default if unset) and “builtin/latest”. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Feature) - ), + }, ) _sym_db.RegisterMessage(Feature) ImageSource = _reflection.GeneratedProtocolMessageType( "ImageSource", (_message.Message,), - dict( - DESCRIPTOR=_IMAGESOURCE, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage image location). + { + "DESCRIPTOR": _IMAGESOURCE, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """External image source (Google Cloud Storage image location). + Attributes: gcs_image_uri: NOTE: For new code ``image_uri`` below is preferred. Google @@ -2401,17 +2621,18 @@ ``image_uri`` takes precedence. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageSource) - ), + }, ) _sym_db.RegisterMessage(ImageSource) Image = _reflection.GeneratedProtocolMessageType( "Image", (_message.Message,), - dict( - DESCRIPTOR=_IMAGE, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + { + "DESCRIPTOR": _IMAGE, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Client image to perform Google Cloud Vision API tasks over. + Attributes: content: Image content, represented as a stream of bytes. Note: as with @@ -2424,21 +2645,22 @@ request. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Image) - ), + }, ) _sym_db.RegisterMessage(Image) FaceAnnotation = _reflection.GeneratedProtocolMessageType( "FaceAnnotation", (_message.Message,), - dict( - Landmark=_reflection.GeneratedProtocolMessageType( + { + "Landmark": _reflection.GeneratedProtocolMessageType( "Landmark", (_message.Message,), - dict( - DESCRIPTOR=_FACEANNOTATION_LANDMARK, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""A face-specific landmark (for example, a face feature). + { + "DESCRIPTOR": _FACEANNOTATION_LANDMARK, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """A face-specific landmark (for example, a face feature). + Attributes: type: Face landmark type. @@ -2446,16 +2668,17 @@ Face landmark position. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) - ), + }, ), - DESCRIPTOR=_FACEANNOTATION, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + "DESCRIPTOR": _FACEANNOTATION, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """A face annotation object contains the results of face detection. + Attributes: bounding_poly: The bounding polygon around the face. The coordinates of the - bounding box are in the original image's scale, as returned in - ``ImageParams``. The bounding box is computed to "frame" the + bounding box are in the original image’s scale, as returned in + ``ImageParams``. The bounding box is computed to “frame” the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the ``BoundingPoly`` (the @@ -2465,7 +2688,7 @@ The ``fd_bounding_poly`` bounding polygon is tighter than the ``boundingPoly``, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image - analysis that detects the "amount of skin" visible in an + analysis that detects the “amount of skin” visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix. landmarks: @@ -2480,7 +2703,7 @@ perpendicular to the image. Range [-180,180]. tilt_angle: Pitch angle, which indicates the upwards/downwards angle that - the face is pointing relative to the image's horizontal plane. + the face is pointing relative to the image’s horizontal plane. Range [-180,180]. detection_confidence: Detection confidence. Range [0, 1]. @@ -2502,7 +2725,7 @@ Headwear likelihood. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.FaceAnnotation) - ), + }, ) _sym_db.RegisterMessage(FaceAnnotation) _sym_db.RegisterMessage(FaceAnnotation.Landmark) @@ -2510,26 +2733,28 @@ LocationInfo = _reflection.GeneratedProtocolMessageType( "LocationInfo", (_message.Message,), - dict( - DESCRIPTOR=_LOCATIONINFO, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Detected entity location information. + { + "DESCRIPTOR": _LOCATIONINFO, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Detected entity location information. + Attributes: lat_lng: lat/long location coordinates. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.LocationInfo) - ), + }, ) _sym_db.RegisterMessage(LocationInfo) Property = _reflection.GeneratedProtocolMessageType( "Property", (_message.Message,), - dict( - DESCRIPTOR=_PROPERTY, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + { + "DESCRIPTOR": _PROPERTY, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """A ``Property`` consists of a user-supplied name/value pair. + Attributes: name: Name of the property. @@ -2539,17 +2764,18 @@ Value of numeric properties. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Property) - ), + }, ) _sym_db.RegisterMessage(Property) EntityAnnotation = _reflection.GeneratedProtocolMessageType( "EntityAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_ENTITYANNOTATION, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Set of detected entity features. + { + "DESCRIPTOR": _ENTITYANNOTATION, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Set of detected entity features. + Attributes: mid: Opaque entity ID. Some IDs may be available in `Google @@ -2565,13 +2791,13 @@ Overall score of the result. Range [0, 1]. confidence: The accuracy of the entity detection in an image. For example, - for an image in which the "Eiffel Tower" entity is detected, + for an image in which the “Eiffel Tower” entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1]. topicality: The relevancy of the ICA (Image Content Annotation) label to - the image. For example, the relevancy of "tower" is likely - higher to an image containing the detected "Eiffel Tower" than + the image. For example, the relevancy of “tower” is likely + higher to an image containing the detected “Eiffel Tower” than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1]. @@ -2591,19 +2817,20 @@ entity. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.EntityAnnotation) - ), + }, ) _sym_db.RegisterMessage(EntityAnnotation) SafeSearchAnnotation = _reflection.GeneratedProtocolMessageType( "SafeSearchAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_SAFESEARCHANNOTATION, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Set of features pertaining to the image, computed by computer vision + { + "DESCRIPTOR": _SAFESEARCHANNOTATION, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence). + Attributes: adult: Represents the adult content likelihood for the image. Adult @@ -2611,7 +2838,7 @@ images or cartoons, or sexual activities. spoof: Spoof likelihood. The likelihood that an modification was made - to the image's canonical version to make it appear funny or + to the image’s canonical version to make it appear funny or offensive. medical: Likelihood that this is a medical image. @@ -2624,17 +2851,18 @@ poses, or close-ups of sensitive body areas. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.SafeSearchAnnotation) - ), + }, ) _sym_db.RegisterMessage(SafeSearchAnnotation) LatLongRect = _reflection.GeneratedProtocolMessageType( "LatLongRect", (_message.Message,), - dict( - DESCRIPTOR=_LATLONGRECT, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Rectangle determined by min and max ``LatLng`` pairs. + { + "DESCRIPTOR": _LATLONGRECT, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Rectangle determined by min and max ``LatLng`` pairs. + Attributes: min_lat_lng: Min lat/long pair. @@ -2642,18 +2870,19 @@ Max lat/long pair. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.LatLongRect) - ), + }, ) _sym_db.RegisterMessage(LatLongRect) ColorInfo = _reflection.GeneratedProtocolMessageType( "ColorInfo", (_message.Message,), - dict( - DESCRIPTOR=_COLORINFO, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Color information consists of RGB channels, score, and the fraction of + { + "DESCRIPTOR": _COLORINFO, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image. + Attributes: color: RGB components of the color. @@ -2664,54 +2893,57 @@ in range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ColorInfo) - ), + }, ) _sym_db.RegisterMessage(ColorInfo) DominantColorsAnnotation = _reflection.GeneratedProtocolMessageType( "DominantColorsAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_DOMINANTCOLORSANNOTATION, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Set of dominant colors and their corresponding scores. + { + "DESCRIPTOR": _DOMINANTCOLORSANNOTATION, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Set of dominant colors and their corresponding scores. + Attributes: colors: RGB color values with their score and pixel fraction. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.DominantColorsAnnotation) - ), + }, ) _sym_db.RegisterMessage(DominantColorsAnnotation) ImageProperties = _reflection.GeneratedProtocolMessageType( "ImageProperties", (_message.Message,), - dict( - DESCRIPTOR=_IMAGEPROPERTIES, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Stores image properties, such as dominant colors. + { + "DESCRIPTOR": _IMAGEPROPERTIES, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Stores image properties, such as dominant colors. + Attributes: dominant_colors: If present, dominant colors completed successfully. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageProperties) - ), + }, ) _sym_db.RegisterMessage(ImageProperties) CropHint = _reflection.GeneratedProtocolMessageType( "CropHint", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINT, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Single crop hint that is used to generate a new crop when serving an + { + "DESCRIPTOR": _CROPHINT, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Single crop hint that is used to generate a new crop when serving an image. + Attributes: bounding_poly: The bounding polygon for the crop region. The coordinates of - the bounding box are in the original image's scale, as + the bounding box are in the original image’s scale, as returned in ``ImageParams``. confidence: Confidence of this being a salient region. Range [0, 1]. @@ -2720,34 +2952,36 @@ the original image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHint) - ), + }, ) _sym_db.RegisterMessage(CropHint) CropHintsAnnotation = _reflection.GeneratedProtocolMessageType( "CropHintsAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINTSANNOTATION, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Set of crop hints that are used to generate new crops when serving + { + "DESCRIPTOR": _CROPHINTSANNOTATION, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Set of crop hints that are used to generate new crops when serving images. + Attributes: crop_hints: Crop hint results. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHintsAnnotation) - ), + }, ) _sym_db.RegisterMessage(CropHintsAnnotation) CropHintsParams = _reflection.GeneratedProtocolMessageType( "CropHintsParams", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINTSPARAMS, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Parameters for crop hints annotation request. + { + "DESCRIPTOR": _CROPHINTSPARAMS, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Parameters for crop hints annotation request. + Attributes: aspect_ratios: Aspect ratios in floats, representing the ratio of the width @@ -2758,47 +2992,49 @@ 16; any aspect ratios provided after the 16th are ignored. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.CropHintsParams) - ), + }, ) _sym_db.RegisterMessage(CropHintsParams) WebDetectionParams = _reflection.GeneratedProtocolMessageType( "WebDetectionParams", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTIONPARAMS, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Parameters for web detection request. + { + "DESCRIPTOR": _WEBDETECTIONPARAMS, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Parameters for web detection request. + Attributes: include_geo_results: Whether to include results derived from the geo information in the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetectionParams) - ), + }, ) _sym_db.RegisterMessage(WebDetectionParams) ImageContext = _reflection.GeneratedProtocolMessageType( "ImageContext", (_message.Message,), - dict( - DESCRIPTOR=_IMAGECONTEXT, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Image context and/or feature-specific parameters. + { + "DESCRIPTOR": _IMAGECONTEXT, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Image context and/or feature-specific parameters. + Attributes: lat_long_rect: lat/long rectangle that specifies the location of the image. language_hints: - List of languages to use for TEXT\_DETECTION. In most cases, - an empty value yields the best results since it enables - automatic language detection. For languages based on the Latin - alphabet, setting ``language_hints`` is not needed. In rare - cases, when the language of the text in the image is known, - setting a hint will help get better results (although it will - be a significant hindrance if the hint is wrong). Text - detection returns an error if one or more of the specified - languages is not one of the `supported languages + List of languages to use for TEXT_DETECTION. In most cases, an + empty value yields the best results since it enables automatic + language detection. For languages based on the Latin alphabet, + setting ``language_hints`` is not needed. In rare cases, when + the language of the text in the image is known, setting a hint + will help get better results (although it will be a + significant hindrance if the hint is wrong). Text detection + returns an error if one or more of the specified languages is + not one of the `supported languages `__. crop_hints_params: Parameters for crop hints annotation request. @@ -2806,18 +3042,19 @@ Parameters for web detection. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.ImageContext) - ), + }, ) _sym_db.RegisterMessage(ImageContext) AnnotateImageRequest = _reflection.GeneratedProtocolMessageType( "AnnotateImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGEREQUEST, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Request for performing Google Cloud Vision API tasks over a user- + { + "DESCRIPTOR": _ANNOTATEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Request for performing Google Cloud Vision API tasks over a user- provided image, with user-requested features. + Attributes: image: The image to be processed. @@ -2827,17 +3064,18 @@ Additional context that may accompany the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.AnnotateImageRequest) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageRequest) AnnotateImageResponse = _reflection.GeneratedProtocolMessageType( "AnnotateImageResponse", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGERESPONSE, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Response to an image annotation request. + { + "DESCRIPTOR": _ANNOTATEIMAGERESPONSE, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Response to an image annotation request. + Attributes: face_annotations: If present, face detection has completed successfully. @@ -2867,41 +3105,43 @@ even when ``error`` is set. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.AnnotateImageResponse) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageResponse) BatchAnnotateImagesRequest = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Multiple image annotation requests are batched into a single service call. + Attributes: requests: Required. Individual image annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesRequest) BatchAnnotateImagesResponse = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESRESPONSE, - __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Response to a batch image annotation request. + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", + "__doc__": """Response to a batch image annotation request. + Attributes: responses: Individual responses to image annotation requests within the batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesResponse) @@ -2914,9 +3154,8 @@ full_name="google.cloud.vision.v1p1beta1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" - ), + serialized_options=b"\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision", + create_key=_descriptor._internal_create_key, serialized_start=5798, serialized_end=6127, methods=[ @@ -2927,10 +3166,9 @@ containing_service=None, input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\037"\032/v1p1beta1/images:annotate:\001*\332A\010requests' - ), - ) + serialized_options=b'\202\323\344\223\002\037"\032/v1p1beta1/images:annotate:\001*\332A\010requests', + create_key=_descriptor._internal_create_key, + ), ], ) _sym_db.RegisterServiceDescriptor(_IMAGEANNOTATOR) 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..ff536f98 100644 --- a/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.vision_v1p1beta1.proto import ( @@ -8,16 +9,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 +28,13 @@ 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. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -45,9 +46,44 @@ def add_ImageAnnotatorServicer_to_server(servicer, server): servicer.BatchAnnotateImages, request_deserializer=google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.FromString, response_serializer=google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.SerializeToString, - ) + ), } generic_handler = grpc.method_handlers_generic_handler( "google.cloud.vision.v1p1beta1.ImageAnnotator", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ImageAnnotator(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. + """ + + @staticmethod + def BatchAnnotateImages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p1beta1.ImageAnnotator/BatchAnnotateImages", + google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2.py b/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2.py index 30cc2112..53a1d662 100644 --- a/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p1beta1/proto/text_annotation.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -25,12 +22,9 @@ name="google/cloud/vision_v1p1beta1/proto/text_annotation.proto", package="google.cloud.vision.v1p1beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p1beta1B\023TextAnnotationProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n9google/cloud/vision_v1p1beta1/proto/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p1beta1/proto/geometry.proto"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p1beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p1beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p1beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p1beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p1beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p1beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x82\x01\n!com.google.cloud.vision.v1p1beta1B\x13TextAnnotationProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p1beta1B\023TextAnnotationProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n9google/cloud/vision_v1p1beta1/proto/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p1beta1/proto/geometry.proto"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p1beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p1beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p1beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p1beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p1beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p1beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p1beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x82\x01\n!com.google.cloud.vision.v1p1beta1B\x13TextAnnotationProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\xf8\x01\x01\x62\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, @@ -43,24 +37,55 @@ full_name="google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SPACE", index=1, number=1, serialized_options=None, type=None + name="SPACE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SURE_SPACE", index=2, number=2, serialized_options=None, type=None + name="SURE_SPACE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="EOL_SURE_SPACE", index=3, number=3, serialized_options=None, type=None + name="EOL_SURE_SPACE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="HYPHEN", index=4, number=4, serialized_options=None, type=None + name="HYPHEN", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LINE_BREAK", index=5, number=5, serialized_options=None, type=None + name="LINE_BREAK", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -75,24 +100,55 @@ full_name="google.cloud.vision.v1p1beta1.Block.BlockType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TEXT", index=1, number=1, serialized_options=None, type=None + name="TEXT", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TABLE", index=2, number=2, serialized_options=None, type=None + name="TABLE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="PICTURE", index=3, number=3, serialized_options=None, type=None + name="PICTURE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RULER", index=4, number=4, serialized_options=None, type=None + name="RULER", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="BARCODE", index=5, number=5, serialized_options=None, type=None + name="BARCODE", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -109,6 +165,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_code", @@ -119,7 +176,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -127,6 +184,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -145,6 +203,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -165,6 +224,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -183,6 +243,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_prefix", @@ -201,11 +262,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_TEXTANNOTATION_DETECTEDBREAK_BREAKTYPE], + enum_types=[_TEXTANNOTATION_DETECTEDBREAK_BREAKTYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -221,6 +283,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="detected_languages", @@ -239,6 +302,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detected_break", @@ -257,6 +321,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -277,6 +342,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="pages", @@ -295,6 +361,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -305,7 +372,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -313,6 +380,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -338,6 +406,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -356,6 +425,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="width", @@ -374,6 +444,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="height", @@ -392,6 +463,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="blocks", @@ -410,6 +482,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -428,6 +501,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -449,6 +523,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -467,6 +542,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -485,6 +561,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="paragraphs", @@ -503,6 +580,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="block_type", @@ -521,6 +599,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -539,11 +618,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_BLOCK_BLOCKTYPE], + enum_types=[_BLOCK_BLOCKTYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -560,6 +640,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -578,6 +659,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -596,6 +678,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="words", @@ -614,6 +697,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -632,6 +716,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -653,6 +738,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -671,6 +757,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -689,6 +776,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="symbols", @@ -707,6 +795,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -725,6 +814,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -746,6 +836,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -764,6 +855,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -782,6 +874,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -792,7 +885,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -800,6 +893,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -818,6 +912,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -888,32 +983,34 @@ TextAnnotation = _reflection.GeneratedProtocolMessageType( "TextAnnotation", (_message.Message,), - dict( - DetectedLanguage=_reflection.GeneratedProtocolMessageType( + { + "DetectedLanguage": _reflection.GeneratedProtocolMessageType( "DetectedLanguage", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_DETECTEDLANGUAGE, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""Detected language for a structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_DETECTEDLANGUAGE, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """Detected language for a structural component. + Attributes: language_code: - The BCP-47 language code, such as "en-US" or "sr-Latn". For + 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. + code_locale_identifier. confidence: Confidence of detected language. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) - ), + }, ), - DetectedBreak=_reflection.GeneratedProtocolMessageType( + "DetectedBreak": _reflection.GeneratedProtocolMessageType( "DetectedBreak", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_DETECTEDBREAK, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""Detected start or end of a structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_DETECTEDBREAK, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """Detected start or end of a structural component. + Attributes: type: Detected break type. @@ -921,15 +1018,16 @@ True if break prepends the element. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) - ), + }, ), - TextProperty=_reflection.GeneratedProtocolMessageType( + "TextProperty": _reflection.GeneratedProtocolMessageType( "TextProperty", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_TEXTPROPERTY, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """Additional information detected on the structural component. + Attributes: detected_languages: A list of detected languages together with confidence. @@ -937,11 +1035,11 @@ Detected start or end of a text segment. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) - ), + }, ), - DESCRIPTOR=_TEXTANNOTATION, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""TextAnnotation contains a structured representation of OCR extracted + "DESCRIPTOR": _TEXTANNOTATION, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own @@ -949,6 +1047,7 @@ Please refer to the [TextAnnotation.TextProperty][google.cloud.vision. v1p1beta1.TextAnnotation.TextProperty] message definition below for more detail. + Attributes: pages: List of pages detected by OCR. @@ -956,7 +1055,7 @@ UTF-8 text detected on the pages. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.TextAnnotation) - ), + }, ) _sym_db.RegisterMessage(TextAnnotation) _sym_db.RegisterMessage(TextAnnotation.DetectedLanguage) @@ -966,10 +1065,11 @@ Page = _reflection.GeneratedProtocolMessageType( "Page", (_message.Message,), - dict( - DESCRIPTOR=_PAGE, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""Detected page from OCR. + { + "DESCRIPTOR": _PAGE, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """Detected page from OCR. + Attributes: property: Additional information detected on the page. @@ -983,17 +1083,18 @@ Confidence of the OCR results on the page. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Page) - ), + }, ) _sym_db.RegisterMessage(Page) Block = _reflection.GeneratedProtocolMessageType( "Block", (_message.Message,), - dict( - DESCRIPTOR=_BLOCK, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""Logical element on the page. + { + "DESCRIPTOR": _BLOCK, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """Logical element on the page. + Attributes: property: Additional information detected for the block. @@ -1002,11 +1103,11 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). paragraphs: List of paragraphs in this block (if this blocks is of type text). @@ -1016,18 +1117,19 @@ Confidence of the OCR results on the block. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Block) - ), + }, ) _sym_db.RegisterMessage(Block) Paragraph = _reflection.GeneratedProtocolMessageType( "Paragraph", (_message.Message,), - dict( - DESCRIPTOR=_PARAGRAPH, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain + { + "DESCRIPTOR": _PARAGRAPH, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """Structural unit of text representing a number of words in certain order. + Attributes: property: Additional information detected for the paragraph. @@ -1036,28 +1138,29 @@ order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). words: List of words in this paragraph. confidence: Confidence of the OCR results for the paragraph. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Paragraph) - ), + }, ) _sym_db.RegisterMessage(Paragraph) Word = _reflection.GeneratedProtocolMessageType( "Word", (_message.Message,), - dict( - DESCRIPTOR=_WORD, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""A word representation. + { + "DESCRIPTOR": _WORD, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """A word representation. + Attributes: property: Additional information detected for the word. @@ -1066,11 +1169,11 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). symbols: List of symbols in the word. The order of the symbols follows the natural reading order. @@ -1078,17 +1181,18 @@ Confidence of the OCR results for the word. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Word) - ), + }, ) _sym_db.RegisterMessage(Word) Symbol = _reflection.GeneratedProtocolMessageType( "Symbol", (_message.Message,), - dict( - DESCRIPTOR=_SYMBOL, - __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""A single symbol representation. + { + "DESCRIPTOR": _SYMBOL, + "__module__": "google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", + "__doc__": """A single symbol representation. + Attributes: property: Additional information detected for the symbol. @@ -1097,18 +1201,18 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). text: The actual UTF-8 representation of the symbol. confidence: Confidence of the OCR results for the symbol. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.Symbol) - ), + }, ) _sym_db.RegisterMessage(Symbol) diff --git a/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2_grpc.py b/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2_grpc.py +++ b/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p1beta1/proto/web_detection_pb2.py b/google/cloud/vision_v1p1beta1/proto/web_detection_pb2.py index e7aaf585..20f18fe0 100644 --- a/google/cloud/vision_v1p1beta1/proto/web_detection_pb2.py +++ b/google/cloud/vision_v1p1beta1/proto/web_detection_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p1beta1/proto/web_detection.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,13 +19,10 @@ name="google/cloud/vision_v1p1beta1/proto/web_detection.proto", package="google.cloud.vision.v1p1beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p1beta1B\021WebDetectionProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n7google/cloud/vision_v1p1beta1/proto/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p1beta1\x1a\x1cgoogle/api/annotations.proto"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p1beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p1beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.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.v1p1beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tB\x80\x01\n!com.google.cloud.vision.v1p1beta1B\x11WebDetectionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\xf8\x01\x01\x62\x06proto3' - ), - dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], + serialized_options=b"\n!com.google.cloud.vision.v1p1beta1B\021WebDetectionProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n7google/cloud/vision_v1p1beta1/proto/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p1beta1\x1a\x1cgoogle/api/annotations.proto"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p1beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p1beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.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.v1p1beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p1beta1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tB\x80\x01\n!com.google.cloud.vision.v1p1beta1B\x11WebDetectionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\xf8\x01\x01\x62\x06proto3', + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,], ) @@ -38,6 +32,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_id", @@ -48,7 +43,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -56,6 +51,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -74,6 +70,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -84,7 +81,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -92,6 +89,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -112,6 +110,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -122,7 +121,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -130,6 +129,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -148,6 +148,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -168,6 +169,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -178,7 +180,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -186,6 +188,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -204,6 +207,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_title", @@ -214,7 +218,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -222,6 +226,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_matching_images", @@ -240,6 +245,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_matching_images", @@ -258,6 +264,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -278,6 +285,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="label", @@ -288,7 +296,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -296,6 +304,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -306,7 +315,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -314,6 +323,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -334,6 +344,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="web_entities", @@ -352,6 +363,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_matching_images", @@ -370,6 +382,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_matching_images", @@ -388,6 +401,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pages_with_matching_images", @@ -406,6 +420,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="visually_similar_images", @@ -424,6 +439,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="best_guess_labels", @@ -442,6 +458,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -491,14 +508,15 @@ WebDetection = _reflection.GeneratedProtocolMessageType( "WebDetection", (_message.Message,), - dict( - WebEntity=_reflection.GeneratedProtocolMessageType( + { + "WebEntity": _reflection.GeneratedProtocolMessageType( "WebEntity", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBENTITY, - __module__="google.cloud.vision_v1p1beta1.proto.web_detection_pb2", - __doc__="""Entity deduced from similar images on the Internet. + { + "DESCRIPTOR": _WEBDETECTION_WEBENTITY, + "__module__": "google.cloud.vision_v1p1beta1.proto.web_detection_pb2", + "__doc__": """Entity deduced from similar images on the Internet. + Attributes: entity_id: Opaque entity ID. @@ -509,15 +527,16 @@ Canonical description of the entity, in English. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebEntity) - ), + }, ), - WebImage=_reflection.GeneratedProtocolMessageType( + "WebImage": _reflection.GeneratedProtocolMessageType( "WebImage", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBIMAGE, - __module__="google.cloud.vision_v1p1beta1.proto.web_detection_pb2", - __doc__="""Metadata for online images. + { + "DESCRIPTOR": _WEBDETECTION_WEBIMAGE, + "__module__": "google.cloud.vision_v1p1beta1.proto.web_detection_pb2", + "__doc__": """Metadata for online images. + Attributes: url: The result image URL. @@ -525,15 +544,16 @@ (Deprecated) Overall relevancy score for the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebImage) - ), + }, ), - WebPage=_reflection.GeneratedProtocolMessageType( + "WebPage": _reflection.GeneratedProtocolMessageType( "WebPage", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBPAGE, - __module__="google.cloud.vision_v1p1beta1.proto.web_detection_pb2", - __doc__="""Metadata for web pages. + { + "DESCRIPTOR": _WEBDETECTION_WEBPAGE, + "__module__": "google.cloud.vision_v1p1beta1.proto.web_detection_pb2", + "__doc__": """Metadata for web pages. + Attributes: url: The result web page URL. @@ -551,29 +571,31 @@ crops. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection.WebPage) - ), + }, ), - WebLabel=_reflection.GeneratedProtocolMessageType( + "WebLabel": _reflection.GeneratedProtocolMessageType( "WebLabel", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBLABEL, - __module__="google.cloud.vision_v1p1beta1.proto.web_detection_pb2", - __doc__="""Label to provide extra metadata for the web detection. + { + "DESCRIPTOR": _WEBDETECTION_WEBLABEL, + "__module__": "google.cloud.vision_v1p1beta1.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. + 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.v1p1beta1.WebDetection.WebLabel) - ), + }, ), - DESCRIPTOR=_WEBDETECTION, - __module__="google.cloud.vision_v1p1beta1.proto.web_detection_pb2", - __doc__="""Relevant information for the image from the Internet. + "DESCRIPTOR": _WEBDETECTION, + "__module__": "google.cloud.vision_v1p1beta1.proto.web_detection_pb2", + "__doc__": """Relevant information for the image from the Internet. + Attributes: web_entities: Deduced entities from similar images on the Internet. @@ -593,7 +615,7 @@ Best guess text labels for the request image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.WebDetection) - ), + }, ) _sym_db.RegisterMessage(WebDetection) _sym_db.RegisterMessage(WebDetection.WebEntity) diff --git a/google/cloud/vision_v1p1beta1/proto/web_detection_pb2_grpc.py b/google/cloud/vision_v1p1beta1/proto/web_detection_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p1beta1/proto/web_detection_pb2_grpc.py +++ b/google/cloud/vision_v1p1beta1/proto/web_detection_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p1beta1/types.py b/google/cloud/vision_v1p1beta1/types.py index 08c79370..0a9d2895 100644 --- a/google/cloud/vision_v1p1beta1/types.py +++ b/google/cloud/vision_v1p1beta1/types.py @@ -31,7 +31,13 @@ from google.type import latlng_pb2 -_shared_modules = [any_pb2, wrappers_pb2, status_pb2, color_pb2, latlng_pb2] +_shared_modules = [ + any_pb2, + wrappers_pb2, + status_pb2, + color_pb2, + latlng_pb2, +] _local_modules = [ geometry_pb2, diff --git a/google/cloud/vision_v1p2beta1/__init__.py b/google/cloud/vision_v1p2beta1/__init__.py index 19f8c4e5..43e50de1 100644 --- a/google/cloud/vision_v1p2beta1/__init__.py +++ b/google/cloud/vision_v1p2beta1/__init__.py @@ -29,8 +29,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) @@ -42,4 +42,8 @@ class ImageAnnotatorClient(VisionHelpers, iac.ImageAnnotatorClient): enums = enums -__all__ = ("enums", "types", "ImageAnnotatorClient") +__all__ = ( + "enums", + "types", + "ImageAnnotatorClient", +) diff --git a/google/cloud/vision_v1p2beta1/gapic/enums.py b/google/cloud/vision_v1p2beta1/gapic/enums.py index cda4f64c..2bc57b08 100644 --- a/google/cloud/vision_v1p2beta1/gapic/enums.py +++ b/google/cloud/vision_v1p2beta1/gapic/enums.py @@ -158,9 +158,9 @@ class Type(enum.IntEnum): LANDMARK_DETECTION (int): Run landmark detection. LOGO_DETECTION (int): Run logo detection. LABEL_DETECTION (int): Run label detection. - TEXT_DETECTION (int): Run text detection / optical character recognition (OCR). Text detection - is optimized for areas of text within a larger image; if the image is a - document, use ``DOCUMENT_TEXT_DETECTION`` instead. + TEXT_DETECTION (int): Run text detection / optical character recognition (OCR). Text + detection is optimized for areas of text within a larger image; if the + image is a document, use ``DOCUMENT_TEXT_DETECTION`` instead. DOCUMENT_TEXT_DETECTION (int): Run dense text document OCR. Takes precedence when both ``DOCUMENT_TEXT_DETECTION`` and ``TEXT_DETECTION`` are present. SAFE_SEARCH_DETECTION (int): Run Safe Search to detect potentially unsafe diff --git a/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.py b/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.py index 28f7ce16..8a7b02a9 100644 --- a/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.py @@ -39,7 +39,7 @@ from google.longrunning import operations_pb2 -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision").version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision",).version class ImageAnnotatorClient(object): @@ -163,12 +163,12 @@ def __init__( self.transport = transport else: self.transport = image_annotator_grpc_transport.ImageAnnotatorGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -179,7 +179,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -189,7 +189,7 @@ def __init__( self._inner_api_calls = {} # Service calls - def batch_annotate_images( + def async_batch_annotate_files( self, requests, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -197,7 +197,12 @@ def batch_annotate_images( metadata=None, ): """ - Run image detection and annotation for a batch of images. + 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). Example: >>> from google.cloud import vision_v1p2beta1 @@ -207,13 +212,22 @@ def batch_annotate_images( >>> # TODO: Initialize `requests`: >>> requests = [] >>> - >>> response = client.batch_annotate_images(requests) + >>> response = client.async_batch_annotate_files(requests) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() Args: - requests (list[Union[dict, ~google.cloud.vision_v1p2beta1.types.AnnotateImageRequest]]): Required. Individual image annotation requests for this batch. + requests (list[Union[dict, ~google.cloud.vision_v1p2beta1.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_v1p2beta1.types.AnnotateImageRequest` + message :class:`~google.cloud.vision_v1p2beta1.types.AsyncAnnotateFileRequest` 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. @@ -224,7 +238,7 @@ def batch_annotate_images( that is provided to the method. Returns: - A :class:`~google.cloud.vision_v1p2beta1.types.BatchAnnotateImagesResponse` instance. + A :class:`~google.cloud.vision_v1p2beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -234,22 +248,28 @@ def batch_annotate_images( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "batch_annotate_images" not in self._inner_api_calls: + if "async_batch_annotate_files" not in self._inner_api_calls: self._inner_api_calls[ - "batch_annotate_images" + "async_batch_annotate_files" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_annotate_images, - default_retry=self._method_configs["BatchAnnotateImages"].retry, - default_timeout=self._method_configs["BatchAnnotateImages"].timeout, + self.transport.async_batch_annotate_files, + default_retry=self._method_configs["AsyncBatchAnnotateFiles"].retry, + default_timeout=self._method_configs["AsyncBatchAnnotateFiles"].timeout, client_info=self._client_info, ) - request = image_annotator_pb2.BatchAnnotateImagesRequest(requests=requests) - return self._inner_api_calls["batch_annotate_images"]( + request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest(requests=requests,) + operation = self._inner_api_calls["async_batch_annotate_files"]( request, retry=retry, timeout=timeout, metadata=metadata ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + image_annotator_pb2.AsyncBatchAnnotateFilesResponse, + metadata_type=image_annotator_pb2.OperationMetadata, + ) - def async_batch_annotate_files( + def batch_annotate_images( self, requests, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -257,12 +277,7 @@ def async_batch_annotate_files( metadata=None, ): """ - 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). + Run image detection and annotation for a batch of images. Example: >>> from google.cloud import vision_v1p2beta1 @@ -272,22 +287,13 @@ def async_batch_annotate_files( >>> # TODO: Initialize `requests`: >>> requests = [] >>> - >>> response = client.async_batch_annotate_files(requests) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() + >>> response = client.batch_annotate_images(requests) Args: - requests (list[Union[dict, ~google.cloud.vision_v1p2beta1.types.AsyncAnnotateFileRequest]]): Required. Individual async file annotation requests for this batch. + requests (list[Union[dict, ~google.cloud.vision_v1p2beta1.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_v1p2beta1.types.AsyncAnnotateFileRequest` + message :class:`~google.cloud.vision_v1p2beta1.types.AnnotateImageRequest` 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. @@ -298,7 +304,7 @@ def async_batch_annotate_files( that is provided to the method. Returns: - A :class:`~google.cloud.vision_v1p2beta1.types._OperationFuture` instance. + A :class:`~google.cloud.vision_v1p2beta1.types.BatchAnnotateImagesResponse` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -308,23 +314,17 @@ def async_batch_annotate_files( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "async_batch_annotate_files" not in self._inner_api_calls: + if "batch_annotate_images" not in self._inner_api_calls: self._inner_api_calls[ - "async_batch_annotate_files" + "batch_annotate_images" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.async_batch_annotate_files, - default_retry=self._method_configs["AsyncBatchAnnotateFiles"].retry, - default_timeout=self._method_configs["AsyncBatchAnnotateFiles"].timeout, + self.transport.batch_annotate_images, + default_retry=self._method_configs["BatchAnnotateImages"].retry, + default_timeout=self._method_configs["BatchAnnotateImages"].timeout, client_info=self._client_info, ) - request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest(requests=requests) - operation = self._inner_api_calls["async_batch_annotate_files"]( + request = image_annotator_pb2.BatchAnnotateImagesRequest(requests=requests,) + return self._inner_api_calls["batch_annotate_images"]( request, retry=retry, timeout=timeout, metadata=metadata ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - image_annotator_pb2.AsyncBatchAnnotateFilesResponse, - metadata_type=image_annotator_pb2.OperationMetadata, - ) diff --git a/google/cloud/vision_v1p2beta1/gapic/image_annotator_client_config.py b/google/cloud/vision_v1p2beta1/gapic/image_annotator_client_config.py index 9ed71995..f28a817c 100644 --- a/google/cloud/vision_v1p2beta1/gapic/image_annotator_client_config.py +++ b/google/cloud/vision_v1p2beta1/gapic/image_annotator_client_config.py @@ -2,30 +2,39 @@ "interfaces": { "google.cloud.vision.v1p2beta1.ImageAnnotator": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["UNAVAILABLE", "DEADLINE_EXCEEDED"], + "no_retry_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, }, "methods": { - "BatchAnnotateImages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, "AsyncBatchAnnotateFiles": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + "BatchAnnotateImages": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/google/cloud/vision_v1p2beta1/gapic/transports/image_annotator_grpc_transport.py b/google/cloud/vision_v1p2beta1/gapic/transports/image_annotator_grpc_transport.py index 40345e17..d3ac5544 100644 --- a/google/cloud/vision_v1p2beta1/gapic/transports/image_annotator_grpc_transport.py +++ b/google/cloud/vision_v1p2beta1/gapic/transports/image_annotator_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -76,7 +76,9 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "image_annotator_stub": image_annotator_pb2_grpc.ImageAnnotatorStub(channel) + "image_annotator_stub": image_annotator_pb2_grpc.ImageAnnotatorStub( + channel + ), } # Because this API includes a method that returns a @@ -118,19 +120,6 @@ def channel(self): """ return self._channel - @property - def batch_annotate_images(self): - """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_images`. - - Run image detection and annotation for a batch of images. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["image_annotator_stub"].BatchAnnotateImages - @property def async_batch_annotate_files(self): """Return the gRPC stub for :meth:`ImageAnnotatorClient.async_batch_annotate_files`. @@ -148,3 +137,16 @@ def async_batch_annotate_files(self): deserialized response object. """ return self._stubs["image_annotator_stub"].AsyncBatchAnnotateFiles + + @property + def batch_annotate_images(self): + """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_images`. + + Run image detection and annotation for a batch of images. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["image_annotator_stub"].BatchAnnotateImages diff --git a/google/cloud/vision_v1p2beta1/proto/geometry_pb2.py b/google/cloud/vision_v1p2beta1/proto/geometry_pb2.py index dabb8f83..9444883b 100644 --- a/google/cloud/vision_v1p2beta1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1p2beta1/proto/geometry_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p2beta1/proto/geometry.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -19,12 +16,9 @@ name="google/cloud/vision_v1p2beta1/proto/geometry.proto", package="google.cloud.vision.v1p2beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p2beta1B\rGeometryProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n2google/cloud/vision_v1p2beta1/proto/geometry.proto\x12\x1dgoogle.cloud.vision.v1p2beta1"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02"\x95\x01\n\x0c\x42oundingPoly\x12\x37\n\x08vertices\x18\x01 \x03(\x0b\x32%.google.cloud.vision.v1p2beta1.Vertex\x12L\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.NormalizedVertex"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42|\n!com.google.cloud.vision.v1p2beta1B\rGeometryProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p2beta1B\rGeometryProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/vision_v1p2beta1/proto/geometry.proto\x12\x1dgoogle.cloud.vision.v1p2beta1"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02"\x95\x01\n\x0c\x42oundingPoly\x12\x37\n\x08vertices\x18\x01 \x03(\x0b\x32%.google.cloud.vision.v1p2beta1.Vertex\x12L\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.NormalizedVertex"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42|\n!com.google.cloud.vision.v1p2beta1B\rGeometryProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3', ) @@ -34,6 +28,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -52,6 +47,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -70,6 +66,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -91,6 +88,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -109,6 +107,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -127,6 +126,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -148,6 +148,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="vertices", @@ -166,6 +167,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="normalized_vertices", @@ -184,6 +186,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -205,6 +208,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -223,6 +227,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -241,6 +246,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="z", @@ -259,6 +265,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -284,42 +291,45 @@ Vertex = _reflection.GeneratedProtocolMessageType( "Vertex", (_message.Message,), - dict( - DESCRIPTOR=_VERTEX, - __module__="google.cloud.vision_v1p2beta1.proto.geometry_pb2", - __doc__="""X coordinate. + { + "DESCRIPTOR": _VERTEX, + "__module__": "google.cloud.vision_v1p2beta1.proto.geometry_pb2", + "__doc__": """X coordinate. + Attributes: y: Y coordinate. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Vertex) - ), + }, ) _sym_db.RegisterMessage(Vertex) NormalizedVertex = _reflection.GeneratedProtocolMessageType( "NormalizedVertex", (_message.Message,), - dict( - DESCRIPTOR=_NORMALIZEDVERTEX, - __module__="google.cloud.vision_v1p2beta1.proto.geometry_pb2", - __doc__="""X coordinate. + { + "DESCRIPTOR": _NORMALIZEDVERTEX, + "__module__": "google.cloud.vision_v1p2beta1.proto.geometry_pb2", + "__doc__": """X coordinate. + Attributes: y: Y coordinate. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.NormalizedVertex) - ), + }, ) _sym_db.RegisterMessage(NormalizedVertex) BoundingPoly = _reflection.GeneratedProtocolMessageType( "BoundingPoly", (_message.Message,), - dict( - DESCRIPTOR=_BOUNDINGPOLY, - __module__="google.cloud.vision_v1p2beta1.proto.geometry_pb2", - __doc__="""A bounding polygon for the detected image annotation. + { + "DESCRIPTOR": _BOUNDINGPOLY, + "__module__": "google.cloud.vision_v1p2beta1.proto.geometry_pb2", + "__doc__": """A bounding polygon for the detected image annotation. + Attributes: vertices: The bounding polygon vertices. @@ -327,19 +337,20 @@ The bounding polygon normalized vertices. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BoundingPoly) - ), + }, ) _sym_db.RegisterMessage(BoundingPoly) Position = _reflection.GeneratedProtocolMessageType( "Position", (_message.Message,), - dict( - DESCRIPTOR=_POSITION, - __module__="google.cloud.vision_v1p2beta1.proto.geometry_pb2", - __doc__="""A 3D position in the image, used primarily for Face detection + { + "DESCRIPTOR": _POSITION, + "__module__": "google.cloud.vision_v1p2beta1.proto.geometry_pb2", + "__doc__": """A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image. + Attributes: x: X coordinate. @@ -349,7 +360,7 @@ Z coordinate (or depth). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Position) - ), + }, ) _sym_db.RegisterMessage(Position) diff --git a/google/cloud/vision_v1p2beta1/proto/geometry_pb2_grpc.py b/google/cloud/vision_v1p2beta1/proto/geometry_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p2beta1/proto/geometry_pb2_grpc.py +++ b/google/cloud/vision_v1p2beta1/proto/geometry_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py b/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py index ce174bfe..9e9c6380 100644 --- a/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py +++ b/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p2beta1/proto/image_annotator.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -41,12 +38,9 @@ name="google/cloud/vision_v1p2beta1/proto/image_annotator.proto", package="google.cloud.vision.v1p2beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p2beta1B\023ImageAnnotatorProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n9google/cloud/vision_v1p2beta1/proto/image_annotator.proto\x12\x1dgoogle.cloud.vision.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x32google/cloud/vision_v1p2beta1/proto/geometry.proto\x1a\x39google/cloud/vision_v1p2beta1/proto/text_annotation.proto\x1a\x37google/cloud/vision_v1p2beta1/proto/web_detection.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x18google/type/latlng.proto"\xe1\x02\n\x07\x46\x65\x61ture\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.vision.v1p2beta1.Feature.Type\x12\x13\n\x0bmax_results\x18\x02 \x01(\x05\x12\r\n\x05model\x18\x03 \x01(\t"\xf6\x01\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"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.v1p2beta1.ImageSource"\x9b\x0e\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12\x45\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12I\n\tlandmarks\x18\x03 \x03(\x0b\x32\x36.google.cloud.vision.v1p2beta1.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.v1p2beta1.Likelihood\x12\x44\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x43\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x46\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12K\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x45\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x46\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x1a\xc7\x07\n\x08Landmark\x12I\n\x04type\x18\x03 \x01(\x0e\x32;.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type\x12\x39\n\x08position\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1p2beta1.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"\xbc\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\x12\n\nconfidence\x18\x05 \x01(\x02\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12\x42\n\rbounding_poly\x18\x07 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12>\n\tlocations\x18\x08 \x03(\x0b\x32+.google.cloud.vision.v1p2beta1.LocationInfo\x12;\n\nproperties\x18\t \x03(\x0b\x32\'.google.cloud.vision.v1p2beta1.Property"\xbc\x02\n\x14SafeSearchAnnotation\x12\x38\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x38\n\x05spoof\x18\x02 \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12:\n\x07medical\x18\x03 \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12;\n\x08violence\x18\x04 \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x37\n\x04racy\x18\t \x01(\x0e\x32).google.cloud.vision.v1p2beta1.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.v1p2beta1.ColorInfo"c\n\x0fImageProperties\x12P\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x37.google.cloud.vision.v1p2beta1.DominantColorsAnnotation"\x7f\n\x08\x43ropHint\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.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.v1p2beta1.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"\x85\x02\n\x0cImageContext\x12\x41\n\rlat_long_rect\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p2beta1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12I\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32..google.cloud.vision.v1p2beta1.CropHintsParams\x12O\n\x14web_detection_params\x18\x06 \x01(\x0b\x32\x31.google.cloud.vision.v1p2beta1.WebDetectionParams"\xc9\x01\n\x14\x41nnotateImageRequest\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1p2beta1.Image\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p2beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.ImageContext":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05"\x8a\x07\n\x15\x41nnotateImageResponse\x12G\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p2beta1.FaceAnnotation\x12M\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.EntityAnnotation\x12I\n\x10logo_annotations\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.EntityAnnotation\x12J\n\x11label_annotations\x18\x04 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.EntityAnnotation\x12I\n\x10text_annotations\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.EntityAnnotation\x12K\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32-.google.cloud.vision.v1p2beta1.TextAnnotation\x12S\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32\x33.google.cloud.vision.v1p2beta1.SafeSearchAnnotation\x12S\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32..google.cloud.vision.v1p2beta1.ImageProperties\x12Q\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32\x32.google.cloud.vision.v1p2beta1.CropHintsAnnotation\x12\x42\n\rweb_detection\x18\r \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.WebDetection\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.v1p2beta1.ImageAnnotationContext"\xa1\x01\n\x14\x41nnotateFileResponse\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p2beta1.InputConfig\x12G\n\tresponses\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.AnnotateImageResponse"h\n\x1a\x42\x61tchAnnotateImagesRequest\x12J\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p2beta1.AnnotateImageRequestB\x03\xe0\x41\x02"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.AnnotateImageResponse"\x9e\x02\n\x18\x41syncAnnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p2beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p2beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.ImageContext\x12\x42\n\routput_config\x18\x04 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.OutputConfig"_\n\x19\x41syncAnnotateFileResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.OutputConfig"p\n\x1e\x41syncBatchAnnotateFilesRequest\x12N\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02"n\n\x1f\x41syncBatchAnnotateFilesResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32\x38.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse"^\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32(.google.cloud.vision.v1p2beta1.GcsSource\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.v1p2beta1.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.v1p2beta1.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\xb5\x04\n\x0eImageAnnotator\x12\xbe\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse"0\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p2beta1/images:annotate:\x01*\xda\x41\x08requests\x12\xe9\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02("#/v1p2beta1/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\x82\x01\n!com.google.cloud.vision.v1p2beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p2beta1B\023ImageAnnotatorProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n9google/cloud/vision_v1p2beta1/proto/image_annotator.proto\x12\x1dgoogle.cloud.vision.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x32google/cloud/vision_v1p2beta1/proto/geometry.proto\x1a\x39google/cloud/vision_v1p2beta1/proto/text_annotation.proto\x1a\x37google/cloud/vision_v1p2beta1/proto/web_detection.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x17google/type/color.proto\x1a\x18google/type/latlng.proto"\xe1\x02\n\x07\x46\x65\x61ture\x12\x39\n\x04type\x18\x01 \x01(\x0e\x32+.google.cloud.vision.v1p2beta1.Feature.Type\x12\x13\n\x0bmax_results\x18\x02 \x01(\x05\x12\r\n\x05model\x18\x03 \x01(\t"\xf6\x01\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"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.v1p2beta1.ImageSource"\x9b\x0e\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12\x45\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12I\n\tlandmarks\x18\x03 \x03(\x0b\x32\x36.google.cloud.vision.v1p2beta1.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.v1p2beta1.Likelihood\x12\x44\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x43\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x46\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12K\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x45\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x46\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x1a\xc7\x07\n\x08Landmark\x12I\n\x04type\x18\x03 \x01(\x0e\x32;.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type\x12\x39\n\x08position\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1p2beta1.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"\xbc\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\x12\n\nconfidence\x18\x05 \x01(\x02\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12\x42\n\rbounding_poly\x18\x07 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12>\n\tlocations\x18\x08 \x03(\x0b\x32+.google.cloud.vision.v1p2beta1.LocationInfo\x12;\n\nproperties\x18\t \x03(\x0b\x32\'.google.cloud.vision.v1p2beta1.Property"\xbc\x02\n\x14SafeSearchAnnotation\x12\x38\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x38\n\x05spoof\x18\x02 \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12:\n\x07medical\x18\x03 \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12;\n\x08violence\x18\x04 \x01(\x0e\x32).google.cloud.vision.v1p2beta1.Likelihood\x12\x37\n\x04racy\x18\t \x01(\x0e\x32).google.cloud.vision.v1p2beta1.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.v1p2beta1.ColorInfo"c\n\x0fImageProperties\x12P\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x37.google.cloud.vision.v1p2beta1.DominantColorsAnnotation"\x7f\n\x08\x43ropHint\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.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.v1p2beta1.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"\x85\x02\n\x0cImageContext\x12\x41\n\rlat_long_rect\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p2beta1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12I\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32..google.cloud.vision.v1p2beta1.CropHintsParams\x12O\n\x14web_detection_params\x18\x06 \x01(\x0b\x32\x31.google.cloud.vision.v1p2beta1.WebDetectionParams"\xc9\x01\n\x14\x41nnotateImageRequest\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1p2beta1.Image\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p2beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.ImageContext":\n\x16ImageAnnotationContext\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05"\x8a\x07\n\x15\x41nnotateImageResponse\x12G\n\x10\x66\x61\x63\x65_annotations\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p2beta1.FaceAnnotation\x12M\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.EntityAnnotation\x12I\n\x10logo_annotations\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.EntityAnnotation\x12J\n\x11label_annotations\x18\x04 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.EntityAnnotation\x12I\n\x10text_annotations\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p2beta1.EntityAnnotation\x12K\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32-.google.cloud.vision.v1p2beta1.TextAnnotation\x12S\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32\x33.google.cloud.vision.v1p2beta1.SafeSearchAnnotation\x12S\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32..google.cloud.vision.v1p2beta1.ImageProperties\x12Q\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32\x32.google.cloud.vision.v1p2beta1.CropHintsAnnotation\x12\x42\n\rweb_detection\x18\r \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.WebDetection\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.v1p2beta1.ImageAnnotationContext"\xa1\x01\n\x14\x41nnotateFileResponse\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p2beta1.InputConfig\x12G\n\tresponses\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.AnnotateImageResponse"h\n\x1a\x42\x61tchAnnotateImagesRequest\x12J\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p2beta1.AnnotateImageRequestB\x03\xe0\x41\x02"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.AnnotateImageResponse"\x9e\x02\n\x18\x41syncAnnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p2beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p2beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.ImageContext\x12\x42\n\routput_config\x18\x04 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.OutputConfig"_\n\x19\x41syncAnnotateFileResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.OutputConfig"p\n\x1e\x41syncBatchAnnotateFilesRequest\x12N\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02"n\n\x1f\x41syncBatchAnnotateFilesResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32\x38.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse"^\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32(.google.cloud.vision.v1p2beta1.GcsSource\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.v1p2beta1.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.v1p2beta1.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\xb5\x04\n\x0eImageAnnotator\x12\xbe\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse"0\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p2beta1/images:annotate:\x01*\xda\x41\x08requests\x12\xe9\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02("#/v1p2beta1/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\x82\x01\n!com.google.cloud.vision.v1p2beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -67,24 +61,55 @@ full_name="google.cloud.vision.v1p2beta1.Likelihood", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERY_UNLIKELY", index=1, number=1, serialized_options=None, type=None + name="VERY_UNLIKELY", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UNLIKELY", index=2, number=2, serialized_options=None, type=None + name="UNLIKELY", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="POSSIBLE", index=3, number=3, serialized_options=None, type=None + name="POSSIBLE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LIKELY", index=4, number=4, serialized_options=None, type=None + name="LIKELY", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERY_LIKELY", index=5, number=5, serialized_options=None, type=None + name="VERY_LIKELY", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -108,6 +133,7 @@ full_name="google.cloud.vision.v1p2beta1.Feature.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TYPE_UNSPECIFIED", @@ -115,9 +141,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FACE_DETECTION", index=1, number=1, serialized_options=None, type=None + name="FACE_DETECTION", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LANDMARK_DETECTION", @@ -125,9 +157,15 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOGO_DETECTION", index=3, number=3, serialized_options=None, type=None + name="LOGO_DETECTION", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LABEL_DETECTION", @@ -135,9 +173,15 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TEXT_DETECTION", index=5, number=5, serialized_options=None, type=None + name="TEXT_DETECTION", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="DOCUMENT_TEXT_DETECTION", @@ -145,6 +189,7 @@ number=11, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SAFE_SEARCH_DETECTION", @@ -152,6 +197,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="IMAGE_PROPERTIES", @@ -159,9 +205,15 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CROP_HINTS", index=9, number=9, serialized_options=None, type=None + name="CROP_HINTS", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="WEB_DETECTION", @@ -169,6 +221,7 @@ number=10, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -183,6 +236,7 @@ full_name="google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="UNKNOWN_LANDMARK", @@ -190,12 +244,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LEFT_EYE", index=1, number=1, serialized_options=None, type=None + name="LEFT_EYE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RIGHT_EYE", index=2, number=2, serialized_options=None, type=None + name="RIGHT_EYE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_OF_LEFT_EYEBROW", @@ -203,6 +268,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_OF_LEFT_EYEBROW", @@ -210,6 +276,7 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_OF_RIGHT_EYEBROW", @@ -217,6 +284,7 @@ number=5, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_OF_RIGHT_EYEBROW", @@ -224,6 +292,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="MIDPOINT_BETWEEN_EYES", @@ -231,24 +300,55 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="NOSE_TIP", index=8, number=8, serialized_options=None, type=None + name="NOSE_TIP", + index=8, + number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UPPER_LIP", index=9, number=9, serialized_options=None, type=None + name="UPPER_LIP", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOWER_LIP", index=10, number=10, serialized_options=None, type=None + name="LOWER_LIP", + index=10, + number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_LEFT", index=11, number=11, serialized_options=None, type=None + name="MOUTH_LEFT", + index=11, + number=11, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_RIGHT", index=12, number=12, serialized_options=None, type=None + name="MOUTH_RIGHT", + index=12, + number=12, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_CENTER", index=13, number=13, serialized_options=None, type=None + name="MOUTH_CENTER", + index=13, + number=13, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_RIGHT", @@ -256,6 +356,7 @@ number=14, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_LEFT", @@ -263,6 +364,7 @@ number=15, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_CENTER", @@ -270,6 +372,7 @@ number=16, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_TOP_BOUNDARY", @@ -277,6 +380,7 @@ number=17, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_RIGHT_CORNER", @@ -284,6 +388,7 @@ number=18, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_BOTTOM_BOUNDARY", @@ -291,6 +396,7 @@ number=19, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_LEFT_CORNER", @@ -298,6 +404,7 @@ number=20, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_TOP_BOUNDARY", @@ -305,6 +412,7 @@ number=21, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_RIGHT_CORNER", @@ -312,6 +420,7 @@ number=22, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_BOTTOM_BOUNDARY", @@ -319,6 +428,7 @@ number=23, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_LEFT_CORNER", @@ -326,6 +436,7 @@ number=24, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYEBROW_UPPER_MIDPOINT", @@ -333,6 +444,7 @@ number=25, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYEBROW_UPPER_MIDPOINT", @@ -340,6 +452,7 @@ number=26, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EAR_TRAGION", @@ -347,6 +460,7 @@ number=27, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EAR_TRAGION", @@ -354,6 +468,7 @@ number=28, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_PUPIL", @@ -361,6 +476,7 @@ number=29, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_PUPIL", @@ -368,6 +484,7 @@ number=30, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="FOREHEAD_GLABELLA", @@ -375,6 +492,7 @@ number=31, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_GNATHION", @@ -382,6 +500,7 @@ number=32, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_LEFT_GONION", @@ -389,6 +508,7 @@ number=33, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_RIGHT_GONION", @@ -396,6 +516,7 @@ number=34, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -410,6 +531,7 @@ full_name="google.cloud.vision.v1p2beta1.OperationMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -417,18 +539,39 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CREATED", index=1, number=1, serialized_options=None, type=None + name="CREATED", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=2, number=2, serialized_options=None, type=None + name="RUNNING", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="DONE", index=3, number=3, serialized_options=None, type=None + name="DONE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=4, number=4, serialized_options=None, type=None + name="CANCELLED", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -445,6 +588,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -463,6 +607,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="max_results", @@ -481,6 +626,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -491,7 +637,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -499,11 +645,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_FEATURE_TYPE], + enum_types=[_FEATURE_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -520,6 +667,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_image_uri", @@ -530,7 +678,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -538,6 +686,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_uri", @@ -548,7 +697,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -556,6 +705,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -577,6 +727,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="content", @@ -587,7 +738,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -595,6 +746,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source", @@ -613,6 +765,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -634,6 +787,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -652,6 +806,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="position", @@ -670,11 +825,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_FACEANNOTATION_LANDMARK_TYPE], + enum_types=[_FACEANNOTATION_LANDMARK_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -690,6 +846,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -708,6 +865,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fd_bounding_poly", @@ -726,6 +884,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmarks", @@ -744,6 +903,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="roll_angle", @@ -762,6 +922,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pan_angle", @@ -780,6 +941,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tilt_angle", @@ -798,6 +960,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detection_confidence", @@ -816,6 +979,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmarking_confidence", @@ -834,6 +998,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="joy_likelihood", @@ -852,6 +1017,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sorrow_likelihood", @@ -870,6 +1036,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="anger_likelihood", @@ -888,6 +1055,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="surprise_likelihood", @@ -906,6 +1074,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="under_exposed_likelihood", @@ -924,6 +1093,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="blurred_likelihood", @@ -942,6 +1112,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="headwear_likelihood", @@ -960,10 +1131,11 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_FACEANNOTATION_LANDMARK], + nested_types=[_FACEANNOTATION_LANDMARK,], enum_types=[], serialized_options=None, is_extendable=False, @@ -981,6 +1153,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="lat_lng", @@ -999,7 +1172,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1020,6 +1194,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1030,7 +1205,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1038,6 +1213,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1048,7 +1224,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1056,6 +1232,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uint64_value", @@ -1074,6 +1251,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1095,6 +1273,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mid", @@ -1105,7 +1284,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1113,6 +1292,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="locale", @@ -1123,7 +1303,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1131,6 +1311,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1141,7 +1322,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1149,6 +1330,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1167,6 +1349,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1185,6 +1368,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="topicality", @@ -1203,6 +1387,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_poly", @@ -1221,6 +1406,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="locations", @@ -1239,6 +1425,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="properties", @@ -1257,6 +1444,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1278,6 +1466,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="adult", @@ -1296,6 +1485,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="spoof", @@ -1314,6 +1504,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="medical", @@ -1332,6 +1523,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="violence", @@ -1350,6 +1542,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="racy", @@ -1368,6 +1561,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1389,6 +1583,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="min_lat_lng", @@ -1407,6 +1602,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="max_lat_lng", @@ -1425,6 +1621,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1446,6 +1643,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="color", @@ -1464,6 +1662,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1482,6 +1681,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pixel_fraction", @@ -1500,6 +1700,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1521,6 +1722,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="colors", @@ -1539,7 +1741,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1560,6 +1763,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="dominant_colors", @@ -1578,7 +1782,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1599,6 +1804,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -1617,6 +1823,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1635,6 +1842,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="importance_fraction", @@ -1653,6 +1861,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1674,6 +1883,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="crop_hints", @@ -1692,7 +1902,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1713,6 +1924,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="aspect_ratios", @@ -1731,7 +1943,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1752,6 +1965,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="include_geo_results", @@ -1770,7 +1984,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1791,6 +2006,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="lat_long_rect", @@ -1809,6 +2025,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_hints", @@ -1827,6 +2044,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="crop_hints_params", @@ -1845,6 +2063,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="web_detection_params", @@ -1863,6 +2082,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1884,6 +2104,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="image", @@ -1902,6 +2123,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="features", @@ -1920,6 +2142,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_context", @@ -1938,6 +2161,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1959,6 +2183,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -1969,7 +2194,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1977,6 +2202,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_number", @@ -1995,6 +2221,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2016,6 +2243,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="face_annotations", @@ -2034,6 +2262,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmark_annotations", @@ -2052,6 +2281,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="logo_annotations", @@ -2070,6 +2300,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="label_annotations", @@ -2088,6 +2319,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text_annotations", @@ -2106,6 +2338,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_text_annotation", @@ -2124,6 +2357,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="safe_search_annotation", @@ -2142,6 +2376,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_properties_annotation", @@ -2160,6 +2395,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="crop_hints_annotation", @@ -2178,6 +2414,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="web_detection", @@ -2196,6 +2433,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="error", @@ -2214,6 +2452,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="context", @@ -2232,6 +2471,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2253,6 +2493,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_config", @@ -2271,6 +2512,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="responses", @@ -2289,6 +2531,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2310,6 +2553,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -2326,9 +2570,10 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2349,6 +2594,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="responses", @@ -2367,7 +2613,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2388,6 +2635,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_config", @@ -2406,6 +2654,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="features", @@ -2424,6 +2673,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_context", @@ -2442,6 +2692,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_config", @@ -2460,6 +2711,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2481,6 +2733,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="output_config", @@ -2499,7 +2752,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2520,6 +2774,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -2536,9 +2791,10 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2559,6 +2815,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="responses", @@ -2577,7 +2834,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2598,6 +2856,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -2616,6 +2875,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mime_type", @@ -2626,7 +2886,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2634,6 +2894,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2655,6 +2916,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", @@ -2673,6 +2935,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="batch_size", @@ -2691,6 +2954,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2712,6 +2976,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -2722,7 +2987,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2730,7 +2995,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2751,6 +3017,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -2761,7 +3028,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2769,7 +3036,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2790,6 +3058,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="state", @@ -2808,6 +3077,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -2826,6 +3096,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -2844,11 +3115,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_OPERATIONMETADATA_STATE], + enum_types=[_OPERATIONMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -3040,12 +3312,13 @@ Feature = _reflection.GeneratedProtocolMessageType( "Feature", (_message.Message,), - dict( - DESCRIPTOR=_FEATURE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""The type of Google Cloud Vision API detection to perform, and the + { + "DESCRIPTOR": _FEATURE, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple ``Feature`` objects can be specified in the ``features`` list. + Attributes: type: The feature type. @@ -3055,21 +3328,22 @@ ``CROP_HINTS``. model: Model to use for the feature. Supported values: - "builtin/stable" (the default if unset) and "builtin/latest". + “builtin/stable” (the default if unset) and “builtin/latest”. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Feature) - ), + }, ) _sym_db.RegisterMessage(Feature) ImageSource = _reflection.GeneratedProtocolMessageType( "ImageSource", (_message.Message,), - dict( - DESCRIPTOR=_IMAGESOURCE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage or web URL image + { + "DESCRIPTOR": _IMAGESOURCE, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """External image source (Google Cloud Storage or web URL image location). + Attributes: gcs_image_uri: \ **Use ``image_uri`` instead.** The Google Cloud Storage URI @@ -3086,7 +3360,7 @@ more info. 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Google cannot guarantee that the request will be completed. Your request - may fail if the specified host denies the request (e.g. due + may fail if the specified host denies the request (e.g. due to request throttling or DOS prevention), or if Google throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production @@ -3094,17 +3368,18 @@ are specified, ``image_uri`` takes precedence. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageSource) - ), + }, ) _sym_db.RegisterMessage(ImageSource) Image = _reflection.GeneratedProtocolMessageType( "Image", (_message.Message,), - dict( - DESCRIPTOR=_IMAGE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + { + "DESCRIPTOR": _IMAGE, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Client image to perform Google Cloud Vision API tasks over. + Attributes: content: Image content, represented as a stream of bytes. Note: As with @@ -3117,21 +3392,22 @@ the image annotation request. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Image) - ), + }, ) _sym_db.RegisterMessage(Image) FaceAnnotation = _reflection.GeneratedProtocolMessageType( "FaceAnnotation", (_message.Message,), - dict( - Landmark=_reflection.GeneratedProtocolMessageType( + { + "Landmark": _reflection.GeneratedProtocolMessageType( "Landmark", (_message.Message,), - dict( - DESCRIPTOR=_FACEANNOTATION_LANDMARK, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""A face-specific landmark (for example, a face feature). + { + "DESCRIPTOR": _FACEANNOTATION_LANDMARK, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """A face-specific landmark (for example, a face feature). + Attributes: type: Face landmark type. @@ -3139,16 +3415,17 @@ Face landmark position. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) - ), + }, ), - DESCRIPTOR=_FACEANNOTATION, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + "DESCRIPTOR": _FACEANNOTATION, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """A face annotation object contains the results of face detection. + Attributes: bounding_poly: The bounding polygon around the face. The coordinates of the - bounding box are in the original image's scale, as returned in - ``ImageParams``. The bounding box is computed to "frame" the + bounding box are in the original image’s scale, as returned in + ``ImageParams``. The bounding box is computed to “frame” the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the ``BoundingPoly`` (the @@ -3158,7 +3435,7 @@ The ``fd_bounding_poly`` bounding polygon is tighter than the ``boundingPoly``, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image - analysis that detects the "amount of skin" visible in an + analysis that detects the “amount of skin” visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix. landmarks: @@ -3173,7 +3450,7 @@ perpendicular to the image. Range [-180,180]. tilt_angle: Pitch angle, which indicates the upwards/downwards angle that - the face is pointing relative to the image's horizontal plane. + the face is pointing relative to the image’s horizontal plane. Range [-180,180]. detection_confidence: Detection confidence. Range [0, 1]. @@ -3195,7 +3472,7 @@ Headwear likelihood. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.FaceAnnotation) - ), + }, ) _sym_db.RegisterMessage(FaceAnnotation) _sym_db.RegisterMessage(FaceAnnotation.Landmark) @@ -3203,26 +3480,28 @@ LocationInfo = _reflection.GeneratedProtocolMessageType( "LocationInfo", (_message.Message,), - dict( - DESCRIPTOR=_LOCATIONINFO, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Detected entity location information. + { + "DESCRIPTOR": _LOCATIONINFO, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Detected entity location information. + Attributes: lat_lng: lat/long location coordinates. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.LocationInfo) - ), + }, ) _sym_db.RegisterMessage(LocationInfo) Property = _reflection.GeneratedProtocolMessageType( "Property", (_message.Message,), - dict( - DESCRIPTOR=_PROPERTY, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + { + "DESCRIPTOR": _PROPERTY, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """A ``Property`` consists of a user-supplied name/value pair. + Attributes: name: Name of the property. @@ -3232,17 +3511,18 @@ Value of numeric properties. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Property) - ), + }, ) _sym_db.RegisterMessage(Property) EntityAnnotation = _reflection.GeneratedProtocolMessageType( "EntityAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_ENTITYANNOTATION, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Set of detected entity features. + { + "DESCRIPTOR": _ENTITYANNOTATION, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Set of detected entity features. + Attributes: mid: Opaque entity ID. Some IDs may be available in `Google @@ -3259,13 +3539,13 @@ confidence: \ **Deprecated. Use ``score`` instead.** The accuracy of the entity detection in an image. For example, for an image in - which the "Eiffel Tower" entity is detected, this field + which the “Eiffel Tower” entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1]. topicality: The relevancy of the ICA (Image Content Annotation) label to - the image. For example, the relevancy of "tower" is likely - higher to an image containing the detected "Eiffel Tower" than + the image. For example, the relevancy of “tower” is likely + higher to an image containing the detected “Eiffel Tower” than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1]. @@ -3285,19 +3565,20 @@ entity. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.EntityAnnotation) - ), + }, ) _sym_db.RegisterMessage(EntityAnnotation) SafeSearchAnnotation = _reflection.GeneratedProtocolMessageType( "SafeSearchAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_SAFESEARCHANNOTATION, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Set of features pertaining to the image, computed by computer vision + { + "DESCRIPTOR": _SAFESEARCHANNOTATION, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence). + Attributes: adult: Represents the adult content likelihood for the image. Adult @@ -3305,7 +3586,7 @@ images or cartoons, or sexual activities. spoof: Spoof likelihood. The likelihood that an modification was made - to the image's canonical version to make it appear funny or + to the image’s canonical version to make it appear funny or offensive. medical: Likelihood that this is a medical image. @@ -3318,17 +3599,18 @@ poses, or close-ups of sensitive body areas. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.SafeSearchAnnotation) - ), + }, ) _sym_db.RegisterMessage(SafeSearchAnnotation) LatLongRect = _reflection.GeneratedProtocolMessageType( "LatLongRect", (_message.Message,), - dict( - DESCRIPTOR=_LATLONGRECT, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Rectangle determined by min and max ``LatLng`` pairs. + { + "DESCRIPTOR": _LATLONGRECT, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Rectangle determined by min and max ``LatLng`` pairs. + Attributes: min_lat_lng: Min lat/long pair. @@ -3336,18 +3618,19 @@ Max lat/long pair. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.LatLongRect) - ), + }, ) _sym_db.RegisterMessage(LatLongRect) ColorInfo = _reflection.GeneratedProtocolMessageType( "ColorInfo", (_message.Message,), - dict( - DESCRIPTOR=_COLORINFO, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Color information consists of RGB channels, score, and the fraction of + { + "DESCRIPTOR": _COLORINFO, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image. + Attributes: color: RGB components of the color. @@ -3358,54 +3641,57 @@ in range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ColorInfo) - ), + }, ) _sym_db.RegisterMessage(ColorInfo) DominantColorsAnnotation = _reflection.GeneratedProtocolMessageType( "DominantColorsAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_DOMINANTCOLORSANNOTATION, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Set of dominant colors and their corresponding scores. + { + "DESCRIPTOR": _DOMINANTCOLORSANNOTATION, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Set of dominant colors and their corresponding scores. + Attributes: colors: RGB color values with their score and pixel fraction. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.DominantColorsAnnotation) - ), + }, ) _sym_db.RegisterMessage(DominantColorsAnnotation) ImageProperties = _reflection.GeneratedProtocolMessageType( "ImageProperties", (_message.Message,), - dict( - DESCRIPTOR=_IMAGEPROPERTIES, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Stores image properties, such as dominant colors. + { + "DESCRIPTOR": _IMAGEPROPERTIES, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Stores image properties, such as dominant colors. + Attributes: dominant_colors: If present, dominant colors completed successfully. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageProperties) - ), + }, ) _sym_db.RegisterMessage(ImageProperties) CropHint = _reflection.GeneratedProtocolMessageType( "CropHint", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINT, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Single crop hint that is used to generate a new crop when serving an + { + "DESCRIPTOR": _CROPHINT, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Single crop hint that is used to generate a new crop when serving an image. + Attributes: bounding_poly: The bounding polygon for the crop region. The coordinates of - the bounding box are in the original image's scale, as + the bounding box are in the original image’s scale, as returned in ``ImageParams``. confidence: Confidence of this being a salient region. Range [0, 1]. @@ -3414,34 +3700,36 @@ the original image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHint) - ), + }, ) _sym_db.RegisterMessage(CropHint) CropHintsAnnotation = _reflection.GeneratedProtocolMessageType( "CropHintsAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINTSANNOTATION, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Set of crop hints that are used to generate new crops when serving + { + "DESCRIPTOR": _CROPHINTSANNOTATION, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Set of crop hints that are used to generate new crops when serving images. + Attributes: crop_hints: Crop hint results. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHintsAnnotation) - ), + }, ) _sym_db.RegisterMessage(CropHintsAnnotation) CropHintsParams = _reflection.GeneratedProtocolMessageType( "CropHintsParams", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINTSPARAMS, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Parameters for crop hints annotation request. + { + "DESCRIPTOR": _CROPHINTSPARAMS, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Parameters for crop hints annotation request. + Attributes: aspect_ratios: Aspect ratios in floats, representing the ratio of the width @@ -3452,47 +3740,49 @@ 16; any aspect ratios provided after the 16th are ignored. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.CropHintsParams) - ), + }, ) _sym_db.RegisterMessage(CropHintsParams) WebDetectionParams = _reflection.GeneratedProtocolMessageType( "WebDetectionParams", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTIONPARAMS, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Parameters for web detection request. + { + "DESCRIPTOR": _WEBDETECTIONPARAMS, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Parameters for web detection request. + Attributes: include_geo_results: Whether to include results derived from the geo information in the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetectionParams) - ), + }, ) _sym_db.RegisterMessage(WebDetectionParams) ImageContext = _reflection.GeneratedProtocolMessageType( "ImageContext", (_message.Message,), - dict( - DESCRIPTOR=_IMAGECONTEXT, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Image context and/or feature-specific parameters. + { + "DESCRIPTOR": _IMAGECONTEXT, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Image context and/or feature-specific parameters. + Attributes: lat_long_rect: Not used. language_hints: - List of languages to use for TEXT\_DETECTION. In most cases, - an empty value yields the best results since it enables - automatic language detection. For languages based on the Latin - alphabet, setting ``language_hints`` is not needed. In rare - cases, when the language of the text in the image is known, - setting a hint will help get better results (although it will - be a significant hindrance if the hint is wrong). Text - detection returns an error if one or more of the specified - languages is not one of the `supported languages + List of languages to use for TEXT_DETECTION. In most cases, an + empty value yields the best results since it enables automatic + language detection. For languages based on the Latin alphabet, + setting ``language_hints`` is not needed. In rare cases, when + the language of the text in the image is known, setting a hint + will help get better results (although it will be a + significant hindrance if the hint is wrong). Text detection + returns an error if one or more of the specified languages is + not one of the `supported languages `__. crop_hints_params: Parameters for crop hints annotation request. @@ -3500,18 +3790,19 @@ Parameters for web detection. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageContext) - ), + }, ) _sym_db.RegisterMessage(ImageContext) AnnotateImageRequest = _reflection.GeneratedProtocolMessageType( "AnnotateImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGEREQUEST, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Request for performing Google Cloud Vision API tasks over a user- + { + "DESCRIPTOR": _ANNOTATEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Request for performing Google Cloud Vision API tasks over a user- provided image, with user-requested features. + Attributes: image: The image to be processed. @@ -3521,18 +3812,19 @@ Additional context that may accompany the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateImageRequest) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageRequest) ImageAnnotationContext = _reflection.GeneratedProtocolMessageType( "ImageAnnotationContext", (_message.Message,), - dict( - DESCRIPTOR=_IMAGEANNOTATIONCONTEXT, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""If an image was produced from a file (e.g. a PDF), this message gives + { + "DESCRIPTOR": _IMAGEANNOTATIONCONTEXT, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image. + Attributes: uri: The URI of the file used to produce the image. @@ -3541,17 +3833,18 @@ number within the file used to produce the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.ImageAnnotationContext) - ), + }, ) _sym_db.RegisterMessage(ImageAnnotationContext) AnnotateImageResponse = _reflection.GeneratedProtocolMessageType( "AnnotateImageResponse", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGERESPONSE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Response to an image annotation request. + { + "DESCRIPTOR": _ANNOTATEIMAGERESPONSE, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Response to an image annotation request. + Attributes: face_annotations: If present, face detection has completed successfully. @@ -3584,18 +3877,19 @@ where this image comes from. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateImageResponse) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageResponse) AnnotateFileResponse = _reflection.GeneratedProtocolMessageType( "AnnotateFileResponse", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEFILERESPONSE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Response to a single file annotation request. A file may contain one + { + "DESCRIPTOR": _ANNOTATEFILERESPONSE, + "__module__": "google.cloud.vision_v1p2beta1.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 @@ -3604,51 +3898,54 @@ Individual responses to images found within the file. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AnnotateFileResponse) - ), + }, ) _sym_db.RegisterMessage(AnnotateFileResponse) BatchAnnotateImagesRequest = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Multiple image annotation requests are batched into a single service call. + Attributes: requests: Required. Individual image annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesRequest) BatchAnnotateImagesResponse = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESRESPONSE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Response to a batch image annotation request. + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Response to a batch image annotation request. + Attributes: responses: Individual responses to image annotation requests within the batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesResponse) AsyncAnnotateFileRequest = _reflection.GeneratedProtocolMessageType( "AsyncAnnotateFileRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCANNOTATEFILEREQUEST, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""An offline file annotation request. + { + "DESCRIPTOR": _ASYNCANNOTATEFILEREQUEST, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """An offline file annotation request. + Attributes: input_config: Required. Information about the input file. @@ -3658,92 +3955,97 @@ Additional context that may accompany the image(s) in the file. output_config: - Required. The desired output location and metadata (e.g. - format). + Required. The desired output location and metadata + (e.g. format). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncAnnotateFileRequest) AsyncAnnotateFileResponse = _reflection.GeneratedProtocolMessageType( "AsyncAnnotateFileResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCANNOTATEFILERESPONSE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""The response for a single offline file annotation request. + { + "DESCRIPTOR": _ASYNCANNOTATEFILERESPONSE, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """The response for a single offline file annotation request. + Attributes: output_config: The output location and metadata from AsyncAnnotateFileRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncAnnotateFileResponse) AsyncBatchAnnotateFilesRequest = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateFilesRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEFILESREQUEST, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Multiple async file annotation requests are batched into a single + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEFILESREQUEST, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Multiple async file annotation requests are batched into a single service call. + Attributes: requests: Required. Individual async file annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateFilesRequest) AsyncBatchAnnotateFilesResponse = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateFilesResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEFILESRESPONSE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Response to an async batch file annotation request. + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEFILESRESPONSE, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Response to an async batch file annotation request. + Attributes: responses: The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateFilesResponse) InputConfig = _reflection.GeneratedProtocolMessageType( "InputConfig", (_message.Message,), - dict( - DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""The desired input location and metadata. + { + "DESCRIPTOR": _INPUTCONFIG, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """The desired input location and metadata. + Attributes: gcs_source: The Google Cloud Storage location to read the input from. 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” and + “image/tiff” are supported. Wildcards are not supported. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.InputConfig) - ), + }, ) _sym_db.RegisterMessage(InputConfig) OutputConfig = _reflection.GeneratedProtocolMessageType( "OutputConfig", (_message.Message,), - dict( - DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""The desired output location and metadata. + { + "DESCRIPTOR": _OUTPUTCONFIG, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """The desired output location and metadata. + Attributes: gcs_destination: The Google Cloud Storage location to write the output(s) to. @@ -3754,39 +4056,41 @@ 100 pages, 100 response protos will be generated. If ``batch_size`` = 20, then 5 json files each containing 20 response protos will be written under the prefix - ``gcs_destination``.\ ``uri``. Currently, batch\_size only + ``gcs_destination``.\ ``uri``. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.OutputConfig) - ), + }, ) _sym_db.RegisterMessage(OutputConfig) GcsSource = _reflection.GeneratedProtocolMessageType( "GcsSource", (_message.Message,), - dict( - DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""The Google Cloud Storage location where the input will be read from. + { + "DESCRIPTOR": _GCSSOURCE, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """The Google Cloud Storage location where the input will be read from. + Attributes: uri: Google Cloud Storage URI for the input file. This must only be a GCS object. Wildcards are not currently supported. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.GcsSource) - ), + }, ) _sym_db.RegisterMessage(GcsSource) GcsDestination = _reflection.GeneratedProtocolMessageType( "GcsDestination", (_message.Message,), - dict( - DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""The Google Cloud Storage location where the output will be written to. + { + "DESCRIPTOR": _GCSDESTINATION, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """The Google Cloud Storage location where the output will be written to. + Attributes: uri: Google Cloud Storage URI where the results will be stored. @@ -3802,17 +4106,18 @@ is too large and overflows into multiple sharded files. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.GcsDestination) - ), + }, ) _sym_db.RegisterMessage(GcsDestination) OperationMetadata = _reflection.GeneratedProtocolMessageType( "OperationMetadata", (_message.Message,), - dict( - DESCRIPTOR=_OPERATIONMETADATA, - __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Contains metadata for the BatchAnnotateImages operation. + { + "DESCRIPTOR": _OPERATIONMETADATA, + "__module__": "google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", + "__doc__": """Contains metadata for the BatchAnnotateImages operation. + Attributes: state: Current state of the batch operation. @@ -3822,7 +4127,7 @@ The time when the operation result was last updated. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.OperationMetadata) - ), + }, ) _sym_db.RegisterMessage(OperationMetadata) @@ -3836,9 +4141,8 @@ full_name="google.cloud.vision.v1p2beta1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" - ), + serialized_options=b"\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision", + create_key=_descriptor._internal_create_key, serialized_start=7311, serialized_end=7876, methods=[ @@ -3849,9 +4153,8 @@ containing_service=None, input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\037"\032/v1p2beta1/images:annotate:\001*\332A\010requests' - ), + serialized_options=b'\202\323\344\223\002\037"\032/v1p2beta1/images:annotate:\001*\332A\010requests', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AsyncBatchAnnotateFiles", @@ -3860,9 +4163,8 @@ containing_service=None, input_type=_ASYNCBATCHANNOTATEFILESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002("#/v1p2beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata' - ), + serialized_options=b'\202\323\344\223\002("#/v1p2beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata', + create_key=_descriptor._internal_create_key, ), ], ) 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..cd37f887 100644 --- a/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.vision_v1p2beta1.proto import ( @@ -11,16 +12,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 +36,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. - """ + """ 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!") @@ -76,3 +77,65 @@ def add_ImageAnnotatorServicer_to_server(servicer, server): "google.cloud.vision.v1p2beta1.ImageAnnotator", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ImageAnnotator(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. + """ + + @staticmethod + def BatchAnnotateImages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p2beta1.ImageAnnotator/BatchAnnotateImages", + google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def AsyncBatchAnnotateFiles( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p2beta1.ImageAnnotator/AsyncBatchAnnotateFiles", + google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.py b/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.py index 929ffde8..87720f18 100644 --- a/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p2beta1/proto/text_annotation.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -25,12 +22,9 @@ name="google/cloud/vision_v1p2beta1/proto/text_annotation.proto", package="google.cloud.vision.v1p2beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p2beta1B\023TextAnnotationProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n9google/cloud/vision_v1p2beta1/proto/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p2beta1/proto/geometry.proto"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p2beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p2beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p2beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p2beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p2beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p2beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x82\x01\n!com.google.cloud.vision.v1p2beta1B\x13TextAnnotationProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p2beta1B\023TextAnnotationProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n9google/cloud/vision_v1p2beta1/proto/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p2beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p2beta1/proto/geometry.proto"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p2beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p2beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p2beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p2beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p2beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p2beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p2beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x82\x01\n!com.google.cloud.vision.v1p2beta1B\x13TextAnnotationProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, @@ -43,24 +37,55 @@ full_name="google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SPACE", index=1, number=1, serialized_options=None, type=None + name="SPACE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SURE_SPACE", index=2, number=2, serialized_options=None, type=None + name="SURE_SPACE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="EOL_SURE_SPACE", index=3, number=3, serialized_options=None, type=None + name="EOL_SURE_SPACE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="HYPHEN", index=4, number=4, serialized_options=None, type=None + name="HYPHEN", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LINE_BREAK", index=5, number=5, serialized_options=None, type=None + name="LINE_BREAK", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -75,24 +100,55 @@ full_name="google.cloud.vision.v1p2beta1.Block.BlockType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TEXT", index=1, number=1, serialized_options=None, type=None + name="TEXT", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TABLE", index=2, number=2, serialized_options=None, type=None + name="TABLE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="PICTURE", index=3, number=3, serialized_options=None, type=None + name="PICTURE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RULER", index=4, number=4, serialized_options=None, type=None + name="RULER", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="BARCODE", index=5, number=5, serialized_options=None, type=None + name="BARCODE", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -109,6 +165,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_code", @@ -119,7 +176,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -127,6 +184,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -145,6 +203,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -165,6 +224,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -183,6 +243,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_prefix", @@ -201,11 +262,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_TEXTANNOTATION_DETECTEDBREAK_BREAKTYPE], + enum_types=[_TEXTANNOTATION_DETECTEDBREAK_BREAKTYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -221,6 +283,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="detected_languages", @@ -239,6 +302,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detected_break", @@ -257,6 +321,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -277,6 +342,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="pages", @@ -295,6 +361,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -305,7 +372,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -313,6 +380,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -338,6 +406,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -356,6 +425,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="width", @@ -374,6 +444,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="height", @@ -392,6 +463,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="blocks", @@ -410,6 +482,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -428,6 +501,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -449,6 +523,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -467,6 +542,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -485,6 +561,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="paragraphs", @@ -503,6 +580,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="block_type", @@ -521,6 +599,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -539,11 +618,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_BLOCK_BLOCKTYPE], + enum_types=[_BLOCK_BLOCKTYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -560,6 +640,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -578,6 +659,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -596,6 +678,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="words", @@ -614,6 +697,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -632,6 +716,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -653,6 +738,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -671,6 +757,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -689,6 +776,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="symbols", @@ -707,6 +795,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -725,6 +814,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -746,6 +836,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -764,6 +855,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -782,6 +874,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -792,7 +885,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -800,6 +893,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -818,6 +912,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -888,32 +983,34 @@ TextAnnotation = _reflection.GeneratedProtocolMessageType( "TextAnnotation", (_message.Message,), - dict( - DetectedLanguage=_reflection.GeneratedProtocolMessageType( + { + "DetectedLanguage": _reflection.GeneratedProtocolMessageType( "DetectedLanguage", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_DETECTEDLANGUAGE, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""Detected language for a structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_DETECTEDLANGUAGE, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """Detected language for a structural component. + Attributes: language_code: - The BCP-47 language code, such as "en-US" or "sr-Latn". For + 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. + code_locale_identifier. confidence: Confidence of detected language. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) - ), + }, ), - DetectedBreak=_reflection.GeneratedProtocolMessageType( + "DetectedBreak": _reflection.GeneratedProtocolMessageType( "DetectedBreak", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_DETECTEDBREAK, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""Detected start or end of a structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_DETECTEDBREAK, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """Detected start or end of a structural component. + Attributes: type: Detected break type. @@ -921,15 +1018,16 @@ True if break prepends the element. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) - ), + }, ), - TextProperty=_reflection.GeneratedProtocolMessageType( + "TextProperty": _reflection.GeneratedProtocolMessageType( "TextProperty", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_TEXTPROPERTY, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """Additional information detected on the structural component. + Attributes: detected_languages: A list of detected languages together with confidence. @@ -937,11 +1035,11 @@ Detected start or end of a text segment. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) - ), + }, ), - DESCRIPTOR=_TEXTANNOTATION, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""TextAnnotation contains a structured representation of OCR extracted + "DESCRIPTOR": _TEXTANNOTATION, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own @@ -949,6 +1047,7 @@ Please refer to the [TextAnnotation.TextProperty][google.cloud.vision. v1p2beta1.TextAnnotation.TextProperty] message definition below for more detail. + Attributes: pages: List of pages detected by OCR. @@ -956,7 +1055,7 @@ UTF-8 text detected on the pages. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.TextAnnotation) - ), + }, ) _sym_db.RegisterMessage(TextAnnotation) _sym_db.RegisterMessage(TextAnnotation.DetectedLanguage) @@ -966,10 +1065,11 @@ Page = _reflection.GeneratedProtocolMessageType( "Page", (_message.Message,), - dict( - DESCRIPTOR=_PAGE, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""Detected page from OCR. + { + "DESCRIPTOR": _PAGE, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """Detected page from OCR. + Attributes: property: Additional information detected on the page. @@ -985,17 +1085,18 @@ Confidence of the OCR results on the page. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Page) - ), + }, ) _sym_db.RegisterMessage(Page) Block = _reflection.GeneratedProtocolMessageType( "Block", (_message.Message,), - dict( - DESCRIPTOR=_BLOCK, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""Logical element on the page. + { + "DESCRIPTOR": _BLOCK, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """Logical element on the page. + Attributes: property: Additional information detected for the block. @@ -1004,12 +1105,12 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - text is read in the 'natural' orientation. For example: - + 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 + 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 will - still be (0, 1, 2, 3). + 2----3 | | 1----0 and the vertice order + will still be (0, 1, 2, 3). paragraphs: List of paragraphs in this block (if this blocks is of type text). @@ -1019,18 +1120,19 @@ Confidence of the OCR results on the block. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Block) - ), + }, ) _sym_db.RegisterMessage(Block) Paragraph = _reflection.GeneratedProtocolMessageType( "Paragraph", (_message.Message,), - dict( - DESCRIPTOR=_PARAGRAPH, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain + { + "DESCRIPTOR": _PARAGRAPH, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """Structural unit of text representing a number of words in certain order. + Attributes: property: Additional information detected for the paragraph. @@ -1039,28 +1141,29 @@ order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). words: List of words in this paragraph. confidence: Confidence of the OCR results for the paragraph. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Paragraph) - ), + }, ) _sym_db.RegisterMessage(Paragraph) Word = _reflection.GeneratedProtocolMessageType( "Word", (_message.Message,), - dict( - DESCRIPTOR=_WORD, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""A word representation. + { + "DESCRIPTOR": _WORD, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """A word representation. + Attributes: property: Additional information detected for the word. @@ -1069,11 +1172,11 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). symbols: List of symbols in the word. The order of the symbols follows the natural reading order. @@ -1081,17 +1184,18 @@ Confidence of the OCR results for the word. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Word) - ), + }, ) _sym_db.RegisterMessage(Word) Symbol = _reflection.GeneratedProtocolMessageType( "Symbol", (_message.Message,), - dict( - DESCRIPTOR=_SYMBOL, - __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""A single symbol representation. + { + "DESCRIPTOR": _SYMBOL, + "__module__": "google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", + "__doc__": """A single symbol representation. + Attributes: property: Additional information detected for the symbol. @@ -1100,18 +1204,18 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). text: The actual UTF-8 representation of the symbol. confidence: Confidence of the OCR results for the symbol. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.Symbol) - ), + }, ) _sym_db.RegisterMessage(Symbol) diff --git a/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2_grpc.py b/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2_grpc.py +++ b/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p2beta1/proto/web_detection_pb2.py b/google/cloud/vision_v1p2beta1/proto/web_detection_pb2.py index eec9bd1c..1bc4ec76 100644 --- a/google/cloud/vision_v1p2beta1/proto/web_detection_pb2.py +++ b/google/cloud/vision_v1p2beta1/proto/web_detection_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p2beta1/proto/web_detection.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,13 +19,10 @@ name="google/cloud/vision_v1p2beta1/proto/web_detection.proto", package="google.cloud.vision.v1p2beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p2beta1B\021WebDetectionProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n7google/cloud/vision_v1p2beta1/proto/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p2beta1\x1a\x1cgoogle/api/annotations.proto"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p2beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p2beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.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.v1p2beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tB\x80\x01\n!com.google.cloud.vision.v1p2beta1B\x11WebDetectionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3' - ), - dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], + serialized_options=b"\n!com.google.cloud.vision.v1p2beta1B\021WebDetectionProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n7google/cloud/vision_v1p2beta1/proto/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p2beta1\x1a\x1cgoogle/api/annotations.proto"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p2beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p2beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.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.v1p2beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p2beta1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tB\x80\x01\n!com.google.cloud.vision.v1p2beta1B\x11WebDetectionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3', + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,], ) @@ -38,6 +32,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_id", @@ -48,7 +43,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -56,6 +51,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -74,6 +70,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -84,7 +81,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -92,6 +89,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -112,6 +110,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -122,7 +121,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -130,6 +129,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -148,6 +148,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -168,6 +169,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -178,7 +180,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -186,6 +188,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -204,6 +207,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_title", @@ -214,7 +218,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -222,6 +226,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_matching_images", @@ -240,6 +245,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_matching_images", @@ -258,6 +264,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -278,6 +285,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="label", @@ -288,7 +296,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -296,6 +304,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -306,7 +315,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -314,6 +323,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -334,6 +344,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="web_entities", @@ -352,6 +363,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_matching_images", @@ -370,6 +382,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_matching_images", @@ -388,6 +401,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pages_with_matching_images", @@ -406,6 +420,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="visually_similar_images", @@ -424,6 +439,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="best_guess_labels", @@ -442,6 +458,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -491,14 +508,15 @@ WebDetection = _reflection.GeneratedProtocolMessageType( "WebDetection", (_message.Message,), - dict( - WebEntity=_reflection.GeneratedProtocolMessageType( + { + "WebEntity": _reflection.GeneratedProtocolMessageType( "WebEntity", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBENTITY, - __module__="google.cloud.vision_v1p2beta1.proto.web_detection_pb2", - __doc__="""Entity deduced from similar images on the Internet. + { + "DESCRIPTOR": _WEBDETECTION_WEBENTITY, + "__module__": "google.cloud.vision_v1p2beta1.proto.web_detection_pb2", + "__doc__": """Entity deduced from similar images on the Internet. + Attributes: entity_id: Opaque entity ID. @@ -509,15 +527,16 @@ Canonical description of the entity, in English. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebEntity) - ), + }, ), - WebImage=_reflection.GeneratedProtocolMessageType( + "WebImage": _reflection.GeneratedProtocolMessageType( "WebImage", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBIMAGE, - __module__="google.cloud.vision_v1p2beta1.proto.web_detection_pb2", - __doc__="""Metadata for online images. + { + "DESCRIPTOR": _WEBDETECTION_WEBIMAGE, + "__module__": "google.cloud.vision_v1p2beta1.proto.web_detection_pb2", + "__doc__": """Metadata for online images. + Attributes: url: The result image URL. @@ -525,15 +544,16 @@ (Deprecated) Overall relevancy score for the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebImage) - ), + }, ), - WebPage=_reflection.GeneratedProtocolMessageType( + "WebPage": _reflection.GeneratedProtocolMessageType( "WebPage", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBPAGE, - __module__="google.cloud.vision_v1p2beta1.proto.web_detection_pb2", - __doc__="""Metadata for web pages. + { + "DESCRIPTOR": _WEBDETECTION_WEBPAGE, + "__module__": "google.cloud.vision_v1p2beta1.proto.web_detection_pb2", + "__doc__": """Metadata for web pages. + Attributes: url: The result web page URL. @@ -551,29 +571,31 @@ crops. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection.WebPage) - ), + }, ), - WebLabel=_reflection.GeneratedProtocolMessageType( + "WebLabel": _reflection.GeneratedProtocolMessageType( "WebLabel", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBLABEL, - __module__="google.cloud.vision_v1p2beta1.proto.web_detection_pb2", - __doc__="""Label to provide extra metadata for the web detection. + { + "DESCRIPTOR": _WEBDETECTION_WEBLABEL, + "__module__": "google.cloud.vision_v1p2beta1.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. + 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.v1p2beta1.WebDetection.WebLabel) - ), + }, ), - DESCRIPTOR=_WEBDETECTION, - __module__="google.cloud.vision_v1p2beta1.proto.web_detection_pb2", - __doc__="""Relevant information for the image from the Internet. + "DESCRIPTOR": _WEBDETECTION, + "__module__": "google.cloud.vision_v1p2beta1.proto.web_detection_pb2", + "__doc__": """Relevant information for the image from the Internet. + Attributes: web_entities: Deduced entities from similar images on the Internet. @@ -593,7 +615,7 @@ Best guess text labels for the request image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.WebDetection) - ), + }, ) _sym_db.RegisterMessage(WebDetection) _sym_db.RegisterMessage(WebDetection.WebEntity) diff --git a/google/cloud/vision_v1p2beta1/proto/web_detection_pb2_grpc.py b/google/cloud/vision_v1p2beta1/proto/web_detection_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p2beta1/proto/web_detection_pb2_grpc.py +++ b/google/cloud/vision_v1p2beta1/proto/web_detection_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p3beta1/__init__.py b/google/cloud/vision_v1p3beta1/__init__.py index 65b99da6..800aaf9a 100644 --- a/google/cloud/vision_v1p3beta1/__init__.py +++ b/google/cloud/vision_v1p3beta1/__init__.py @@ -30,8 +30,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) @@ -48,4 +48,9 @@ class ImageAnnotatorClient(VisionHelpers, iac.ImageAnnotatorClient): enums = enums -__all__ = ("enums", "types", "ProductSearchClient", "ImageAnnotatorClient") +__all__ = ( + "enums", + "types", + "ProductSearchClient", + "ImageAnnotatorClient", +) diff --git a/google/cloud/vision_v1p3beta1/gapic/enums.py b/google/cloud/vision_v1p3beta1/gapic/enums.py index 8755caa9..e62bb24b 100644 --- a/google/cloud/vision_v1p3beta1/gapic/enums.py +++ b/google/cloud/vision_v1p3beta1/gapic/enums.py @@ -211,9 +211,9 @@ class Type(enum.IntEnum): LANDMARK_DETECTION (int): Run landmark detection. LOGO_DETECTION (int): Run logo detection. LABEL_DETECTION (int): Run label detection. - TEXT_DETECTION (int): Run text detection / optical character recognition (OCR). Text detection - is optimized for areas of text within a larger image; if the image is a - document, use ``DOCUMENT_TEXT_DETECTION`` instead. + TEXT_DETECTION (int): Run text detection / optical character recognition (OCR). Text + detection is optimized for areas of text within a larger image; if the + image is a document, use ``DOCUMENT_TEXT_DETECTION`` instead. DOCUMENT_TEXT_DETECTION (int): Run dense text document OCR. Takes precedence when both ``DOCUMENT_TEXT_DETECTION`` and ``TEXT_DETECTION`` are present. SAFE_SEARCH_DETECTION (int): Run Safe Search to detect potentially unsafe diff --git a/google/cloud/vision_v1p3beta1/gapic/image_annotator_client.py b/google/cloud/vision_v1p3beta1/gapic/image_annotator_client.py index 88155cbb..acaf6466 100644 --- a/google/cloud/vision_v1p3beta1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1p3beta1/gapic/image_annotator_client.py @@ -43,7 +43,7 @@ from google.protobuf import field_mask_pb2 -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision").version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision",).version class ImageAnnotatorClient(object): @@ -167,12 +167,12 @@ def __init__( self.transport = transport else: self.transport = image_annotator_grpc_transport.ImageAnnotatorGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -183,7 +183,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -195,7 +195,7 @@ def __init__( # Service calls def batch_annotate_images( self, - requests, + requests=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -208,10 +208,7 @@ def batch_annotate_images( >>> >>> client = vision_v1p3beta1.ImageAnnotatorClient() >>> - >>> # TODO: Initialize `requests`: - >>> requests = [] - >>> - >>> response = client.batch_annotate_images(requests) + >>> response = client.batch_annotate_images() Args: requests (list[Union[dict, ~google.cloud.vision_v1p3beta1.types.AnnotateImageRequest]]): Individual image annotation requests for this batch. @@ -248,7 +245,7 @@ def batch_annotate_images( client_info=self._client_info, ) - request = image_annotator_pb2.BatchAnnotateImagesRequest(requests=requests) + request = image_annotator_pb2.BatchAnnotateImagesRequest(requests=requests,) return self._inner_api_calls["batch_annotate_images"]( request, retry=retry, timeout=timeout, metadata=metadata ) @@ -261,10 +258,10 @@ def async_batch_annotate_files( metadata=None, ): """ - 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`` + 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). @@ -322,7 +319,7 @@ def async_batch_annotate_files( client_info=self._client_info, ) - request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest(requests=requests) + request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest(requests=requests,) operation = self._inner_api_calls["async_batch_annotate_files"]( request, retry=retry, timeout=timeout, metadata=metadata ) diff --git a/google/cloud/vision_v1p3beta1/gapic/image_annotator_client_config.py b/google/cloud/vision_v1p3beta1/gapic/image_annotator_client_config.py index 41adece1..4032c73b 100644 --- a/google/cloud/vision_v1p3beta1/gapic/image_annotator_client_config.py +++ b/google/cloud/vision_v1p3beta1/gapic/image_annotator_client_config.py @@ -2,30 +2,49 @@ "interfaces": { "google.cloud.vision.v1p3beta1.ImageAnnotator": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": [], + "retry_policy_4_codes": ["UNAVAILABLE", "DEADLINE_EXCEEDED"], + "no_retry_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, }, "methods": { "BatchAnnotateImages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params", }, "AsyncBatchAnnotateFiles": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/google/cloud/vision_v1p3beta1/gapic/product_search_client.py b/google/cloud/vision_v1p3beta1/gapic/product_search_client.py index 3a9551e0..fdb89689 100644 --- a/google/cloud/vision_v1p3beta1/gapic/product_search_client.py +++ b/google/cloud/vision_v1p3beta1/gapic/product_search_client.py @@ -43,13 +43,13 @@ from google.protobuf import field_mask_pb2 -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision").version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision",).version class ProductSearchClient(object): """ - Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + Manages Products and ProductSets of reference images for use in + product search. It uses the following resource model: - The API has a collection of ``ProductSet`` resources, named ``projects/*/locations/*/productSets/*``, which acts as a way to put @@ -218,12 +218,12 @@ def __init__( self.transport = transport else: self.transport = product_search_grpc_transport.ProductSearchGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -234,7 +234,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -244,11 +244,117 @@ def __init__( self._inner_api_calls = {} # Service calls + def import_product_sets( + self, + parent, + input_config, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Asynchronous API that imports a list of reference images to + specified product sets based on a list of image information. + + The ``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``. + + Example: + >>> from google.cloud import vision_v1p3beta1 + >>> + >>> client = vision_v1p3beta1.ProductSearchClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> # TODO: Initialize `input_config`: + >>> input_config = {} + >>> + >>> response = client.import_product_sets(parent, input_config) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() + + Args: + 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_v1p3beta1.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_v1p3beta1.types.ImportProductSetsInputConfig` + 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_v1p3beta1.types._OperationFuture` 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 "import_product_sets" not in self._inner_api_calls: + self._inner_api_calls[ + "import_product_sets" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.import_product_sets, + default_retry=self._method_configs["ImportProductSets"].retry, + default_timeout=self._method_configs["ImportProductSets"].timeout, + client_info=self._client_info, + ) + + request = product_search_service_pb2.ImportProductSetsRequest( + parent=parent, input_config=input_config, + ) + 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) + + operation = self._inner_api_calls["import_product_sets"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + product_search_service_pb2.ImportProductSetsResponse, + metadata_type=product_search_service_pb2.BatchOperationMetadata, + ) + def create_product_set( self, parent, product_set, - product_set_id, + product_set_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -258,7 +364,7 @@ def create_product_set( Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing, or is longer + - Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. Example: @@ -271,10 +377,7 @@ def create_product_set( >>> # TODO: Initialize `product_set`: >>> product_set = {} >>> - >>> # TODO: Initialize `product_set_id`: - >>> product_set_id = '' - >>> - >>> response = client.create_product_set(parent, product_set, product_set_id) + >>> response = client.create_product_set(parent, product_set) Args: parent (str): Required. The project in which the ProductSet should be created. @@ -284,9 +387,9 @@ def create_product_set( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p3beta1.types.ProductSet` - product_set_id (str): 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 error is returned with code ALREADY\_EXISTS. Must be at most 128 + product_set_id (str): 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 error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character ``/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -319,7 +422,7 @@ def create_product_set( ) request = product_search_service_pb2.CreateProductSetRequest( - parent=parent, product_set=product_set, product_set_id=product_set_id + parent=parent, product_set=product_set, product_set_id=product_set_id, ) if metadata is None: metadata = [] @@ -351,7 +454,7 @@ def list_product_sets( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100, or less + - Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. Example: @@ -418,7 +521,7 @@ def list_product_sets( ) request = product_search_service_pb2.ListProductSetsRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -460,7 +563,7 @@ def get_product_set( Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. + - Returns NOT_FOUND if the ProductSet does not exist. Example: >>> from google.cloud import vision_v1p3beta1 @@ -506,7 +609,7 @@ def get_product_set( client_info=self._client_info, ) - request = product_search_service_pb2.GetProductSetRequest(name=name) + request = product_search_service_pb2.GetProductSetRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -527,19 +630,19 @@ def get_product_set( def update_product_set( self, product_set, - update_mask, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Makes changes to a ProductSet resource. Only display\_name can be + Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. - - Returns INVALID\_ARGUMENT if display\_name is present in update\_mask + - 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. Example: @@ -550,19 +653,16 @@ def update_product_set( >>> # TODO: Initialize `product_set`: >>> product_set = {} >>> - >>> # TODO: Initialize `update_mask`: - >>> update_mask = {} - >>> - >>> response = client.update_product_set(product_set, update_mask) + >>> response = client.update_product_set(product_set) Args: product_set (Union[dict, ~google.cloud.vision_v1p3beta1.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_v1p3beta1.types.ProductSet` - update_mask (Union[dict, ~google.cloud.vision_v1p3beta1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If update\_mask - isn't specified, all mutable fields are to be updated. Valid mask path - is ``display_name``. + update_mask (Union[dict, ~google.cloud.vision_v1p3beta1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If + update_mask isn't specified, all mutable fields are to be updated. Valid + mask path is ``display_name``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p3beta1.types.FieldMask` @@ -597,7 +697,7 @@ def update_product_set( ) request = product_search_service_pb2.UpdateProductSetRequest( - product_set=product_set, update_mask=update_mask + product_set=product_set, update_mask=update_mask, ) if metadata is None: metadata = [] @@ -624,14 +724,14 @@ def delete_product_set( metadata=None, ): """ - Permanently deletes a ProductSet. All Products and ReferenceImages in - the ProductSet will be deleted. + Permanently deletes a ProductSet. All Products and ReferenceImages + in the ProductSet will be deleted. The actual image files are not deleted from Google Cloud Storage. Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. + - Returns NOT_FOUND if the ProductSet does not exist. Example: >>> from google.cloud import vision_v1p3beta1 @@ -674,7 +774,7 @@ def delete_product_set( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteProductSetRequest(name=name) + request = product_search_service_pb2.DeleteProductSetRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -696,7 +796,7 @@ def create_product( self, parent, product, - product_id, + product_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -706,11 +806,11 @@ def create_product( Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing or longer than + - Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - - Returns INVALID\_ARGUMENT if description is longer than 4096 + - Returns INVALID_ARGUMENT if description is longer than 4096 characters. - - Returns INVALID\_ARGUMENT if product\_category is missing or invalid. + - Returns INVALID_ARGUMENT if product_category is missing or invalid. Example: >>> from google.cloud import vision_v1p3beta1 @@ -722,10 +822,7 @@ def create_product( >>> # TODO: Initialize `product`: >>> product = {} >>> - >>> # TODO: Initialize `product_id`: - >>> product_id = '' - >>> - >>> response = client.create_product(parent, product, product_id) + >>> response = client.create_product(parent, product) Args: parent (str): Required. The project in which the Product should be created. @@ -735,9 +832,9 @@ def create_product( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p3beta1.types.Product` - product_id (str): 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 error is returned with code ALREADY\_EXISTS. Must be at most 128 + product_id (str): 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 error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character ``/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -770,7 +867,7 @@ def create_product( ) request = product_search_service_pb2.CreateProductRequest( - parent=parent, product=product, product_id=product_id + parent=parent, product=product, product_id=product_id, ) if metadata is None: metadata = [] @@ -802,7 +899,7 @@ def list_products( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Example: @@ -870,7 +967,7 @@ def list_products( ) request = product_search_service_pb2.ListProductsRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -912,7 +1009,7 @@ def get_product( Possible errors: - - Returns NOT\_FOUND if the Product does not exist. + - Returns NOT_FOUND if the Product does not exist. Example: >>> from google.cloud import vision_v1p3beta1 @@ -957,7 +1054,7 @@ def get_product( client_info=self._client_info, ) - request = product_search_service_pb2.GetProductRequest(name=name) + request = product_search_service_pb2.GetProductRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -978,27 +1075,27 @@ def get_product( def update_product( self, product, - update_mask, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Makes changes to a Product resource. Only display\_name, description and - labels can be updated right now. + Makes changes to a Product resource. 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. Possible errors: - - Returns NOT\_FOUND if the Product does not exist. - - Returns INVALID\_ARGUMENT if display\_name 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. + - 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. Example: >>> from google.cloud import vision_v1p3beta1 @@ -1008,10 +1105,7 @@ def update_product( >>> # TODO: Initialize `product`: >>> product = {} >>> - >>> # TODO: Initialize `update_mask`: - >>> update_mask = {} - >>> - >>> response = client.update_product(product, update_mask) + >>> response = client.update_product(product) Args: product (Union[dict, ~google.cloud.vision_v1p3beta1.types.Product]): Required. The Product resource which replaces the one on the server. @@ -1019,9 +1113,10 @@ def update_product( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p3beta1.types.Product` - update_mask (Union[dict, ~google.cloud.vision_v1p3beta1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If update\_mask - isn't specified, all mutable fields are to be updated. Valid mask paths - include ``product_labels``, ``display_name``, and ``description``. + update_mask (Union[dict, ~google.cloud.vision_v1p3beta1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If + update_mask isn't specified, all mutable fields are to be updated. Valid + mask paths include ``product_labels``, ``display_name``, and + ``description``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p3beta1.types.FieldMask` @@ -1056,7 +1151,7 @@ def update_product( ) request = product_search_service_pb2.UpdateProductRequest( - product=product, update_mask=update_mask + product=product, update_mask=update_mask, ) if metadata is None: metadata = [] @@ -1091,7 +1186,7 @@ def delete_product( Possible errors: - - Returns NOT\_FOUND if the product does not exist. + - Returns NOT_FOUND if the product does not exist. Example: >>> from google.cloud import vision_v1p3beta1 @@ -1133,7 +1228,7 @@ def delete_product( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteProductRequest(name=name) + request = product_search_service_pb2.DeleteProductRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1155,7 +1250,7 @@ def create_reference_image( self, parent, reference_image, - reference_image_id, + reference_image_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -1165,7 +1260,7 @@ def create_reference_image( 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 + 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. @@ -1174,13 +1269,13 @@ def create_reference_image( Possible errors: - - Returns INVALID\_ARGUMENT if the image\_uri is missing or longer than + - 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 + - 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 + - Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. Example: @@ -1193,14 +1288,11 @@ def create_reference_image( >>> # TODO: Initialize `reference_image`: >>> reference_image = {} >>> - >>> # TODO: Initialize `reference_image_id`: - >>> reference_image_id = '' - >>> - >>> response = client.create_reference_image(parent, reference_image, reference_image_id) + >>> response = client.create_reference_image(parent, reference_image) Args: - parent (str): Required. 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_v1p3beta1.types.ReferenceImage]): Required. The reference image to create. @@ -1208,10 +1300,10 @@ def create_reference_image( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p3beta1.types.ReferenceImage` - reference_image_id (str): 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 - already in use, an error is returned with code ALREADY\_EXISTS. Must be - at most 128 characters long. It cannot contain the character ``/``. + reference_image_id (str): 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 already in use, an error is returned with code ALREADY_EXISTS. Must + be at most 128 characters long. It cannot contain the character ``/``. 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. @@ -1282,7 +1374,7 @@ def delete_reference_image( Possible errors: - - Returns NOT\_FOUND if the reference image does not exist. + - Returns NOT_FOUND if the reference image does not exist. Example: >>> from google.cloud import vision_v1p3beta1 @@ -1326,7 +1418,7 @@ def delete_reference_image( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteReferenceImageRequest(name=name) + request = product_search_service_pb2.DeleteReferenceImageRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1357,8 +1449,8 @@ def list_reference_images( Possible errors: - - Returns NOT\_FOUND if the parent product does not exist. - - Returns INVALID\_ARGUMENT if the page\_size is greater than 100, or + - 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. Example: @@ -1383,7 +1475,8 @@ def list_reference_images( ... pass Args: - parent (str): Required. 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 @@ -1425,7 +1518,7 @@ def list_reference_images( ) request = product_search_service_pb2.ListReferenceImagesRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -1467,7 +1560,7 @@ def get_reference_image( Possible errors: - - Returns NOT\_FOUND if the specified image does not exist. + - Returns NOT_FOUND if the specified image does not exist. Example: >>> from google.cloud import vision_v1p3beta1 @@ -1514,7 +1607,7 @@ def get_reference_image( client_info=self._client_info, ) - request = product_search_service_pb2.GetReferenceImageRequest(name=name) + request = product_search_service_pb2.GetReferenceImageRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1541,14 +1634,14 @@ def add_product_to_product_set( metadata=None, ): """ - Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + Adds a Product to the specified ProductSet. If the Product is + already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: - - Returns NOT\_FOUND if the Product or the ProductSet doesn't exist. + - Returns NOT_FOUND if the Product or the ProductSet doesn't exist. Example: >>> from google.cloud import vision_v1p3beta1 @@ -1556,9 +1649,7 @@ def add_product_to_product_set( >>> client = vision_v1p3beta1.ProductSearchClient() >>> >>> name = client.product_set_path('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]') - >>> - >>> # TODO: Initialize `product`: - >>> product = '' + >>> product = client.product_path('[PROJECT]', '[LOCATION]', '[PRODUCT]') >>> >>> client.add_product_to_product_set(name, product) @@ -1599,7 +1690,7 @@ def add_product_to_product_set( ) request = product_search_service_pb2.AddProductToProductSetRequest( - name=name, product=product + name=name, product=product, ) if metadata is None: metadata = [] @@ -1631,7 +1722,7 @@ def remove_product_from_product_set( 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. Example: >>> from google.cloud import vision_v1p3beta1 @@ -1639,9 +1730,7 @@ def remove_product_from_product_set( >>> client = vision_v1p3beta1.ProductSearchClient() >>> >>> name = client.product_set_path('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]') - >>> - >>> # TODO: Initialize `product`: - >>> product = '' + >>> product = client.product_path('[PROJECT]', '[LOCATION]', '[PRODUCT]') >>> >>> client.remove_product_from_product_set(name, product) @@ -1684,7 +1773,7 @@ def remove_product_from_product_set( ) request = product_search_service_pb2.RemoveProductFromProductSetRequest( - name=name, product=product + name=name, product=product, ) if metadata is None: metadata = [] @@ -1718,7 +1807,7 @@ def list_products_in_product_set( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Example: @@ -1788,7 +1877,7 @@ def list_products_in_product_set( ) request = product_search_service_pb2.ListProductsInProductSetRequest( - name=name, page_size=page_size + name=name, page_size=page_size, ) if metadata is None: metadata = [] @@ -1817,109 +1906,3 @@ def list_products_in_product_set( response_token_field="next_page_token", ) return iterator - - def import_product_sets( - self, - parent, - input_config, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. - - The ``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``. - - Example: - >>> from google.cloud import vision_v1p3beta1 - >>> - >>> client = vision_v1p3beta1.ProductSearchClient() - >>> - >>> parent = client.location_path('[PROJECT]', '[LOCATION]') - >>> - >>> # TODO: Initialize `input_config`: - >>> input_config = {} - >>> - >>> response = client.import_product_sets(parent, input_config) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() - - Args: - 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_v1p3beta1.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_v1p3beta1.types.ImportProductSetsInputConfig` - 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_v1p3beta1.types._OperationFuture` 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 "import_product_sets" not in self._inner_api_calls: - self._inner_api_calls[ - "import_product_sets" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.import_product_sets, - default_retry=self._method_configs["ImportProductSets"].retry, - default_timeout=self._method_configs["ImportProductSets"].timeout, - client_info=self._client_info, - ) - - request = product_search_service_pb2.ImportProductSetsRequest( - parent=parent, input_config=input_config - ) - 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) - - operation = self._inner_api_calls["import_product_sets"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - product_search_service_pb2.ImportProductSetsResponse, - metadata_type=product_search_service_pb2.BatchOperationMetadata, - ) diff --git a/google/cloud/vision_v1p3beta1/gapic/product_search_client_config.py b/google/cloud/vision_v1p3beta1/gapic/product_search_client_config.py index 9c732f92..6a2241a5 100644 --- a/google/cloud/vision_v1p3beta1/gapic/product_search_client_config.py +++ b/google/cloud/vision_v1p3beta1/gapic/product_search_client_config.py @@ -2,110 +2,129 @@ "interfaces": { "google.cloud.vision.v1p3beta1.ProductSearch": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "no_retry_codes": [], + "retry_policy_3_codes": ["UNAVAILABLE", "DEADLINE_EXCEEDED"], + "retry_policy_2_codes": [], }, "retry_params": { - "default": { + "retry_policy_3_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, }, "methods": { + "ImportProductSets": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", + }, "CreateProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "ListProductSets": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "UpdateProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "DeleteProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateProduct": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "ListProducts": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetProduct": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "UpdateProduct": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "DeleteProduct": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "DeleteReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "ListReferenceImages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "AddProductToProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "RemoveProductFromProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "ListProductsInProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, - "ImportProductSets": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, }, } diff --git a/google/cloud/vision_v1p3beta1/gapic/transports/image_annotator_grpc_transport.py b/google/cloud/vision_v1p3beta1/gapic/transports/image_annotator_grpc_transport.py index 926c3a5c..56addd09 100644 --- a/google/cloud/vision_v1p3beta1/gapic/transports/image_annotator_grpc_transport.py +++ b/google/cloud/vision_v1p3beta1/gapic/transports/image_annotator_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -76,7 +76,9 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "image_annotator_stub": image_annotator_pb2_grpc.ImageAnnotatorStub(channel) + "image_annotator_stub": image_annotator_pb2_grpc.ImageAnnotatorStub( + channel + ), } # Because this API includes a method that returns a @@ -135,10 +137,10 @@ def batch_annotate_images(self): def async_batch_annotate_files(self): """Return the gRPC stub for :meth:`ImageAnnotatorClient.async_batch_annotate_files`. - 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`` + 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). diff --git a/google/cloud/vision_v1p3beta1/gapic/transports/product_search_grpc_transport.py b/google/cloud/vision_v1p3beta1/gapic/transports/product_search_grpc_transport.py index 302033b2..d3ddbc3d 100644 --- a/google/cloud/vision_v1p3beta1/gapic/transports/product_search_grpc_transport.py +++ b/google/cloud/vision_v1p3beta1/gapic/transports/product_search_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -78,7 +78,7 @@ def __init__( self._stubs = { "product_search_stub": product_search_service_pb2_grpc.ProductSearchStub( channel - ) + ), } # Because this API includes a method that returns a @@ -120,6 +120,29 @@ def channel(self): """ return self._channel + @property + def import_product_sets(self): + """Return the gRPC stub for :meth:`ProductSearchClient.import_product_sets`. + + Asynchronous API that imports a list of reference images to + specified product sets based on a list of image information. + + The ``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``. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["product_search_stub"].ImportProductSets + @property def create_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.create_product_set`. @@ -128,7 +151,7 @@ def create_product_set(self): Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing, or is longer + - Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. Returns: @@ -146,7 +169,7 @@ def list_product_sets(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100, or less + - Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. Returns: @@ -164,7 +187,7 @@ def get_product_set(self): Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. + - Returns NOT_FOUND if the ProductSet does not exist. Returns: Callable: A callable which accepts the appropriate @@ -177,13 +200,13 @@ def get_product_set(self): def update_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.update_product_set`. - Makes changes to a ProductSet resource. Only display\_name can be + Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. - - Returns INVALID\_ARGUMENT if display\_name is present in update\_mask + - 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: @@ -197,14 +220,14 @@ def update_product_set(self): def delete_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.delete_product_set`. - Permanently deletes a ProductSet. All Products and ReferenceImages in - the ProductSet will be deleted. + Permanently deletes a ProductSet. All Products and ReferenceImages + in the ProductSet will be deleted. The actual image files are not deleted from Google Cloud Storage. Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. + - Returns NOT_FOUND if the ProductSet does not exist. Returns: Callable: A callable which accepts the appropriate @@ -221,11 +244,11 @@ def create_product(self): Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing or longer than + - Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - - Returns INVALID\_ARGUMENT if description is longer than 4096 + - Returns INVALID_ARGUMENT if description is longer than 4096 characters. - - Returns INVALID\_ARGUMENT if product\_category is missing or invalid. + - Returns INVALID_ARGUMENT if product_category is missing or invalid. Returns: Callable: A callable which accepts the appropriate @@ -242,7 +265,7 @@ def list_products(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Returns: @@ -260,7 +283,7 @@ def get_product(self): Possible errors: - - Returns NOT\_FOUND if the Product does not exist. + - Returns NOT_FOUND if the Product does not exist. Returns: Callable: A callable which accepts the appropriate @@ -273,21 +296,21 @@ def get_product(self): def update_product(self): """Return the gRPC stub for :meth:`ProductSearchClient.update_product`. - Makes changes to a Product resource. Only display\_name, description and - labels can be updated right now. + Makes changes to a Product resource. 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. Possible errors: - - Returns NOT\_FOUND if the Product does not exist. - - Returns INVALID\_ARGUMENT if display\_name 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. + - 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: Callable: A callable which accepts the appropriate @@ -308,7 +331,7 @@ def delete_product(self): Possible errors: - - Returns NOT\_FOUND if the product does not exist. + - Returns NOT_FOUND if the product does not exist. Returns: Callable: A callable which accepts the appropriate @@ -325,7 +348,7 @@ def create_reference_image(self): 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 + 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. @@ -334,13 +357,13 @@ def create_reference_image(self): Possible errors: - - Returns INVALID\_ARGUMENT if the image\_uri is missing or longer than + - 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 + - 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 + - Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. Returns: @@ -364,7 +387,7 @@ def delete_reference_image(self): Possible errors: - - Returns NOT\_FOUND if the reference image does not exist. + - Returns NOT_FOUND if the reference image does not exist. Returns: Callable: A callable which accepts the appropriate @@ -381,8 +404,8 @@ def list_reference_images(self): Possible errors: - - Returns NOT\_FOUND if the parent product does not exist. - - Returns INVALID\_ARGUMENT if the page\_size is greater than 100, or + - 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: @@ -400,7 +423,7 @@ def get_reference_image(self): Possible errors: - - Returns NOT\_FOUND if the specified image does not exist. + - Returns NOT_FOUND if the specified image does not exist. Returns: Callable: A callable which accepts the appropriate @@ -413,14 +436,14 @@ def get_reference_image(self): def add_product_to_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.add_product_to_product_set`. - Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + Adds a Product to the specified ProductSet. If the Product is + already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: - - Returns NOT\_FOUND if the Product or the ProductSet doesn't exist. + - Returns NOT_FOUND if the Product or the ProductSet doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -437,7 +460,7 @@ def remove_product_from_product_set(self): 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. Returns: Callable: A callable which accepts the appropriate @@ -456,7 +479,7 @@ def list_products_in_product_set(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Returns: @@ -465,26 +488,3 @@ def list_products_in_product_set(self): deserialized response object. """ return self._stubs["product_search_stub"].ListProductsInProductSet - - @property - def import_product_sets(self): - """Return the gRPC stub for :meth:`ProductSearchClient.import_product_sets`. - - Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. - - The ``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``. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - deserialized response object. - """ - return self._stubs["product_search_stub"].ImportProductSets diff --git a/google/cloud/vision_v1p3beta1/proto/geometry_pb2.py b/google/cloud/vision_v1p3beta1/proto/geometry_pb2.py index c4a3bd43..cfd56f4d 100644 --- a/google/cloud/vision_v1p3beta1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/geometry_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p3beta1/proto/geometry.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,13 +19,10 @@ name="google/cloud/vision_v1p3beta1/proto/geometry.proto", package="google.cloud.vision.v1p3beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p3beta1B\rGeometryProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n2google/cloud/vision_v1p3beta1/proto/geometry.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02"\x95\x01\n\x0c\x42oundingPoly\x12\x37\n\x08vertices\x18\x01 \x03(\x0b\x32%.google.cloud.vision.v1p3beta1.Vertex\x12L\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.NormalizedVertex"[\n\x16NormalizedBoundingPoly\x12\x41\n\x08vertices\x18\x01 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.NormalizedVertex"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42|\n!com.google.cloud.vision.v1p3beta1B\rGeometryProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3' - ), - dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], + serialized_options=b"\n!com.google.cloud.vision.v1p3beta1B\rGeometryProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/vision_v1p3beta1/proto/geometry.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02"\x95\x01\n\x0c\x42oundingPoly\x12\x37\n\x08vertices\x18\x01 \x03(\x0b\x32%.google.cloud.vision.v1p3beta1.Vertex\x12L\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.NormalizedVertex"[\n\x16NormalizedBoundingPoly\x12\x41\n\x08vertices\x18\x01 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.NormalizedVertex"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42|\n!com.google.cloud.vision.v1p3beta1B\rGeometryProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3', + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,], ) @@ -38,6 +32,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -56,6 +51,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -74,6 +70,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -95,6 +92,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -113,6 +111,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -131,6 +130,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -152,6 +152,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="vertices", @@ -170,6 +171,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="normalized_vertices", @@ -188,6 +190,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -209,6 +212,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="vertices", @@ -227,7 +231,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -248,6 +253,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -266,6 +272,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -284,6 +291,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="z", @@ -302,6 +310,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -329,42 +338,45 @@ Vertex = _reflection.GeneratedProtocolMessageType( "Vertex", (_message.Message,), - dict( - DESCRIPTOR=_VERTEX, - __module__="google.cloud.vision_v1p3beta1.proto.geometry_pb2", - __doc__="""X coordinate. + { + "DESCRIPTOR": _VERTEX, + "__module__": "google.cloud.vision_v1p3beta1.proto.geometry_pb2", + "__doc__": """X coordinate. + Attributes: y: Y coordinate. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Vertex) - ), + }, ) _sym_db.RegisterMessage(Vertex) NormalizedVertex = _reflection.GeneratedProtocolMessageType( "NormalizedVertex", (_message.Message,), - dict( - DESCRIPTOR=_NORMALIZEDVERTEX, - __module__="google.cloud.vision_v1p3beta1.proto.geometry_pb2", - __doc__="""X coordinate. + { + "DESCRIPTOR": _NORMALIZEDVERTEX, + "__module__": "google.cloud.vision_v1p3beta1.proto.geometry_pb2", + "__doc__": """X coordinate. + Attributes: y: Y coordinate. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.NormalizedVertex) - ), + }, ) _sym_db.RegisterMessage(NormalizedVertex) BoundingPoly = _reflection.GeneratedProtocolMessageType( "BoundingPoly", (_message.Message,), - dict( - DESCRIPTOR=_BOUNDINGPOLY, - __module__="google.cloud.vision_v1p3beta1.proto.geometry_pb2", - __doc__="""A bounding polygon for the detected image annotation. + { + "DESCRIPTOR": _BOUNDINGPOLY, + "__module__": "google.cloud.vision_v1p3beta1.proto.geometry_pb2", + "__doc__": """A bounding polygon for the detected image annotation. + Attributes: vertices: The bounding polygon vertices. @@ -372,35 +384,37 @@ The bounding polygon normalized vertices. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BoundingPoly) - ), + }, ) _sym_db.RegisterMessage(BoundingPoly) NormalizedBoundingPoly = _reflection.GeneratedProtocolMessageType( "NormalizedBoundingPoly", (_message.Message,), - dict( - DESCRIPTOR=_NORMALIZEDBOUNDINGPOLY, - __module__="google.cloud.vision_v1p3beta1.proto.geometry_pb2", - __doc__="""A normalized bounding polygon around a portion of an image. + { + "DESCRIPTOR": _NORMALIZEDBOUNDINGPOLY, + "__module__": "google.cloud.vision_v1p3beta1.proto.geometry_pb2", + "__doc__": """A normalized bounding polygon around a portion of an image. + Attributes: vertices: Normalized vertices of the bounding polygon. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.NormalizedBoundingPoly) - ), + }, ) _sym_db.RegisterMessage(NormalizedBoundingPoly) Position = _reflection.GeneratedProtocolMessageType( "Position", (_message.Message,), - dict( - DESCRIPTOR=_POSITION, - __module__="google.cloud.vision_v1p3beta1.proto.geometry_pb2", - __doc__="""A 3D position in the image, used primarily for Face detection + { + "DESCRIPTOR": _POSITION, + "__module__": "google.cloud.vision_v1p3beta1.proto.geometry_pb2", + "__doc__": """A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image. + Attributes: x: X coordinate. @@ -410,7 +424,7 @@ Z coordinate (or depth). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Position) - ), + }, ) _sym_db.RegisterMessage(Position) diff --git a/google/cloud/vision_v1p3beta1/proto/geometry_pb2_grpc.py b/google/cloud/vision_v1p3beta1/proto/geometry_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p3beta1/proto/geometry_pb2_grpc.py +++ b/google/cloud/vision_v1p3beta1/proto/geometry_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2.py b/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2.py index 1e023200..f6793295 100644 --- a/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p3beta1/proto/image_annotator.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -44,12 +41,9 @@ name="google/cloud/vision_v1p3beta1/proto/image_annotator.proto", package="google.cloud.vision.v1p3beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p3beta1B\023ImageAnnotatorProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n9google/cloud/vision_v1p3beta1/proto/image_annotator.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x32google/cloud/vision_v1p3beta1/proto/geometry.proto\x1a\x38google/cloud/vision_v1p3beta1/proto/product_search.proto\x1a\x39google/cloud/vision_v1p3beta1/proto/text_annotation.proto\x1a\x37google/cloud/vision_v1p3beta1/proto/web_detection.proto\x1a#google/longrunning/operations.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.v1p3beta1.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.v1p3beta1.ImageSource"\x9b\x0e\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x45\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12I\n\tlandmarks\x18\x03 \x03(\x0b\x32\x36.google.cloud.vision.v1p3beta1.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.v1p3beta1.Likelihood\x12\x44\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x43\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x46\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12K\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x45\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x46\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x1a\xc7\x07\n\x08Landmark\x12I\n\x04type\x18\x03 \x01(\x0e\x32;.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type\x12\x39\n\x08position\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1p3beta1.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"\xbc\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\x12\n\nconfidence\x18\x05 \x01(\x02\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12\x42\n\rbounding_poly\x18\x07 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12>\n\tlocations\x18\x08 \x03(\x0b\x32+.google.cloud.vision.v1p3beta1.LocationInfo\x12;\n\nproperties\x18\t \x03(\x0b\x32\'.google.cloud.vision.v1p3beta1.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.v1p3beta1.BoundingPoly"\xbc\x02\n\x14SafeSearchAnnotation\x12\x38\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x38\n\x05spoof\x18\x02 \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12:\n\x07medical\x18\x03 \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12;\n\x08violence\x18\x04 \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x37\n\x04racy\x18\t \x01(\x0e\x32).google.cloud.vision.v1p3beta1.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.v1p3beta1.ColorInfo"c\n\x0fImageProperties\x12P\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x37.google.cloud.vision.v1p3beta1.DominantColorsAnnotation"\x7f\n\x08\x43ropHint\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.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.v1p3beta1.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.v1p3beta1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12I\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32..google.cloud.vision.v1p3beta1.CropHintsParams\x12Q\n\x15product_search_params\x18\x05 \x01(\x0b\x32\x32.google.cloud.vision.v1p3beta1.ProductSearchParams\x12O\n\x14web_detection_params\x18\x06 \x01(\x0b\x32\x31.google.cloud.vision.v1p3beta1.WebDetectionParams"\xc9\x01\n\x14\x41nnotateImageRequest\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1p3beta1.Image\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p3beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.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.v1p3beta1.FaceAnnotation\x12M\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.EntityAnnotation\x12I\n\x10logo_annotations\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.EntityAnnotation\x12J\n\x11label_annotations\x18\x04 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.EntityAnnotation\x12^\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x38.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation\x12I\n\x10text_annotations\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.EntityAnnotation\x12K\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32-.google.cloud.vision.v1p3beta1.TextAnnotation\x12S\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32\x33.google.cloud.vision.v1p3beta1.SafeSearchAnnotation\x12S\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32..google.cloud.vision.v1p3beta1.ImageProperties\x12Q\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32\x32.google.cloud.vision.v1p3beta1.CropHintsAnnotation\x12\x42\n\rweb_detection\x18\r \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.WebDetection\x12S\n\x16product_search_results\x18\x0e \x01(\x0b\x32\x33.google.cloud.vision.v1p3beta1.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.v1p3beta1.ImageAnnotationContext"\xa1\x01\n\x14\x41nnotateFileResponse\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p3beta1.InputConfig\x12G\n\tresponses\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.AnnotateImageResponse"c\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x45\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p3beta1.AnnotateImageRequest"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.AnnotateImageResponse"\x9e\x02\n\x18\x41syncAnnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p3beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p3beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.ImageContext\x12\x42\n\routput_config\x18\x04 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.OutputConfig"_\n\x19\x41syncAnnotateFileResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.OutputConfig"p\n\x1e\x41syncBatchAnnotateFilesRequest\x12N\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02"n\n\x1f\x41syncBatchAnnotateFilesResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32\x38.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse"^\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32(.google.cloud.vision.v1p3beta1.GcsSource\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.v1p3beta1.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.v1p3beta1.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\xb5\x04\n\x0eImageAnnotator\x12\xbe\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse"0\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p3beta1/images:annotate:\x01*\xda\x41\x08requests\x12\xe9\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02("#/v1p3beta1/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\x82\x01\n!com.google.cloud.vision.v1p3beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p3beta1B\023ImageAnnotatorProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n9google/cloud/vision_v1p3beta1/proto/image_annotator.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x32google/cloud/vision_v1p3beta1/proto/geometry.proto\x1a\x38google/cloud/vision_v1p3beta1/proto/product_search.proto\x1a\x39google/cloud/vision_v1p3beta1/proto/text_annotation.proto\x1a\x37google/cloud/vision_v1p3beta1/proto/web_detection.proto\x1a#google/longrunning/operations.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.v1p3beta1.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.v1p3beta1.ImageSource"\x9b\x0e\n\x0e\x46\x61\x63\x65\x41nnotation\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x45\n\x10\x66\x64_bounding_poly\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12I\n\tlandmarks\x18\x03 \x03(\x0b\x32\x36.google.cloud.vision.v1p3beta1.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.v1p3beta1.Likelihood\x12\x44\n\x11sorrow_likelihood\x18\n \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x43\n\x10\x61nger_likelihood\x18\x0b \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x46\n\x13surprise_likelihood\x18\x0c \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12K\n\x18under_exposed_likelihood\x18\r \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x45\n\x12\x62lurred_likelihood\x18\x0e \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x46\n\x13headwear_likelihood\x18\x0f \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x1a\xc7\x07\n\x08Landmark\x12I\n\x04type\x18\x03 \x01(\x0e\x32;.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type\x12\x39\n\x08position\x18\x04 \x01(\x0b\x32\'.google.cloud.vision.v1p3beta1.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"\xbc\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\x12\n\nconfidence\x18\x05 \x01(\x02\x12\x12\n\ntopicality\x18\x06 \x01(\x02\x12\x42\n\rbounding_poly\x18\x07 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12>\n\tlocations\x18\x08 \x03(\x0b\x32+.google.cloud.vision.v1p3beta1.LocationInfo\x12;\n\nproperties\x18\t \x03(\x0b\x32\'.google.cloud.vision.v1p3beta1.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.v1p3beta1.BoundingPoly"\xbc\x02\n\x14SafeSearchAnnotation\x12\x38\n\x05\x61\x64ult\x18\x01 \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x38\n\x05spoof\x18\x02 \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12:\n\x07medical\x18\x03 \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12;\n\x08violence\x18\x04 \x01(\x0e\x32).google.cloud.vision.v1p3beta1.Likelihood\x12\x37\n\x04racy\x18\t \x01(\x0e\x32).google.cloud.vision.v1p3beta1.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.v1p3beta1.ColorInfo"c\n\x0fImageProperties\x12P\n\x0f\x64ominant_colors\x18\x01 \x01(\x0b\x32\x37.google.cloud.vision.v1p3beta1.DominantColorsAnnotation"\x7f\n\x08\x43ropHint\x12\x42\n\rbounding_poly\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.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.v1p3beta1.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.v1p3beta1.LatLongRect\x12\x16\n\x0elanguage_hints\x18\x02 \x03(\t\x12I\n\x11\x63rop_hints_params\x18\x04 \x01(\x0b\x32..google.cloud.vision.v1p3beta1.CropHintsParams\x12Q\n\x15product_search_params\x18\x05 \x01(\x0b\x32\x32.google.cloud.vision.v1p3beta1.ProductSearchParams\x12O\n\x14web_detection_params\x18\x06 \x01(\x0b\x32\x31.google.cloud.vision.v1p3beta1.WebDetectionParams"\xc9\x01\n\x14\x41nnotateImageRequest\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32$.google.cloud.vision.v1p3beta1.Image\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p3beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.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.v1p3beta1.FaceAnnotation\x12M\n\x14landmark_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.EntityAnnotation\x12I\n\x10logo_annotations\x18\x03 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.EntityAnnotation\x12J\n\x11label_annotations\x18\x04 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.EntityAnnotation\x12^\n\x1clocalized_object_annotations\x18\x16 \x03(\x0b\x32\x38.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation\x12I\n\x10text_annotations\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.EntityAnnotation\x12K\n\x14\x66ull_text_annotation\x18\x0c \x01(\x0b\x32-.google.cloud.vision.v1p3beta1.TextAnnotation\x12S\n\x16safe_search_annotation\x18\x06 \x01(\x0b\x32\x33.google.cloud.vision.v1p3beta1.SafeSearchAnnotation\x12S\n\x1bimage_properties_annotation\x18\x08 \x01(\x0b\x32..google.cloud.vision.v1p3beta1.ImageProperties\x12Q\n\x15\x63rop_hints_annotation\x18\x0b \x01(\x0b\x32\x32.google.cloud.vision.v1p3beta1.CropHintsAnnotation\x12\x42\n\rweb_detection\x18\r \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.WebDetection\x12S\n\x16product_search_results\x18\x0e \x01(\x0b\x32\x33.google.cloud.vision.v1p3beta1.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.v1p3beta1.ImageAnnotationContext"\xa1\x01\n\x14\x41nnotateFileResponse\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p3beta1.InputConfig\x12G\n\tresponses\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.AnnotateImageResponse"c\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x45\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p3beta1.AnnotateImageRequest"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.AnnotateImageResponse"\x9e\x02\n\x18\x41syncAnnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p3beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p3beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.ImageContext\x12\x42\n\routput_config\x18\x04 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.OutputConfig"_\n\x19\x41syncAnnotateFileResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.OutputConfig"p\n\x1e\x41syncBatchAnnotateFilesRequest\x12N\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02"n\n\x1f\x41syncBatchAnnotateFilesResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32\x38.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse"^\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32(.google.cloud.vision.v1p3beta1.GcsSource\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.v1p3beta1.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.v1p3beta1.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\xb5\x04\n\x0eImageAnnotator\x12\xbe\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse"0\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p3beta1/images:annotate:\x01*\xda\x41\x08requests\x12\xe9\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02("#/v1p3beta1/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\x82\x01\n!com.google.cloud.vision.v1p3beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -71,24 +65,55 @@ full_name="google.cloud.vision.v1p3beta1.Likelihood", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERY_UNLIKELY", index=1, number=1, serialized_options=None, type=None + name="VERY_UNLIKELY", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UNLIKELY", index=2, number=2, serialized_options=None, type=None + name="UNLIKELY", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="POSSIBLE", index=3, number=3, serialized_options=None, type=None + name="POSSIBLE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LIKELY", index=4, number=4, serialized_options=None, type=None + name="LIKELY", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERY_LIKELY", index=5, number=5, serialized_options=None, type=None + name="VERY_LIKELY", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -112,6 +137,7 @@ full_name="google.cloud.vision.v1p3beta1.Feature.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TYPE_UNSPECIFIED", @@ -119,9 +145,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FACE_DETECTION", index=1, number=1, serialized_options=None, type=None + name="FACE_DETECTION", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LANDMARK_DETECTION", @@ -129,9 +161,15 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOGO_DETECTION", index=3, number=3, serialized_options=None, type=None + name="LOGO_DETECTION", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LABEL_DETECTION", @@ -139,9 +177,15 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TEXT_DETECTION", index=5, number=5, serialized_options=None, type=None + name="TEXT_DETECTION", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="DOCUMENT_TEXT_DETECTION", @@ -149,6 +193,7 @@ number=11, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SAFE_SEARCH_DETECTION", @@ -156,6 +201,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="IMAGE_PROPERTIES", @@ -163,9 +209,15 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CROP_HINTS", index=9, number=9, serialized_options=None, type=None + name="CROP_HINTS", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="WEB_DETECTION", @@ -173,6 +225,7 @@ number=10, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="PRODUCT_SEARCH", @@ -180,6 +233,7 @@ number=12, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="OBJECT_LOCALIZATION", @@ -187,6 +241,7 @@ number=19, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -201,6 +256,7 @@ full_name="google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="UNKNOWN_LANDMARK", @@ -208,12 +264,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LEFT_EYE", index=1, number=1, serialized_options=None, type=None + name="LEFT_EYE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RIGHT_EYE", index=2, number=2, serialized_options=None, type=None + name="RIGHT_EYE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_OF_LEFT_EYEBROW", @@ -221,6 +288,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_OF_LEFT_EYEBROW", @@ -228,6 +296,7 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_OF_RIGHT_EYEBROW", @@ -235,6 +304,7 @@ number=5, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_OF_RIGHT_EYEBROW", @@ -242,6 +312,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="MIDPOINT_BETWEEN_EYES", @@ -249,24 +320,55 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="NOSE_TIP", index=8, number=8, serialized_options=None, type=None + name="NOSE_TIP", + index=8, + number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UPPER_LIP", index=9, number=9, serialized_options=None, type=None + name="UPPER_LIP", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOWER_LIP", index=10, number=10, serialized_options=None, type=None + name="LOWER_LIP", + index=10, + number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_LEFT", index=11, number=11, serialized_options=None, type=None + name="MOUTH_LEFT", + index=11, + number=11, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_RIGHT", index=12, number=12, serialized_options=None, type=None + name="MOUTH_RIGHT", + index=12, + number=12, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_CENTER", index=13, number=13, serialized_options=None, type=None + name="MOUTH_CENTER", + index=13, + number=13, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_RIGHT", @@ -274,6 +376,7 @@ number=14, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_LEFT", @@ -281,6 +384,7 @@ number=15, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_CENTER", @@ -288,6 +392,7 @@ number=16, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_TOP_BOUNDARY", @@ -295,6 +400,7 @@ number=17, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_RIGHT_CORNER", @@ -302,6 +408,7 @@ number=18, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_BOTTOM_BOUNDARY", @@ -309,6 +416,7 @@ number=19, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_LEFT_CORNER", @@ -316,6 +424,7 @@ number=20, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_TOP_BOUNDARY", @@ -323,6 +432,7 @@ number=21, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_RIGHT_CORNER", @@ -330,6 +440,7 @@ number=22, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_BOTTOM_BOUNDARY", @@ -337,6 +448,7 @@ number=23, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_LEFT_CORNER", @@ -344,6 +456,7 @@ number=24, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYEBROW_UPPER_MIDPOINT", @@ -351,6 +464,7 @@ number=25, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYEBROW_UPPER_MIDPOINT", @@ -358,6 +472,7 @@ number=26, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EAR_TRAGION", @@ -365,6 +480,7 @@ number=27, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EAR_TRAGION", @@ -372,6 +488,7 @@ number=28, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_PUPIL", @@ -379,6 +496,7 @@ number=29, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_PUPIL", @@ -386,6 +504,7 @@ number=30, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="FOREHEAD_GLABELLA", @@ -393,6 +512,7 @@ number=31, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_GNATHION", @@ -400,6 +520,7 @@ number=32, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_LEFT_GONION", @@ -407,6 +528,7 @@ number=33, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_RIGHT_GONION", @@ -414,6 +536,7 @@ number=34, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -428,6 +551,7 @@ full_name="google.cloud.vision.v1p3beta1.OperationMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -435,18 +559,39 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CREATED", index=1, number=1, serialized_options=None, type=None + name="CREATED", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=2, number=2, serialized_options=None, type=None + name="RUNNING", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="DONE", index=3, number=3, serialized_options=None, type=None + name="DONE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=4, number=4, serialized_options=None, type=None + name="CANCELLED", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -463,6 +608,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -481,6 +627,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="max_results", @@ -499,6 +646,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -509,7 +657,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -517,11 +665,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_FEATURE_TYPE], + enum_types=[_FEATURE_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -538,6 +687,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_image_uri", @@ -548,7 +698,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -556,6 +706,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_uri", @@ -566,7 +717,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -574,6 +725,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -595,6 +747,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="content", @@ -605,7 +758,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -613,6 +766,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source", @@ -631,6 +785,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -652,6 +807,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -670,6 +826,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="position", @@ -688,11 +845,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_FACEANNOTATION_LANDMARK_TYPE], + enum_types=[_FACEANNOTATION_LANDMARK_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -708,6 +866,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -726,6 +885,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fd_bounding_poly", @@ -744,6 +904,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmarks", @@ -762,6 +923,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="roll_angle", @@ -780,6 +942,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pan_angle", @@ -798,6 +961,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tilt_angle", @@ -816,6 +980,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detection_confidence", @@ -834,6 +999,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmarking_confidence", @@ -852,6 +1018,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="joy_likelihood", @@ -870,6 +1037,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sorrow_likelihood", @@ -888,6 +1056,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="anger_likelihood", @@ -906,6 +1075,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="surprise_likelihood", @@ -924,6 +1094,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="under_exposed_likelihood", @@ -942,6 +1113,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="blurred_likelihood", @@ -960,6 +1132,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="headwear_likelihood", @@ -978,10 +1151,11 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_FACEANNOTATION_LANDMARK], + nested_types=[_FACEANNOTATION_LANDMARK,], enum_types=[], serialized_options=None, is_extendable=False, @@ -999,6 +1173,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="lat_lng", @@ -1017,7 +1192,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1038,6 +1214,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1048,7 +1225,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1056,6 +1233,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1066,7 +1244,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1074,6 +1252,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uint64_value", @@ -1092,6 +1271,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1113,6 +1293,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mid", @@ -1123,7 +1304,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1131,6 +1312,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="locale", @@ -1141,7 +1323,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1149,6 +1331,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1159,7 +1342,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1167,6 +1350,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1185,6 +1369,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1203,6 +1388,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="topicality", @@ -1221,6 +1407,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_poly", @@ -1239,6 +1426,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="locations", @@ -1257,6 +1445,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="properties", @@ -1275,6 +1464,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1296,6 +1486,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mid", @@ -1306,7 +1497,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1314,6 +1505,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1324,7 +1516,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1332,6 +1524,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="name", @@ -1342,7 +1535,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1350,6 +1543,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1368,6 +1562,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_poly", @@ -1386,6 +1581,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1407,6 +1603,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="adult", @@ -1425,6 +1622,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="spoof", @@ -1443,6 +1641,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="medical", @@ -1461,6 +1660,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="violence", @@ -1479,6 +1679,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="racy", @@ -1497,6 +1698,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1518,6 +1720,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="min_lat_lng", @@ -1536,6 +1739,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="max_lat_lng", @@ -1554,6 +1758,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1575,6 +1780,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="color", @@ -1593,6 +1799,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1611,6 +1818,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pixel_fraction", @@ -1629,6 +1837,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1650,6 +1859,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="colors", @@ -1668,7 +1878,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1689,6 +1900,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="dominant_colors", @@ -1707,7 +1919,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1728,6 +1941,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -1746,6 +1960,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1764,6 +1979,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="importance_fraction", @@ -1782,6 +1998,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1803,6 +2020,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="crop_hints", @@ -1821,7 +2039,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1842,6 +2061,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="aspect_ratios", @@ -1860,7 +2080,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1881,6 +2102,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="include_geo_results", @@ -1899,7 +2121,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1920,6 +2143,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="lat_long_rect", @@ -1938,6 +2162,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_hints", @@ -1956,6 +2181,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="crop_hints_params", @@ -1974,6 +2200,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_search_params", @@ -1992,6 +2219,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="web_detection_params", @@ -2010,6 +2238,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2031,6 +2260,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="image", @@ -2049,6 +2279,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="features", @@ -2067,6 +2298,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_context", @@ -2085,6 +2317,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2106,6 +2339,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -2116,7 +2350,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2124,6 +2358,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_number", @@ -2142,6 +2377,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2163,6 +2399,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="face_annotations", @@ -2181,6 +2418,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmark_annotations", @@ -2199,6 +2437,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="logo_annotations", @@ -2217,6 +2456,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="label_annotations", @@ -2235,6 +2475,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="localized_object_annotations", @@ -2253,6 +2494,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text_annotations", @@ -2271,6 +2513,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_text_annotation", @@ -2289,6 +2532,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="safe_search_annotation", @@ -2307,6 +2551,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_properties_annotation", @@ -2325,6 +2570,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="crop_hints_annotation", @@ -2343,6 +2589,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="web_detection", @@ -2361,6 +2608,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_search_results", @@ -2379,6 +2627,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="error", @@ -2397,6 +2646,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="context", @@ -2415,6 +2665,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2436,6 +2687,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_config", @@ -2454,6 +2706,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="responses", @@ -2472,6 +2725,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2493,6 +2747,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -2511,7 +2766,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2532,6 +2788,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="responses", @@ -2550,7 +2807,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2571,6 +2829,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_config", @@ -2589,6 +2848,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="features", @@ -2607,6 +2867,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_context", @@ -2625,6 +2886,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_config", @@ -2643,6 +2905,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2664,6 +2927,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="output_config", @@ -2682,7 +2946,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2703,6 +2968,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -2719,9 +2985,10 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2742,6 +3009,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="responses", @@ -2760,7 +3028,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2781,6 +3050,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -2799,6 +3069,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mime_type", @@ -2809,7 +3080,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2817,6 +3088,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2838,6 +3110,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", @@ -2856,6 +3129,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="batch_size", @@ -2874,6 +3148,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2895,6 +3170,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -2905,7 +3181,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2913,7 +3189,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2934,6 +3211,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -2944,7 +3222,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2952,7 +3230,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2973,6 +3252,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="state", @@ -2991,6 +3271,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -3009,6 +3290,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -3027,11 +3309,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_OPERATIONMETADATA_STATE], + enum_types=[_OPERATIONMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -3244,12 +3527,13 @@ Feature = _reflection.GeneratedProtocolMessageType( "Feature", (_message.Message,), - dict( - DESCRIPTOR=_FEATURE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""The type of Google Cloud Vision API detection to perform, and the + { + "DESCRIPTOR": _FEATURE, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple ``Feature`` objects can be specified in the ``features`` list. + Attributes: type: The feature type. @@ -3259,21 +3543,22 @@ ``CROP_HINTS``. model: Model to use for the feature. Supported values: - "builtin/stable" (the default if unset) and "builtin/latest". + “builtin/stable” (the default if unset) and “builtin/latest”. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Feature) - ), + }, ) _sym_db.RegisterMessage(Feature) ImageSource = _reflection.GeneratedProtocolMessageType( "ImageSource", (_message.Message,), - dict( - DESCRIPTOR=_IMAGESOURCE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage or web URL image + { + "DESCRIPTOR": _IMAGESOURCE, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """External image source (Google Cloud Storage or web URL image location). + Attributes: gcs_image_uri: \ **Use ``image_uri`` instead.** The Google Cloud Storage URI @@ -3290,7 +3575,7 @@ more info. 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Google cannot guarantee that the request will be completed. Your request - may fail if the specified host denies the request (e.g. due + may fail if the specified host denies the request (e.g. due to request throttling or DOS prevention), or if Google throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production @@ -3298,17 +3583,18 @@ are specified, ``image_uri`` takes precedence. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageSource) - ), + }, ) _sym_db.RegisterMessage(ImageSource) Image = _reflection.GeneratedProtocolMessageType( "Image", (_message.Message,), - dict( - DESCRIPTOR=_IMAGE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + { + "DESCRIPTOR": _IMAGE, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Client image to perform Google Cloud Vision API tasks over. + Attributes: content: Image content, represented as a stream of bytes. Note: As with @@ -3321,21 +3607,22 @@ the image annotation request. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Image) - ), + }, ) _sym_db.RegisterMessage(Image) FaceAnnotation = _reflection.GeneratedProtocolMessageType( "FaceAnnotation", (_message.Message,), - dict( - Landmark=_reflection.GeneratedProtocolMessageType( + { + "Landmark": _reflection.GeneratedProtocolMessageType( "Landmark", (_message.Message,), - dict( - DESCRIPTOR=_FACEANNOTATION_LANDMARK, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""A face-specific landmark (for example, a face feature). + { + "DESCRIPTOR": _FACEANNOTATION_LANDMARK, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """A face-specific landmark (for example, a face feature). + Attributes: type: Face landmark type. @@ -3343,16 +3630,17 @@ Face landmark position. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) - ), + }, ), - DESCRIPTOR=_FACEANNOTATION, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + "DESCRIPTOR": _FACEANNOTATION, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """A face annotation object contains the results of face detection. + Attributes: bounding_poly: The bounding polygon around the face. The coordinates of the - bounding box are in the original image's scale, as returned in - ``ImageParams``. The bounding box is computed to "frame" the + bounding box are in the original image’s scale, as returned in + ``ImageParams``. The bounding box is computed to “frame” the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the ``BoundingPoly`` (the @@ -3362,7 +3650,7 @@ The ``fd_bounding_poly`` bounding polygon is tighter than the ``boundingPoly``, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image - analysis that detects the "amount of skin" visible in an + analysis that detects the “amount of skin” visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix. landmarks: @@ -3377,7 +3665,7 @@ perpendicular to the image. Range [-180,180]. tilt_angle: Pitch angle, which indicates the upwards/downwards angle that - the face is pointing relative to the image's horizontal plane. + the face is pointing relative to the image’s horizontal plane. Range [-180,180]. detection_confidence: Detection confidence. Range [0, 1]. @@ -3399,7 +3687,7 @@ Headwear likelihood. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.FaceAnnotation) - ), + }, ) _sym_db.RegisterMessage(FaceAnnotation) _sym_db.RegisterMessage(FaceAnnotation.Landmark) @@ -3407,26 +3695,28 @@ LocationInfo = _reflection.GeneratedProtocolMessageType( "LocationInfo", (_message.Message,), - dict( - DESCRIPTOR=_LOCATIONINFO, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Detected entity location information. + { + "DESCRIPTOR": _LOCATIONINFO, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Detected entity location information. + Attributes: lat_lng: lat/long location coordinates. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LocationInfo) - ), + }, ) _sym_db.RegisterMessage(LocationInfo) Property = _reflection.GeneratedProtocolMessageType( "Property", (_message.Message,), - dict( - DESCRIPTOR=_PROPERTY, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + { + "DESCRIPTOR": _PROPERTY, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """A ``Property`` consists of a user-supplied name/value pair. + Attributes: name: Name of the property. @@ -3436,17 +3726,18 @@ Value of numeric properties. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Property) - ), + }, ) _sym_db.RegisterMessage(Property) EntityAnnotation = _reflection.GeneratedProtocolMessageType( "EntityAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_ENTITYANNOTATION, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Set of detected entity features. + { + "DESCRIPTOR": _ENTITYANNOTATION, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Set of detected entity features. + Attributes: mid: Opaque entity ID. Some IDs may be available in `Google @@ -3463,13 +3754,13 @@ confidence: \ **Deprecated. Use ``score`` instead.** The accuracy of the entity detection in an image. For example, for an image in - which the "Eiffel Tower" entity is detected, this field + which the “Eiffel Tower” entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1]. topicality: The relevancy of the ICA (Image Content Annotation) label to - the image. For example, the relevancy of "tower" is likely - higher to an image containing the detected "Eiffel Tower" than + the image. For example, the relevancy of “tower” is likely + higher to an image containing the detected “Eiffel Tower” than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1]. @@ -3489,24 +3780,25 @@ entity. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.EntityAnnotation) - ), + }, ) _sym_db.RegisterMessage(EntityAnnotation) LocalizedObjectAnnotation = _reflection.GeneratedProtocolMessageType( "LocalizedObjectAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_LOCALIZEDOBJECTANNOTATION, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Set of detected objects with bounding boxes. + { + "DESCRIPTOR": _LOCALIZEDOBJECTANNOTATION, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Set of detected objects with bounding boxes. + 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 + 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. + code_locale_identifier. name: Object name, expressed in its ``language_code`` language. score: @@ -3516,19 +3808,20 @@ populated. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) - ), + }, ) _sym_db.RegisterMessage(LocalizedObjectAnnotation) SafeSearchAnnotation = _reflection.GeneratedProtocolMessageType( "SafeSearchAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_SAFESEARCHANNOTATION, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Set of features pertaining to the image, computed by computer vision + { + "DESCRIPTOR": _SAFESEARCHANNOTATION, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence). + Attributes: adult: Represents the adult content likelihood for the image. Adult @@ -3536,7 +3829,7 @@ images or cartoons, or sexual activities. spoof: Spoof likelihood. The likelihood that an modification was made - to the image's canonical version to make it appear funny or + to the image’s canonical version to make it appear funny or offensive. medical: Likelihood that this is a medical image. @@ -3549,17 +3842,18 @@ poses, or close-ups of sensitive body areas. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.SafeSearchAnnotation) - ), + }, ) _sym_db.RegisterMessage(SafeSearchAnnotation) LatLongRect = _reflection.GeneratedProtocolMessageType( "LatLongRect", (_message.Message,), - dict( - DESCRIPTOR=_LATLONGRECT, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Rectangle determined by min and max ``LatLng`` pairs. + { + "DESCRIPTOR": _LATLONGRECT, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Rectangle determined by min and max ``LatLng`` pairs. + Attributes: min_lat_lng: Min lat/long pair. @@ -3567,18 +3861,19 @@ Max lat/long pair. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.LatLongRect) - ), + }, ) _sym_db.RegisterMessage(LatLongRect) ColorInfo = _reflection.GeneratedProtocolMessageType( "ColorInfo", (_message.Message,), - dict( - DESCRIPTOR=_COLORINFO, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Color information consists of RGB channels, score, and the fraction of + { + "DESCRIPTOR": _COLORINFO, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image. + Attributes: color: RGB components of the color. @@ -3589,54 +3884,57 @@ in range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ColorInfo) - ), + }, ) _sym_db.RegisterMessage(ColorInfo) DominantColorsAnnotation = _reflection.GeneratedProtocolMessageType( "DominantColorsAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_DOMINANTCOLORSANNOTATION, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Set of dominant colors and their corresponding scores. + { + "DESCRIPTOR": _DOMINANTCOLORSANNOTATION, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Set of dominant colors and their corresponding scores. + Attributes: colors: RGB color values with their score and pixel fraction. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DominantColorsAnnotation) - ), + }, ) _sym_db.RegisterMessage(DominantColorsAnnotation) ImageProperties = _reflection.GeneratedProtocolMessageType( "ImageProperties", (_message.Message,), - dict( - DESCRIPTOR=_IMAGEPROPERTIES, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Stores image properties, such as dominant colors. + { + "DESCRIPTOR": _IMAGEPROPERTIES, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Stores image properties, such as dominant colors. + Attributes: dominant_colors: If present, dominant colors completed successfully. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageProperties) - ), + }, ) _sym_db.RegisterMessage(ImageProperties) CropHint = _reflection.GeneratedProtocolMessageType( "CropHint", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINT, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Single crop hint that is used to generate a new crop when serving an + { + "DESCRIPTOR": _CROPHINT, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Single crop hint that is used to generate a new crop when serving an image. + Attributes: bounding_poly: The bounding polygon for the crop region. The coordinates of - the bounding box are in the original image's scale, as + the bounding box are in the original image’s scale, as returned in ``ImageParams``. confidence: Confidence of this being a salient region. Range [0, 1]. @@ -3645,34 +3943,36 @@ the original image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHint) - ), + }, ) _sym_db.RegisterMessage(CropHint) CropHintsAnnotation = _reflection.GeneratedProtocolMessageType( "CropHintsAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINTSANNOTATION, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Set of crop hints that are used to generate new crops when serving + { + "DESCRIPTOR": _CROPHINTSANNOTATION, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Set of crop hints that are used to generate new crops when serving images. + Attributes: crop_hints: Crop hint results. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHintsAnnotation) - ), + }, ) _sym_db.RegisterMessage(CropHintsAnnotation) CropHintsParams = _reflection.GeneratedProtocolMessageType( "CropHintsParams", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINTSPARAMS, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Parameters for crop hints annotation request. + { + "DESCRIPTOR": _CROPHINTSPARAMS, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Parameters for crop hints annotation request. + Attributes: aspect_ratios: Aspect ratios in floats, representing the ratio of the width @@ -3683,47 +3983,49 @@ 16; any aspect ratios provided after the 16th are ignored. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CropHintsParams) - ), + }, ) _sym_db.RegisterMessage(CropHintsParams) WebDetectionParams = _reflection.GeneratedProtocolMessageType( "WebDetectionParams", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTIONPARAMS, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Parameters for web detection request. + { + "DESCRIPTOR": _WEBDETECTIONPARAMS, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Parameters for web detection request. + Attributes: include_geo_results: Whether to include results derived from the geo information in the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetectionParams) - ), + }, ) _sym_db.RegisterMessage(WebDetectionParams) ImageContext = _reflection.GeneratedProtocolMessageType( "ImageContext", (_message.Message,), - dict( - DESCRIPTOR=_IMAGECONTEXT, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Image context and/or feature-specific parameters. + { + "DESCRIPTOR": _IMAGECONTEXT, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Image context and/or feature-specific parameters. + Attributes: lat_long_rect: Not used. language_hints: - List of languages to use for TEXT\_DETECTION. In most cases, - an empty value yields the best results since it enables - automatic language detection. For languages based on the Latin - alphabet, setting ``language_hints`` is not needed. In rare - cases, when the language of the text in the image is known, - setting a hint will help get better results (although it will - be a significant hindrance if the hint is wrong). Text - detection returns an error if one or more of the specified - languages is not one of the `supported languages + List of languages to use for TEXT_DETECTION. In most cases, an + empty value yields the best results since it enables automatic + language detection. For languages based on the Latin alphabet, + setting ``language_hints`` is not needed. In rare cases, when + the language of the text in the image is known, setting a hint + will help get better results (although it will be a + significant hindrance if the hint is wrong). Text detection + returns an error if one or more of the specified languages is + not one of the `supported languages `__. crop_hints_params: Parameters for crop hints annotation request. @@ -3733,18 +4035,19 @@ Parameters for web detection. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageContext) - ), + }, ) _sym_db.RegisterMessage(ImageContext) AnnotateImageRequest = _reflection.GeneratedProtocolMessageType( "AnnotateImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGEREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Request for performing Google Cloud Vision API tasks over a user- + { + "DESCRIPTOR": _ANNOTATEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Request for performing Google Cloud Vision API tasks over a user- provided image, with user-requested features. + Attributes: image: The image to be processed. @@ -3754,18 +4057,19 @@ Additional context that may accompany the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateImageRequest) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageRequest) ImageAnnotationContext = _reflection.GeneratedProtocolMessageType( "ImageAnnotationContext", (_message.Message,), - dict( - DESCRIPTOR=_IMAGEANNOTATIONCONTEXT, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""If an image was produced from a file (e.g. a PDF), this message gives + { + "DESCRIPTOR": _IMAGEANNOTATIONCONTEXT, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image. + Attributes: uri: The URI of the file used to produce the image. @@ -3774,17 +4078,18 @@ number within the file used to produce the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImageAnnotationContext) - ), + }, ) _sym_db.RegisterMessage(ImageAnnotationContext) AnnotateImageResponse = _reflection.GeneratedProtocolMessageType( "AnnotateImageResponse", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGERESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Response to an image annotation request. + { + "DESCRIPTOR": _ANNOTATEIMAGERESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Response to an image annotation request. + Attributes: face_annotations: If present, face detection has completed successfully. @@ -3823,18 +4128,19 @@ where this image comes from. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateImageResponse) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageResponse) AnnotateFileResponse = _reflection.GeneratedProtocolMessageType( "AnnotateFileResponse", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEFILERESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Response to a single file annotation request. A file may contain one + { + "DESCRIPTOR": _ANNOTATEFILERESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.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 @@ -3843,51 +4149,54 @@ Individual responses to images found within the file. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AnnotateFileResponse) - ), + }, ) _sym_db.RegisterMessage(AnnotateFileResponse) BatchAnnotateImagesRequest = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Multiple image annotation requests are batched into a single service call. + Attributes: requests: Individual image annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesRequest) BatchAnnotateImagesResponse = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESRESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Response to a batch image annotation request. + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Response to a batch image annotation request. + Attributes: responses: Individual responses to image annotation requests within the batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesResponse) AsyncAnnotateFileRequest = _reflection.GeneratedProtocolMessageType( "AsyncAnnotateFileRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCANNOTATEFILEREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""An offline file annotation request. + { + "DESCRIPTOR": _ASYNCANNOTATEFILEREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """An offline file annotation request. + Attributes: input_config: Required. Information about the input file. @@ -3897,92 +4206,97 @@ Additional context that may accompany the image(s) in the file. output_config: - Required. The desired output location and metadata (e.g. - format). + Required. The desired output location and metadata + (e.g. format). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncAnnotateFileRequest) AsyncAnnotateFileResponse = _reflection.GeneratedProtocolMessageType( "AsyncAnnotateFileResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCANNOTATEFILERESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""The response for a single offline file annotation request. + { + "DESCRIPTOR": _ASYNCANNOTATEFILERESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """The response for a single offline file annotation request. + Attributes: output_config: The output location and metadata from AsyncAnnotateFileRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncAnnotateFileResponse) AsyncBatchAnnotateFilesRequest = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateFilesRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEFILESREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Multiple async file annotation requests are batched into a single + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEFILESREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Multiple async file annotation requests are batched into a single service call. + Attributes: requests: Required. Individual async file annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateFilesRequest) AsyncBatchAnnotateFilesResponse = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateFilesResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEFILESRESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Response to an async batch file annotation request. + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEFILESRESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Response to an async batch file annotation request. + Attributes: responses: The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateFilesResponse) InputConfig = _reflection.GeneratedProtocolMessageType( "InputConfig", (_message.Message,), - dict( - DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""The desired input location and metadata. + { + "DESCRIPTOR": _INPUTCONFIG, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """The desired input location and metadata. + Attributes: gcs_source: The Google Cloud Storage location to read the input from. 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” and + “image/tiff” are supported. Wildcards are not supported. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.InputConfig) - ), + }, ) _sym_db.RegisterMessage(InputConfig) OutputConfig = _reflection.GeneratedProtocolMessageType( "OutputConfig", (_message.Message,), - dict( - DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""The desired output location and metadata. + { + "DESCRIPTOR": _OUTPUTCONFIG, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """The desired output location and metadata. + Attributes: gcs_destination: The Google Cloud Storage location to write the output(s) to. @@ -3993,22 +4307,23 @@ pdf file with 100 pages, 100 response protos will be generated. If ``batch_size`` = 20, then 5 json files each containing 20 response protos will be written under the prefix - ``gcs_destination``.\ ``uri``. Currently, batch\_size only + ``gcs_destination``.\ ``uri``. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.OutputConfig) - ), + }, ) _sym_db.RegisterMessage(OutputConfig) GcsSource = _reflection.GeneratedProtocolMessageType( "GcsSource", (_message.Message,), - dict( - DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""The Google Cloud Storage location where the input will be read from. + { + "DESCRIPTOR": _GCSSOURCE, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """The Google Cloud Storage location where the input will be read from. + Attributes: uri: Google Cloud Storage URI for the input file. This must only be @@ -4016,17 +4331,18 @@ supported. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GcsSource) - ), + }, ) _sym_db.RegisterMessage(GcsSource) GcsDestination = _reflection.GeneratedProtocolMessageType( "GcsDestination", (_message.Message,), - dict( - DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""The Google Cloud Storage location where the output will be written to. + { + "DESCRIPTOR": _GCSDESTINATION, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """The Google Cloud Storage location where the output will be written to. + Attributes: uri: Google Cloud Storage URI where the results will be stored. @@ -4042,17 +4358,18 @@ is too large and overflows into multiple sharded files. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GcsDestination) - ), + }, ) _sym_db.RegisterMessage(GcsDestination) OperationMetadata = _reflection.GeneratedProtocolMessageType( "OperationMetadata", (_message.Message,), - dict( - DESCRIPTOR=_OPERATIONMETADATA, - __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Contains metadata for the BatchAnnotateImages operation. + { + "DESCRIPTOR": _OPERATIONMETADATA, + "__module__": "google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", + "__doc__": """Contains metadata for the BatchAnnotateImages operation. + Attributes: state: Current state of the batch operation. @@ -4062,7 +4379,7 @@ The time when the operation result was last updated. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.OperationMetadata) - ), + }, ) _sym_db.RegisterMessage(OperationMetadata) @@ -4075,9 +4392,8 @@ full_name="google.cloud.vision.v1p3beta1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" - ), + serialized_options=b"\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision", + create_key=_descriptor._internal_create_key, serialized_start=7836, serialized_end=8401, methods=[ @@ -4088,9 +4404,8 @@ containing_service=None, input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\037"\032/v1p3beta1/images:annotate:\001*\332A\010requests' - ), + serialized_options=b'\202\323\344\223\002\037"\032/v1p3beta1/images:annotate:\001*\332A\010requests', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AsyncBatchAnnotateFiles", @@ -4099,9 +4414,8 @@ containing_service=None, input_type=_ASYNCBATCHANNOTATEFILESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002("#/v1p3beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata' - ), + serialized_options=b'\202\323\344\223\002("#/v1p3beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata', + create_key=_descriptor._internal_create_key, ), ], ) 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..be9a511b 100644 --- a/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.vision_v1p3beta1.proto import ( @@ -11,16 +12,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 +36,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. - """ + """ 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!") @@ -76,3 +77,65 @@ def add_ImageAnnotatorServicer_to_server(servicer, server): "google.cloud.vision.v1p3beta1.ImageAnnotator", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ImageAnnotator(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. + """ + + @staticmethod + def BatchAnnotateImages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ImageAnnotator/BatchAnnotateImages", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def AsyncBatchAnnotateFiles( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ImageAnnotator/AsyncBatchAnnotateFiles", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/vision_v1p3beta1/proto/product_search_pb2.py b/google/cloud/vision_v1p3beta1/proto/product_search_pb2.py index fc451091..bcd2f545 100644 --- a/google/cloud/vision_v1p3beta1/proto/product_search_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/product_search_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p3beta1/proto/product_search.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -31,12 +28,9 @@ name="google/cloud/vision_v1p3beta1/proto/product_search.proto", package="google.cloud.vision.v1p3beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p3beta1B\022ProductSearchProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n8google/cloud/vision_v1p3beta1/proto/product_search.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/vision_v1p3beta1/proto/geometry.proto\x1a@google/cloud/vision_v1p3beta1/proto/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xd9\x03\n\x13ProductSearchParams\x12\x14\n\x0c\x63\x61talog_name\x18\x01 \x01(\t\x12\x46\n\x08\x63\x61tegory\x18\x02 \x01(\x0e\x32\x34.google.cloud.vision.v1p3beta1.ProductSearchCategory\x12\x18\n\x10product_category\x18\x05 \x01(\t\x12W\n\x18normalized_bounding_poly\x18\x03 \x01(\x0b\x32\x35.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly\x12\x42\n\rbounding_poly\x18\t \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x45\n\x04view\x18\x04 \x01(\x0e\x32\x37.google.cloud.vision.v1p3beta1.ProductSearchResultsView\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"\xee\x03\n\x14ProductSearchResults\x12\x46\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x34.google.cloud.vision.v1p3beta1.ProductSearchCategory\x12\x18\n\x10product_category\x18\x04 \x01(\t\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12Q\n\x08products\x18\x03 \x03(\x0b\x32?.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo\x12K\n\x07results\x18\x05 \x03(\x0b\x32:.google.cloud.vision.v1p3beta1.ProductSearchResults.Result\x1a\x43\n\x0bProductInfo\x12\x12\n\nproduct_id\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t\x12\r\n\x05score\x18\x03 \x01(\x02\x1a_\n\x06Result\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p3beta1.Product\x12\r\n\x05score\x18\x02 \x01(\x02\x12\r\n\x05image\x18\x03 \x01(\t*U\n\x15ProductSearchCategory\x12\'\n#PRODUCT_SEARCH_CATEGORY_UNSPECIFIED\x10\x00\x12\t\n\x05SHOES\x10\x01\x12\x08\n\x04\x42\x41GS\x10\x02*/\n\x18ProductSearchResultsView\x12\t\n\x05\x42\x41SIC\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x42\x81\x01\n!com.google.cloud.vision.v1p3beta1B\x12ProductSearchProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p3beta1B\022ProductSearchProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n8google/cloud/vision_v1p3beta1/proto/product_search.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/vision_v1p3beta1/proto/geometry.proto\x1a@google/cloud/vision_v1p3beta1/proto/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xd9\x03\n\x13ProductSearchParams\x12\x14\n\x0c\x63\x61talog_name\x18\x01 \x01(\t\x12\x46\n\x08\x63\x61tegory\x18\x02 \x01(\x0e\x32\x34.google.cloud.vision.v1p3beta1.ProductSearchCategory\x12\x18\n\x10product_category\x18\x05 \x01(\t\x12W\n\x18normalized_bounding_poly\x18\x03 \x01(\x0b\x32\x35.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly\x12\x42\n\rbounding_poly\x18\t \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x45\n\x04view\x18\x04 \x01(\x0e\x32\x37.google.cloud.vision.v1p3beta1.ProductSearchResultsView\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"\xee\x03\n\x14ProductSearchResults\x12\x46\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x34.google.cloud.vision.v1p3beta1.ProductSearchCategory\x12\x18\n\x10product_category\x18\x04 \x01(\t\x12.\n\nindex_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12Q\n\x08products\x18\x03 \x03(\x0b\x32?.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo\x12K\n\x07results\x18\x05 \x03(\x0b\x32:.google.cloud.vision.v1p3beta1.ProductSearchResults.Result\x1a\x43\n\x0bProductInfo\x12\x12\n\nproduct_id\x18\x01 \x01(\t\x12\x11\n\timage_uri\x18\x02 \x01(\t\x12\r\n\x05score\x18\x03 \x01(\x02\x1a_\n\x06Result\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p3beta1.Product\x12\r\n\x05score\x18\x02 \x01(\x02\x12\r\n\x05image\x18\x03 \x01(\t*U\n\x15ProductSearchCategory\x12\'\n#PRODUCT_SEARCH_CATEGORY_UNSPECIFIED\x10\x00\x12\t\n\x05SHOES\x10\x01\x12\x08\n\x04\x42\x41GS\x10\x02*/\n\x18ProductSearchResultsView\x12\t\n\x05\x42\x41SIC\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x42\x81\x01\n!com.google.cloud.vision.v1p3beta1B\x12ProductSearchProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, @@ -51,6 +45,7 @@ full_name="google.cloud.vision.v1p3beta1.ProductSearchCategory", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="PRODUCT_SEARCH_CATEGORY_UNSPECIFIED", @@ -58,12 +53,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SHOES", index=1, number=1, serialized_options=None, type=None + name="SHOES", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="BAGS", index=2, number=2, serialized_options=None, type=None + name="BAGS", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -79,12 +85,23 @@ full_name="google.cloud.vision.v1p3beta1.ProductSearchResultsView", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="BASIC", index=0, number=0, serialized_options=None, type=None + name="BASIC", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FULL", index=1, number=1, serialized_options=None, type=None + name="FULL", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -108,6 +125,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="catalog_name", @@ -118,7 +136,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -126,6 +144,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="category", @@ -144,6 +163,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_category", @@ -154,7 +174,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -162,6 +182,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="normalized_bounding_poly", @@ -180,6 +201,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_poly", @@ -198,6 +220,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="view", @@ -216,6 +239,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_set", @@ -226,14 +250,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b('\372A"\n vision.googleapis.com/ProductSet'), + serialized_options=b'\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_categories", @@ -252,6 +277,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -262,7 +288,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -270,6 +296,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -291,6 +318,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product_id", @@ -301,7 +329,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -309,6 +337,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_uri", @@ -319,7 +348,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -327,6 +356,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -345,6 +375,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -365,6 +396,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product", @@ -383,6 +415,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -401,6 +434,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -411,7 +445,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -419,6 +453,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -439,6 +474,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="category", @@ -457,6 +493,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_category", @@ -467,7 +504,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -475,6 +512,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="index_time", @@ -493,6 +531,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="products", @@ -511,6 +550,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="results", @@ -529,10 +569,11 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_PRODUCTSEARCHRESULTS_PRODUCTINFO, _PRODUCTSEARCHRESULTS_RESULT], + nested_types=[_PRODUCTSEARCHRESULTS_PRODUCTINFO, _PRODUCTSEARCHRESULTS_RESULT,], enum_types=[], serialized_options=None, is_extendable=False, @@ -581,10 +622,11 @@ ProductSearchParams = _reflection.GeneratedProtocolMessageType( "ProductSearchParams", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCTSEARCHPARAMS, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_pb2", - __doc__="""Parameters for a product search request. + { + "DESCRIPTOR": _PRODUCTSEARCHPARAMS, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_pb2", + "__doc__": """Parameters for a product search request. + Attributes: catalog_name: The resource name of the catalog to search. Format is: @@ -616,32 +658,33 @@ /locations/LOC_ID/productSets/PRODUCT_SET_ID``. product_categories: The list of product categories to search in. Currently, we - only consider the first category, and either "homegoods" or - "apparel" should be specified. + only consider the first category, and either “homegoods” or + “apparel” should be specified. filter: 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. For example, “(color = red OR + color = blue) AND brand = Google” is acceptable, but not + “(color = red OR brand = Google)” or “color: red”. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchParams) - ), + }, ) _sym_db.RegisterMessage(ProductSearchParams) ProductSearchResults = _reflection.GeneratedProtocolMessageType( "ProductSearchResults", (_message.Message,), - dict( - ProductInfo=_reflection.GeneratedProtocolMessageType( + { + "ProductInfo": _reflection.GeneratedProtocolMessageType( "ProductInfo", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCTSEARCHRESULTS_PRODUCTINFO, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_pb2", - __doc__="""Information about a product. + { + "DESCRIPTOR": _PRODUCTSEARCHRESULTS_PRODUCTINFO, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_pb2", + "__doc__": """Information about a product. + Attributes: product_id: Product ID. @@ -655,15 +698,16 @@ only if ``view`` is set to ``FULL`` in the request. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo) - ), + }, ), - Result=_reflection.GeneratedProtocolMessageType( + "Result": _reflection.GeneratedProtocolMessageType( "Result", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCTSEARCHRESULTS_RESULT, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_pb2", - __doc__="""Information about a product. + { + "DESCRIPTOR": _PRODUCTSEARCHRESULTS_RESULT, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_pb2", + "__doc__": """Information about a product. + Attributes: product: The Product. @@ -676,11 +720,12 @@ closest match to the query. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults.Result) - ), + }, ), - DESCRIPTOR=_PRODUCTSEARCHRESULTS, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_pb2", - __doc__="""Results for a product search request. + "DESCRIPTOR": _PRODUCTSEARCHRESULTS, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_pb2", + "__doc__": """Results for a product search request. + Attributes: category: Product category. [Deprecated] Use ``product_category``. @@ -696,7 +741,7 @@ List of results, one for each product match. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSearchResults) - ), + }, ) _sym_db.RegisterMessage(ProductSearchResults) _sym_db.RegisterMessage(ProductSearchResults.ProductInfo) diff --git a/google/cloud/vision_v1p3beta1/proto/product_search_pb2_grpc.py b/google/cloud/vision_v1p3beta1/proto/product_search_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p3beta1/proto/product_search_pb2_grpc.py +++ b/google/cloud/vision_v1p3beta1/proto/product_search_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2.py b/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2.py index 29bfd369..a8bedab7 100644 --- a/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p3beta1/proto/product_search_service.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -35,12 +32,9 @@ name="google/cloud/vision_v1p3beta1/proto/product_search_service.proto", package="google.cloud.vision.v1p3beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p3beta1B\031ProductSearchServiceProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n@google/cloud/vision_v1p3beta1/proto/product_search_service.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\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_v1p3beta1/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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.ImportProductSetsInputConfigB\x03\xe0\x41\x02"\x8a\x01\n\x19ImportProductSetsResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p3beta1.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.v1p3beta1.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\xeb\x1e\n\rProductSearch\x12\xe6\x01\n\x10\x43reateProductSet\x12\x36.google.cloud.vision.v1p3beta1.CreateProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet"o\x82\xd3\xe4\x93\x02\x45"6/v1p3beta1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\xda\x41!parent,product_set,product_set_id\x12\xc9\x01\n\x0fListProductSets\x12\x35.google.cloud.vision.v1p3beta1.ListProductSetsRequest\x1a\x36.google.cloud.vision.v1p3beta1.ListProductSetsResponse"G\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p3beta1/{parent=projects/*/locations/*}/productSets\xda\x41\x06parent\x12\xb6\x01\n\rGetProductSet\x12\x33.google.cloud.vision.v1p3beta1.GetProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet"E\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p3beta1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xe8\x01\n\x10UpdateProductSet\x12\x36.google.cloud.vision.v1p3beta1.UpdateProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet"q\x82\xd3\xe4\x93\x02Q2B/v1p3beta1/{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.v1p3beta1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty"E\x82\xd3\xe4\x93\x02\x38*6/v1p3beta1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xce\x01\n\rCreateProduct\x12\x33.google.cloud.vision.v1p3beta1.CreateProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product"`\x82\xd3\xe4\x93\x02>"3/v1p3beta1/{parent=projects/*/locations/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xbd\x01\n\x0cListProducts\x12\x32.google.cloud.vision.v1p3beta1.ListProductsRequest\x1a\x33.google.cloud.vision.v1p3beta1.ListProductsResponse"D\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p3beta1/{parent=projects/*/locations/*}/products\xda\x41\x06parent\x12\xaa\x01\n\nGetProduct\x12\x30.google.cloud.vision.v1p3beta1.GetProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product"B\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p3beta1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xd0\x01\n\rUpdateProduct\x12\x33.google.cloud.vision.v1p3beta1.UpdateProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product"b\x82\xd3\xe4\x93\x02\x46\x32;/v1p3beta1/{product.name=projects/*/locations/*/products/*}:\x07product\xda\x41\x13product,update_mask\x12\xa0\x01\n\rDeleteProduct\x12\x33.google.cloud.vision.v1p3beta1.DeleteProductRequest\x1a\x16.google.protobuf.Empty"B\x82\xd3\xe4\x93\x02\x35*3/v1p3beta1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\x8e\x02\n\x14\x43reateReferenceImage\x12:.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest\x1a-.google.cloud.vision.v1p3beta1.ReferenceImage"\x8a\x01\x82\xd3\xe4\x93\x02X"E/v1p3beta1/{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.v1p3beta1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty"T\x82\xd3\xe4\x93\x02G*E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xe4\x01\n\x13ListReferenceImages\x12\x39.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest\x1a:.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse"V\x82\xd3\xe4\x93\x02G\x12\x45/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages\xda\x41\x06parent\x12\xd1\x01\n\x11GetReferenceImage\x12\x37.google.cloud.vision.v1p3beta1.GetReferenceImageRequest\x1a-.google.cloud.vision.v1p3beta1.ReferenceImage"T\x82\xd3\xe4\x93\x02G\x12\x45/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xcb\x01\n\x16\x41\x64\x64ProductToProductSet\x12<.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty"[\x82\xd3\xe4\x93\x02\x46"A/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\xda\x41\x0cname,product\x12\xd8\x01\n\x1bRemoveProductFromProductSet\x12\x41.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty"^\x82\xd3\xe4\x93\x02I"D/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\xda\x41\x0cname,product\x12\xeb\x01\n\x18ListProductsInProductSet\x12>.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest\x1a?.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse"N\x82\xd3\xe4\x93\x02\x41\x12?/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products\xda\x41\x04name\x12\x82\x02\n\x11ImportProductSets\x12\x37.google.cloud.vision.v1p3beta1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation"\x94\x01\x82\xd3\xe4\x93\x02\x42"=/v1p3beta1/{parent=projects/*/locations/*}/productSets:import:\x01*\xda\x41\x13parent,input_config\xca\x41\x33\n\x19ImportProductSetsResponse\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\x88\x01\n!com.google.cloud.vision.v1p3beta1B\x19ProductSearchServiceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p3beta1B\031ProductSearchServiceProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n@google/cloud/vision_v1p3beta1/proto/product_search_service.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\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_v1p3beta1/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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.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.v1p3beta1.ImportProductSetsInputConfigB\x03\xe0\x41\x02"\x8a\x01\n\x19ImportProductSetsResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p3beta1.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.v1p3beta1.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\xeb\x1e\n\rProductSearch\x12\xe6\x01\n\x10\x43reateProductSet\x12\x36.google.cloud.vision.v1p3beta1.CreateProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet"o\x82\xd3\xe4\x93\x02\x45"6/v1p3beta1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\xda\x41!parent,product_set,product_set_id\x12\xc9\x01\n\x0fListProductSets\x12\x35.google.cloud.vision.v1p3beta1.ListProductSetsRequest\x1a\x36.google.cloud.vision.v1p3beta1.ListProductSetsResponse"G\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p3beta1/{parent=projects/*/locations/*}/productSets\xda\x41\x06parent\x12\xb6\x01\n\rGetProductSet\x12\x33.google.cloud.vision.v1p3beta1.GetProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet"E\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p3beta1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xe8\x01\n\x10UpdateProductSet\x12\x36.google.cloud.vision.v1p3beta1.UpdateProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet"q\x82\xd3\xe4\x93\x02Q2B/v1p3beta1/{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.v1p3beta1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty"E\x82\xd3\xe4\x93\x02\x38*6/v1p3beta1/{name=projects/*/locations/*/productSets/*}\xda\x41\x04name\x12\xce\x01\n\rCreateProduct\x12\x33.google.cloud.vision.v1p3beta1.CreateProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product"`\x82\xd3\xe4\x93\x02>"3/v1p3beta1/{parent=projects/*/locations/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xbd\x01\n\x0cListProducts\x12\x32.google.cloud.vision.v1p3beta1.ListProductsRequest\x1a\x33.google.cloud.vision.v1p3beta1.ListProductsResponse"D\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p3beta1/{parent=projects/*/locations/*}/products\xda\x41\x06parent\x12\xaa\x01\n\nGetProduct\x12\x30.google.cloud.vision.v1p3beta1.GetProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product"B\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p3beta1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\xd0\x01\n\rUpdateProduct\x12\x33.google.cloud.vision.v1p3beta1.UpdateProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product"b\x82\xd3\xe4\x93\x02\x46\x32;/v1p3beta1/{product.name=projects/*/locations/*/products/*}:\x07product\xda\x41\x13product,update_mask\x12\xa0\x01\n\rDeleteProduct\x12\x33.google.cloud.vision.v1p3beta1.DeleteProductRequest\x1a\x16.google.protobuf.Empty"B\x82\xd3\xe4\x93\x02\x35*3/v1p3beta1/{name=projects/*/locations/*/products/*}\xda\x41\x04name\x12\x8e\x02\n\x14\x43reateReferenceImage\x12:.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest\x1a-.google.cloud.vision.v1p3beta1.ReferenceImage"\x8a\x01\x82\xd3\xe4\x93\x02X"E/v1p3beta1/{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.v1p3beta1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty"T\x82\xd3\xe4\x93\x02G*E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xe4\x01\n\x13ListReferenceImages\x12\x39.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest\x1a:.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse"V\x82\xd3\xe4\x93\x02G\x12\x45/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages\xda\x41\x06parent\x12\xd1\x01\n\x11GetReferenceImage\x12\x37.google.cloud.vision.v1p3beta1.GetReferenceImageRequest\x1a-.google.cloud.vision.v1p3beta1.ReferenceImage"T\x82\xd3\xe4\x93\x02G\x12\x45/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\xda\x41\x04name\x12\xcb\x01\n\x16\x41\x64\x64ProductToProductSet\x12<.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty"[\x82\xd3\xe4\x93\x02\x46"A/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\xda\x41\x0cname,product\x12\xd8\x01\n\x1bRemoveProductFromProductSet\x12\x41.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty"^\x82\xd3\xe4\x93\x02I"D/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\xda\x41\x0cname,product\x12\xeb\x01\n\x18ListProductsInProductSet\x12>.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest\x1a?.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse"N\x82\xd3\xe4\x93\x02\x41\x12?/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products\xda\x41\x04name\x12\x82\x02\n\x11ImportProductSets\x12\x37.google.cloud.vision.v1p3beta1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation"\x94\x01\x82\xd3\xe4\x93\x02\x42"=/v1p3beta1/{parent=projects/*/locations/*}/productSets:import:\x01*\xda\x41\x13parent,input_config\xca\x41\x33\n\x19ImportProductSetsResponse\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\x88\x01\n!com.google.cloud.vision.v1p3beta1B\x19ProductSearchServiceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -61,6 +55,7 @@ full_name="google.cloud.vision.v1p3beta1.BatchOperationMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -68,18 +63,39 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="PROCESSING", index=1, number=1, serialized_options=None, type=None + name="PROCESSING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SUCCESSFUL", index=2, number=2, serialized_options=None, type=None + name="SUCCESSFUL", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILED", index=3, number=3, serialized_options=None, type=None + name="FAILED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=4, number=4, serialized_options=None, type=None + name="CANCELLED", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -96,6 +112,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -106,7 +123,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -114,6 +131,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -124,7 +142,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -132,6 +150,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -152,6 +171,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -162,7 +182,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -170,6 +190,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -180,7 +201,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -188,6 +209,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -198,7 +220,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -206,6 +228,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_category", @@ -216,14 +239,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\005"), + serialized_options=b"\340A\005", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_labels", @@ -242,14 +266,13 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_PRODUCT_KEYVALUE], + nested_types=[_PRODUCT_KEYVALUE,], enum_types=[], - serialized_options=_b( - "\352A[\n\035vision.googleapis.com/Product\022:projects/{project}/locations/{location}/products/{product}" - ), + serialized_options=b"\352A[\n\035vision.googleapis.com/Product\022:projects/{project}/locations/{location}/products/{product}", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -265,6 +288,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -275,7 +299,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -283,6 +307,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -293,7 +318,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -301,6 +326,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="index_time", @@ -317,8 +343,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="index_error", @@ -335,16 +362,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b( - "\352Ae\n vision.googleapis.com/ProductSet\022Aprojects/{project}/locations/{location}/productSets/{product_set}" - ), + serialized_options=b"\352Ae\n vision.googleapis.com/ProductSet\022Aprojects/{project}/locations/{location}/productSets/{product_set}", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -360,6 +386,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -370,7 +397,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -378,6 +405,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uri", @@ -388,14 +416,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_polys", @@ -412,16 +441,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b( - "\352A\204\001\n$vision.googleapis.com/ReferenceImage\022\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" - ), + 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=[], @@ -437,6 +465,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -447,16 +476,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product", @@ -473,8 +501,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_id", @@ -485,7 +514,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -493,6 +522,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -514,6 +544,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -524,16 +555,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -552,6 +582,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -562,7 +593,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -570,6 +601,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -591,6 +623,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="products", @@ -609,6 +642,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -619,7 +653,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -627,6 +661,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -648,6 +683,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -658,17 +694,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -689,6 +724,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product", @@ -705,8 +741,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -725,6 +762,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -746,6 +784,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -756,17 +795,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -787,6 +825,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -797,16 +836,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_set", @@ -823,8 +861,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_set_id", @@ -835,7 +874,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -843,6 +882,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -864,6 +904,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -874,16 +915,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -902,6 +942,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -912,7 +953,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -920,6 +961,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -941,6 +983,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product_sets", @@ -959,6 +1002,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -969,7 +1013,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -977,6 +1021,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -998,6 +1043,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1008,15 +1054,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1037,6 +1084,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product_set", @@ -1053,8 +1101,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1073,6 +1122,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1094,6 +1144,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1104,15 +1155,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1133,6 +1185,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1143,16 +1196,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reference_image", @@ -1169,8 +1221,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reference_image_id", @@ -1181,7 +1234,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1189,6 +1242,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1210,6 +1264,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1220,16 +1275,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1248,6 +1302,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -1258,7 +1313,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1266,6 +1321,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1287,6 +1343,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="reference_images", @@ -1305,6 +1362,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1323,6 +1381,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -1333,7 +1392,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1341,6 +1400,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1362,6 +1422,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1372,17 +1433,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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$vision.googleapis.com/ReferenceImage" - ), + serialized_options=b"\340A\002\372A&\n$vision.googleapis.com/ReferenceImage", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1403,6 +1463,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1413,17 +1474,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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$vision.googleapis.com/ReferenceImage" - ), + serialized_options=b"\340A\002\372A&\n$vision.googleapis.com/ReferenceImage", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1444,6 +1504,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1454,14 +1515,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product", @@ -1472,16 +1534,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1503,6 +1564,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1513,14 +1575,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product", @@ -1531,16 +1594,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1562,6 +1624,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1572,14 +1635,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1598,6 +1662,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -1608,7 +1673,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1616,6 +1681,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1637,6 +1703,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="products", @@ -1655,6 +1722,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -1665,7 +1733,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1673,6 +1741,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1694,6 +1763,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="csv_file_uri", @@ -1704,7 +1774,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1712,7 +1782,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1733,6 +1804,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -1751,7 +1823,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1766,8 +1839,9 @@ full_name="google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], serialized_start=3907, serialized_end=4028, @@ -1780,6 +1854,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1790,16 +1865,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_config", @@ -1816,8 +1890,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1839,6 +1914,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="reference_images", @@ -1857,6 +1933,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="statuses", @@ -1875,6 +1952,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1896,6 +1974,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="state", @@ -1914,6 +1993,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -1932,6 +2012,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -1950,11 +2031,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_BATCHOPERATIONMETADATA_STATE], + enum_types=[_BATCHOPERATIONMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -2080,14 +2162,15 @@ Product = _reflection.GeneratedProtocolMessageType( "Product", (_message.Message,), - dict( - KeyValue=_reflection.GeneratedProtocolMessageType( + { + "KeyValue": _reflection.GeneratedProtocolMessageType( "KeyValue", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCT_KEYVALUE, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""A product label represented as a key-value pair. + { + "DESCRIPTOR": _PRODUCT_KEYVALUE, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """A product label represented as a key-value pair. + Attributes: key: The key of the label attached to the product. Cannot be empty @@ -2097,11 +2180,12 @@ empty and cannot exceed 128 bytes. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Product.KeyValue) - ), + }, ), - DESCRIPTOR=_PRODUCT, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""A Product contains ReferenceImages. + "DESCRIPTOR": _PRODUCT, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """A Product contains ReferenceImages. + Attributes: name: The resource name of the product. Format is: @@ -2115,21 +2199,21 @@ at most 4096 characters long. product_category: 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 + 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 - product\_labels. Note that integer values can be provided as - strings, e.g. "1199". Only strings with integer values can + product_labels. Note that integer values can be provided as + 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 100 product_labels. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Product) - ), + }, ) _sym_db.RegisterMessage(Product) _sym_db.RegisterMessage(Product.KeyValue) @@ -2137,12 +2221,13 @@ ProductSet = _reflection.GeneratedProtocolMessageType( "ProductSet", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCTSET, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""A ProductSet contains Products. A ProductSet can contain a maximum of + { + "DESCRIPTOR": _PRODUCTSET, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """A ProductSet contains Products. A ProductSet can contain a maximum of 1 million reference images. If the limit is exceeded, periodic indexing will fail. + Attributes: name: The resource name of the ProductSet. Format is: ``projects/PR @@ -2162,18 +2247,19 @@ creating a ProductSet. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ProductSet) - ), + }, ) _sym_db.RegisterMessage(ProductSet) ReferenceImage = _reflection.GeneratedProtocolMessageType( "ReferenceImage", (_message.Message,), - dict( - DESCRIPTOR=_REFERENCEIMAGE, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""A ``ReferenceImage`` represents a product image and its associated + { + "DESCRIPTOR": _REFERENCEIMAGE, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """A ``ReferenceImage`` represents a product image and its associated metadata, such as bounding boxes. + Attributes: name: The resource name of the reference image. Format is: ``proje @@ -2190,20 +2276,21 @@ 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). + aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ReferenceImage) - ), + }, ) _sym_db.RegisterMessage(ReferenceImage) CreateProductRequest = _reflection.GeneratedProtocolMessageType( "CreateProductRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEPRODUCTREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``CreateProduct`` method. + { + "DESCRIPTOR": _CREATEPRODUCTREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``CreateProduct`` method. + Attributes: parent: Required. The project in which the Product should be created. @@ -2214,21 +2301,22 @@ 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 error is returned with code - ALREADY\_EXISTS. Must be at most 128 characters long. It - cannot contain the character ``/``. + ALREADY_EXISTS. Must be at most 128 characters long. It cannot + contain the character ``/``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateProductRequest) - ), + }, ) _sym_db.RegisterMessage(CreateProductRequest) ListProductsRequest = _reflection.GeneratedProtocolMessageType( "ListProductsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProducts`` method. + { + "DESCRIPTOR": _LISTPRODUCTSREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ListProducts`` method. + Attributes: parent: Required. The project OR ProductSet from which Products should @@ -2237,21 +2325,22 @@ The maximum number of items to return. Default 10, maximum 100. page_token: - The next\_page\_token returned from a previous List request, - if any. + The next_page_token returned from a previous List request, if + any. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsRequest) - ), + }, ) _sym_db.RegisterMessage(ListProductsRequest) ListProductsResponse = _reflection.GeneratedProtocolMessageType( "ListProductsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSRESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProducts`` method. + { + "DESCRIPTOR": _LISTPRODUCTSRESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ListProducts`` method. + Attributes: products: List of products. @@ -2260,73 +2349,77 @@ are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsResponse) - ), + }, ) _sym_db.RegisterMessage(ListProductsResponse) GetProductRequest = _reflection.GeneratedProtocolMessageType( "GetProductRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETPRODUCTREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``GetProduct`` method. + { + "DESCRIPTOR": _GETPRODUCTREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``GetProduct`` method. + Attributes: name: 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.v1p3beta1.GetProductRequest) - ), + }, ) _sym_db.RegisterMessage(GetProductRequest) UpdateProductRequest = _reflection.GeneratedProtocolMessageType( "UpdateProductRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEPRODUCTREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``UpdateProduct`` method. + { + "DESCRIPTOR": _UPDATEPRODUCTREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``UpdateProduct`` method. + Attributes: product: 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 + which fields to update. If update_mask isn’t specified, all mutable fields are to be updated. Valid mask paths include ``product_labels``, ``display_name``, and ``description``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.UpdateProductRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateProductRequest) DeleteProductRequest = _reflection.GeneratedProtocolMessageType( "DeleteProductRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEPRODUCTREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``DeleteProduct`` method. + { + "DESCRIPTOR": _DELETEPRODUCTREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``DeleteProduct`` method. + Attributes: name: 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.v1p3beta1.DeleteProductRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteProductRequest) CreateProductSetRequest = _reflection.GeneratedProtocolMessageType( "CreateProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``CreateProductSet`` method. + { + "DESCRIPTOR": _CREATEPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``CreateProductSet`` method. + Attributes: parent: Required. The project in which the ProductSet should be @@ -2337,21 +2430,22 @@ 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 error is returned with code - ALREADY\_EXISTS. Must be at most 128 characters long. It - cannot contain the character ``/``. + ALREADY_EXISTS. Must be at most 128 characters long. It cannot + contain the character ``/``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(CreateProductSetRequest) ListProductSetsRequest = _reflection.GeneratedProtocolMessageType( "ListProductSetsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSETSREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProductSets`` method. + { + "DESCRIPTOR": _LISTPRODUCTSETSREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ListProductSets`` method. + Attributes: parent: Required. The project from which ProductSets should be listed. @@ -2360,21 +2454,22 @@ The maximum number of items to return. Default 10, maximum 100. page_token: - The next\_page\_token returned from a previous List request, - if any. + The next_page_token returned from a previous List request, if + any. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductSetsRequest) - ), + }, ) _sym_db.RegisterMessage(ListProductSetsRequest) ListProductSetsResponse = _reflection.GeneratedProtocolMessageType( "ListProductSetsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSETSRESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProductSets`` method. + { + "DESCRIPTOR": _LISTPRODUCTSETSRESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ListProductSets`` method. + Attributes: product_sets: List of ProductSets. @@ -2383,17 +2478,18 @@ are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductSetsResponse) - ), + }, ) _sym_db.RegisterMessage(ListProductSetsResponse) GetProductSetRequest = _reflection.GeneratedProtocolMessageType( "GetProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``GetProductSet`` method. + { + "DESCRIPTOR": _GETPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``GetProductSet`` method. + Attributes: name: Required. Resource name of the ProductSet to get. Format is: @@ -2401,39 +2497,41 @@ _ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(GetProductSetRequest) UpdateProductSetRequest = _reflection.GeneratedProtocolMessageType( "UpdateProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``UpdateProductSet`` method. + { + "DESCRIPTOR": _UPDATEPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``UpdateProductSet`` method. + Attributes: product_set: 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 + which fields to update. If update_mask isn’t specified, all mutable fields are to be updated. Valid mask path is ``display_name``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.UpdateProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateProductSetRequest) DeleteProductSetRequest = _reflection.GeneratedProtocolMessageType( "DeleteProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``DeleteProductSet`` method. + { + "DESCRIPTOR": _DELETEPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``DeleteProductSet`` method. + Attributes: name: Required. Resource name of the ProductSet to delete. Format @@ -2441,17 +2539,18 @@ _SET_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteProductSetRequest) CreateReferenceImageRequest = _reflection.GeneratedProtocolMessageType( "CreateReferenceImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEREFERENCEIMAGEREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``CreateReferenceImage`` method. + { + "DESCRIPTOR": _CREATEREFERENCEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``CreateReferenceImage`` method. + Attributes: parent: Required. Resource name of the product in which to create the @@ -2464,21 +2563,22 @@ 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 already in use, an error is returned - with code ALREADY\_EXISTS. Must be at most 128 characters - long. It cannot contain the character ``/``. + with code ALREADY_EXISTS. Must be at most 128 characters long. + It cannot contain the character ``/``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) - ), + }, ) _sym_db.RegisterMessage(CreateReferenceImageRequest) ListReferenceImagesRequest = _reflection.GeneratedProtocolMessageType( "ListReferenceImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTREFERENCEIMAGESREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListReferenceImages`` method. + { + "DESCRIPTOR": _LISTREFERENCEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ListReferenceImages`` method. + Attributes: parent: Required. Resource name of the product containing the @@ -2494,17 +2594,18 @@ not specified. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) - ), + }, ) _sym_db.RegisterMessage(ListReferenceImagesRequest) ListReferenceImagesResponse = _reflection.GeneratedProtocolMessageType( "ListReferenceImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTREFERENCEIMAGESRESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListReferenceImages`` method. + { + "DESCRIPTOR": _LISTREFERENCEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ListReferenceImages`` method. + Attributes: reference_images: The list of reference images. @@ -2512,21 +2613,22 @@ The maximum number of items to return. Default 10, maximum 100. next_page_token: - The next\_page\_token returned from a previous List request, - if any. + The next_page_token returned from a previous List request, if + any. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) - ), + }, ) _sym_db.RegisterMessage(ListReferenceImagesResponse) GetReferenceImageRequest = _reflection.GeneratedProtocolMessageType( "GetReferenceImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETREFERENCEIMAGEREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``GetReferenceImage`` method. + { + "DESCRIPTOR": _GETREFERENCEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``GetReferenceImage`` method. + Attributes: name: Required. The resource name of the ReferenceImage to get. @@ -2534,17 +2636,18 @@ ODUCT_ID/referenceImages/IMAGE_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) - ), + }, ) _sym_db.RegisterMessage(GetReferenceImageRequest) DeleteReferenceImageRequest = _reflection.GeneratedProtocolMessageType( "DeleteReferenceImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEREFERENCEIMAGEREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``DeleteReferenceImage`` method. + { + "DESCRIPTOR": _DELETEREFERENCEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``DeleteReferenceImage`` method. + Attributes: name: Required. The resource name of the reference image to delete. @@ -2552,17 +2655,18 @@ ODUCT_ID/referenceImages/IMAGE_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteReferenceImageRequest) AddProductToProductSetRequest = _reflection.GeneratedProtocolMessageType( "AddProductToProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_ADDPRODUCTTOPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``AddProductToProductSet`` method. + { + "DESCRIPTOR": _ADDPRODUCTTOPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``AddProductToProductSet`` method. + Attributes: name: Required. The resource name for the ProductSet to modify. @@ -2574,17 +2678,18 @@ ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(AddProductToProductSetRequest) RemoveProductFromProductSetRequest = _reflection.GeneratedProtocolMessageType( "RemoveProductFromProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_REMOVEPRODUCTFROMPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``RemoveProductFromProductSet`` method. + { + "DESCRIPTOR": _REMOVEPRODUCTFROMPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``RemoveProductFromProductSet`` method. + Attributes: name: Required. The resource name for the ProductSet to modify. @@ -2596,17 +2701,18 @@ ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(RemoveProductFromProductSetRequest) ListProductsInProductSetRequest = _reflection.GeneratedProtocolMessageType( "ListProductsInProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProductsInProductSet`` method. + { + "DESCRIPTOR": _LISTPRODUCTSINPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ListProductsInProductSet`` method. + Attributes: name: Required. The ProductSet resource for which to retrieve @@ -2616,21 +2722,22 @@ The maximum number of items to return. Default 10, maximum 100. page_token: - The next\_page\_token returned from a previous List request, - if any. + The next_page_token returned from a previous List request, if + any. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(ListProductsInProductSetRequest) ListProductsInProductSetResponse = _reflection.GeneratedProtocolMessageType( "ListProductsInProductSetResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETRESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProductsInProductSet`` method. + { + "DESCRIPTOR": _LISTPRODUCTSINPRODUCTSETRESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ListProductsInProductSet`` method. + Attributes: products: The list of Products. @@ -2639,73 +2746,74 @@ are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) - ), + }, ) _sym_db.RegisterMessage(ListProductsInProductSetResponse) ImportProductSetsGcsSource = _reflection.GeneratedProtocolMessageType( "ImportProductSetsGcsSource", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTPRODUCTSETSGCSSOURCE, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""The Google Cloud Storage location for a csv file which preserves a + { + "DESCRIPTOR": _IMPORTPRODUCTSETSGCSSOURCE, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line. + Attributes: csv_file_uri: The Google Cloud Storage URI of the input csv file. The URI must start with ``gs://``. The format of the input csv file should be one image per line. In each line, there are 6 - columns. 1. image\_uri 2, image\_id 3. product\_set\_id 4. - product\_id 5, product\_category 6, product\_display\_name 7, - labels 8. bounding\_poly Columns 1, 3, 4, and 5 are required, + columns. 1. image_uri 2, image_id 3. product_set_id 4. + product_id 5, product_category 6, product_display_name 7, + labels 8. bounding_poly Columns 1, 3, 4, and 5 are required, other columns are optional. A new ProductSet/Product with the same id will be created on the fly if the ProductSet/Product - specified by product\_set\_id/product\_id does not exist. The - image\_id field is optional but has to be unique if provided. + specified by product_set_id/product_id does not exist. The + image_id field is optional but has to be unique if provided. If it is empty, we will automatically assign an unique id to - the image. The product\_display\_name field is optional. If - it is empty, a space (" ") is used as the place holder for the - product display\_name, which can be updated later through the - realtime API. If the Product with product\_id already exists, - the fields product\_display\_name, product\_category and - labels are ignored. If a Product doesn't exist and needs to - be created on the fly, the product\_display\_name field refers - to [Product.display\_name][google.cloud.vision.v1p3beta1.Produ - ct.display\_name], the product\_category field refers to [Prod - uct.product\_category][google.cloud.vision.v1p3beta1.Product.p - roduct\_category], and the labels field refers to - [Product.labels][]. Labels (optional) should be a line - containing a list of comma-separated key-value pairs, with the - format "key\_1=value\_1,key\_2=value\_2,...,key\_n=value\_n". - The bounding\_poly (optional) field is used to identify one - region of interest from the image in the same manner as - CreateReferenceImage. If no bounding\_poly is specified, the + the image. The product_display_name field is optional. If it + is empty, a space (" ") is used as the place holder for the + product display_name, which can be updated later through the + realtime API. If the Product with product_id already exists, + the fields product_display_name, product_category and labels + are ignored. If a Product doesn’t exist and needs to be + created on the fly, the product_display_name field refers to [ + Product.display_name][google.cloud.vision.v1p3beta1.Product.di + splay_name], the product_category field refers to [Product.pro + duct_category][google.cloud.vision.v1p3beta1.Product.product_c + ategory], and the labels field refers to [Product.labels][]. + Labels (optional) should be a line containing a list of comma- + separated key-value pairs, with the format + “key_1=value_1,key_2=value_2,…,key_n=value_n”. The + bounding_poly (optional) field is used to identify one region + of interest from the image in the same manner as + CreateReferenceImage. If no bounding_poly is specified, the system will try to detect regions of interest automatically. Note that the pipeline will resize the image if the image resolution is too large to process (above 20MP). Also note - that at most one bounding\_poly is allowed per line. If the + that at most one bounding_poly is allowed per line. If the image contains multiple regions of interest, the csv should - contain one line per region of interest. The bounding\_poly + contain one line per region of interest. The bounding_poly column should contain an even number of comma-separated - numbers, with the format - "p1\_x,p1\_y,p2\_x,p2\_y,...,pn\_x,pn\_y". Nonnegative - integers should be used for absolute bounding polygons, and - float values in [0, 1] should be used for normalized bounding - polygons. + numbers, with the format “p1_x,p1_y,p2_x,p2_y,…,pn_x,pn_y”. + Nonnegative integers should be used for absolute bounding + polygons, and float values in [0, 1] should be used for + normalized bounding polygons. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) - ), + }, ) _sym_db.RegisterMessage(ImportProductSetsGcsSource) ImportProductSetsInputConfig = _reflection.GeneratedProtocolMessageType( "ImportProductSetsInputConfig", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTPRODUCTSETSINPUTCONFIG, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""The input content for the ``ImportProductSets`` method. + { + "DESCRIPTOR": _IMPORTPRODUCTSETSINPUTCONFIG, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """The input content for the ``ImportProductSets`` method. + Attributes: source: The source of the input. @@ -2714,17 +2822,18 @@ preserves a list of ImportProductSetRequests in each line. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) - ), + }, ) _sym_db.RegisterMessage(ImportProductSetsInputConfig) ImportProductSetsRequest = _reflection.GeneratedProtocolMessageType( "ImportProductSetsRequest", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTPRODUCTSETSREQUEST, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ImportProductSets`` method. + { + "DESCRIPTOR": _IMPORTPRODUCTSETSREQUEST, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ImportProductSets`` method. + Attributes: parent: Required. The project in which the ProductSets should be @@ -2733,24 +2842,25 @@ Required. The input content for the list of requests. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) - ), + }, ) _sym_db.RegisterMessage(ImportProductSetsRequest) ImportProductSetsResponse = _reflection.GeneratedProtocolMessageType( "ImportProductSetsResponse", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTPRODUCTSETSRESPONSE, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ImportProductSets`` method. This message + { + "DESCRIPTOR": _IMPORTPRODUCTSETSRESPONSE, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ImportProductSets`` method. This message is returned by the [google.longrunning.Operations.GetOperation][google .longrunning.Operations.GetOperation] method in the returned [google.l ongrunning.Operation.response][google.longrunning.Operation.response] field. + Attributes: reference_images: - The list of reference\_images that are imported successfully. + The list of reference_images that are imported successfully. statuses: The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here @@ -2759,20 +2869,21 @@ line of the csv, starting from line 0. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsResponse) - ), + }, ) _sym_db.RegisterMessage(ImportProductSetsResponse) BatchOperationMetadata = _reflection.GeneratedProtocolMessageType( "BatchOperationMetadata", (_message.Message,), - dict( - DESCRIPTOR=_BATCHOPERATIONMETADATA, - __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Metadata for the batch operations such as the current state. This is + { + "DESCRIPTOR": _BATCHOPERATIONMETADATA, + "__module__": "google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", + "__doc__": """Metadata for the batch operations such as the current state. This is included in the ``metadata`` field of the ``Operation`` returned by the ``GetOperation`` call of the ``google::longrunning::Operations`` service. + Attributes: state: The current state of the batch operation. @@ -2784,7 +2895,7 @@ set to true. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.BatchOperationMetadata) - ), + }, ) _sym_db.RegisterMessage(BatchOperationMetadata) @@ -2828,9 +2939,8 @@ full_name="google.cloud.vision.v1p3beta1.ProductSearch", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" - ), + serialized_options=b"\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision", + create_key=_descriptor._internal_create_key, serialized_start=4637, serialized_end=8584, methods=[ @@ -2841,9 +2951,8 @@ containing_service=None, input_type=_CREATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, - serialized_options=_b( - '\202\323\344\223\002E"6/v1p3beta1/{parent=projects/*/locations/*}/productSets:\013product_set\332A!parent,product_set,product_set_id' - ), + serialized_options=b'\202\323\344\223\002E"6/v1p3beta1/{parent=projects/*/locations/*}/productSets:\013product_set\332A!parent,product_set,product_set_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProductSets", @@ -2852,9 +2961,8 @@ containing_service=None, input_type=_LISTPRODUCTSETSREQUEST, output_type=_LISTPRODUCTSETSRESPONSE, - serialized_options=_b( - "\202\323\344\223\0028\0226/v1p3beta1/{parent=projects/*/locations/*}/productSets\332A\006parent" - ), + serialized_options=b"\202\323\344\223\0028\0226/v1p3beta1/{parent=projects/*/locations/*}/productSets\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetProductSet", @@ -2863,9 +2971,8 @@ containing_service=None, input_type=_GETPRODUCTSETREQUEST, output_type=_PRODUCTSET, - serialized_options=_b( - "\202\323\344\223\0028\0226/v1p3beta1/{name=projects/*/locations/*/productSets/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0028\0226/v1p3beta1/{name=projects/*/locations/*/productSets/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateProductSet", @@ -2874,9 +2981,8 @@ containing_service=None, input_type=_UPDATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, - serialized_options=_b( - "\202\323\344\223\002Q2B/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set\332A\027product_set,update_mask" - ), + serialized_options=b"\202\323\344\223\002Q2B/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set\332A\027product_set,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteProductSet", @@ -2885,9 +2991,8 @@ containing_service=None, input_type=_DELETEPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\0028*6/v1p3beta1/{name=projects/*/locations/*/productSets/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0028*6/v1p3beta1/{name=projects/*/locations/*/productSets/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateProduct", @@ -2896,9 +3001,8 @@ containing_service=None, input_type=_CREATEPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - '\202\323\344\223\002>"3/v1p3beta1/{parent=projects/*/locations/*}/products:\007product\332A\031parent,product,product_id' - ), + serialized_options=b'\202\323\344\223\002>"3/v1p3beta1/{parent=projects/*/locations/*}/products:\007product\332A\031parent,product,product_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProducts", @@ -2907,9 +3011,8 @@ containing_service=None, input_type=_LISTPRODUCTSREQUEST, output_type=_LISTPRODUCTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\0025\0223/v1p3beta1/{parent=projects/*/locations/*}/products\332A\006parent" - ), + serialized_options=b"\202\323\344\223\0025\0223/v1p3beta1/{parent=projects/*/locations/*}/products\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetProduct", @@ -2918,9 +3021,8 @@ containing_service=None, input_type=_GETPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - "\202\323\344\223\0025\0223/v1p3beta1/{name=projects/*/locations/*/products/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0025\0223/v1p3beta1/{name=projects/*/locations/*/products/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateProduct", @@ -2929,9 +3031,8 @@ containing_service=None, input_type=_UPDATEPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - "\202\323\344\223\002F2;/v1p3beta1/{product.name=projects/*/locations/*/products/*}:\007product\332A\023product,update_mask" - ), + serialized_options=b"\202\323\344\223\002F2;/v1p3beta1/{product.name=projects/*/locations/*/products/*}:\007product\332A\023product,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteProduct", @@ -2940,9 +3041,8 @@ containing_service=None, input_type=_DELETEPRODUCTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\0025*3/v1p3beta1/{name=projects/*/locations/*/products/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0025*3/v1p3beta1/{name=projects/*/locations/*/products/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateReferenceImage", @@ -2951,9 +3051,8 @@ containing_service=None, input_type=_CREATEREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, - serialized_options=_b( - '\202\323\344\223\002X"E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image\332A)parent,reference_image,reference_image_id' - ), + serialized_options=b'\202\323\344\223\002X"E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image\332A)parent,reference_image,reference_image_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteReferenceImage", @@ -2962,9 +3061,8 @@ containing_service=None, input_type=_DELETEREFERENCEIMAGEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - "\202\323\344\223\002G*E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002G*E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListReferenceImages", @@ -2973,9 +3071,8 @@ containing_service=None, input_type=_LISTREFERENCEIMAGESREQUEST, output_type=_LISTREFERENCEIMAGESRESPONSE, - serialized_options=_b( - "\202\323\344\223\002G\022E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002G\022E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetReferenceImage", @@ -2984,9 +3081,8 @@ containing_service=None, input_type=_GETREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, - serialized_options=_b( - "\202\323\344\223\002G\022E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002G\022E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AddProductToProductSet", @@ -2995,9 +3091,8 @@ containing_service=None, input_type=_ADDPRODUCTTOPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - '\202\323\344\223\002F"A/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\001*\332A\014name,product' - ), + serialized_options=b'\202\323\344\223\002F"A/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\001*\332A\014name,product', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="RemoveProductFromProductSet", @@ -3006,9 +3101,8 @@ containing_service=None, input_type=_REMOVEPRODUCTFROMPRODUCTSETREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b( - '\202\323\344\223\002I"D/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\001*\332A\014name,product' - ), + serialized_options=b'\202\323\344\223\002I"D/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\001*\332A\014name,product', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProductsInProductSet", @@ -3017,9 +3111,8 @@ containing_service=None, input_type=_LISTPRODUCTSINPRODUCTSETREQUEST, output_type=_LISTPRODUCTSINPRODUCTSETRESPONSE, - serialized_options=_b( - "\202\323\344\223\002A\022?/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products\332A\004name" - ), + serialized_options=b"\202\323\344\223\002A\022?/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ImportProductSets", @@ -3028,9 +3121,8 @@ containing_service=None, input_type=_IMPORTPRODUCTSETSREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002B"=/v1p3beta1/{parent=projects/*/locations/*}/productSets:import:\001*\332A\023parent,input_config\312A3\n\031ImportProductSetsResponse\022\026BatchOperationMetadata' - ), + serialized_options=b'\202\323\344\223\002B"=/v1p3beta1/{parent=projects/*/locations/*}/productSets:import:\001*\332A\023parent,input_config\312A3\n\031ImportProductSetsResponse\022\026BatchOperationMetadata', + create_key=_descriptor._internal_create_key, ), ], ) 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..b774e52e 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 @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.vision_v1p3beta1.proto import ( @@ -12,27 +13,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 +128,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 +158,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 +170,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 +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!") @@ -222,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!") @@ -233,30 +234,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 +265,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 +280,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 +305,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 +322,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 +335,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 +360,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!") @@ -495,3 +496,508 @@ def add_ProductSearchServicer_to_server(servicer, server): "google.cloud.vision.v1p3beta1.ProductSearch", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ProductSearch(object): + """Manages Products and ProductSets of reference images for use in product + search. It uses the following resource model: + + - The API has a collection of [ProductSet][google.cloud.vision.v1p3beta1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. + + In parallel, + + - The API has a collection of [Product][google.cloud.vision.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/*` + """ + + @staticmethod + def CreateProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/CreateProductSet", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.CreateProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProductSets( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/ListProductSets", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ListProductSetsRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ListProductSetsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/GetProductSet", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.GetProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/UpdateProductSet", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.UpdateProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/DeleteProductSet", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.DeleteProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/CreateProduct", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.CreateProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProducts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/ListProducts", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ListProductsRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ListProductsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/GetProduct", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.GetProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/UpdateProduct", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.UpdateProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/DeleteProduct", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.DeleteProductRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/CreateReferenceImage", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.CreateReferenceImageRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ReferenceImage.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/DeleteReferenceImage", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.DeleteReferenceImageRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListReferenceImages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/ListReferenceImages", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ListReferenceImagesRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ListReferenceImagesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/GetReferenceImage", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.GetReferenceImageRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ReferenceImage.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def AddProductToProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/AddProductToProductSet", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.AddProductToProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def RemoveProductFromProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/RemoveProductFromProductSet", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.RemoveProductFromProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProductsInProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/ListProductsInProductSet", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ListProductsInProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ListProductsInProductSetResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ImportProductSets( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p3beta1.ProductSearch/ImportProductSets", + google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.ImportProductSetsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2.py b/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2.py index 5eb13ce9..dda7ecda 100644 --- a/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p3beta1/proto/text_annotation.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -25,12 +22,9 @@ name="google/cloud/vision_v1p3beta1/proto/text_annotation.proto", package="google.cloud.vision.v1p3beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p3beta1B\023TextAnnotationProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n9google/cloud/vision_v1p3beta1/proto/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p3beta1/proto/geometry.proto"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p3beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p3beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p3beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p3beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p3beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p3beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x82\x01\n!com.google.cloud.vision.v1p3beta1B\x13TextAnnotationProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p3beta1B\023TextAnnotationProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n9google/cloud/vision_v1p3beta1/proto/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p3beta1/proto/geometry.proto"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p3beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p3beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p3beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p3beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p3beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p3beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x82\x01\n!com.google.cloud.vision.v1p3beta1B\x13TextAnnotationProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, @@ -43,24 +37,55 @@ full_name="google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SPACE", index=1, number=1, serialized_options=None, type=None + name="SPACE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SURE_SPACE", index=2, number=2, serialized_options=None, type=None + name="SURE_SPACE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="EOL_SURE_SPACE", index=3, number=3, serialized_options=None, type=None + name="EOL_SURE_SPACE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="HYPHEN", index=4, number=4, serialized_options=None, type=None + name="HYPHEN", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LINE_BREAK", index=5, number=5, serialized_options=None, type=None + name="LINE_BREAK", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -75,24 +100,55 @@ full_name="google.cloud.vision.v1p3beta1.Block.BlockType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TEXT", index=1, number=1, serialized_options=None, type=None + name="TEXT", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TABLE", index=2, number=2, serialized_options=None, type=None + name="TABLE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="PICTURE", index=3, number=3, serialized_options=None, type=None + name="PICTURE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RULER", index=4, number=4, serialized_options=None, type=None + name="RULER", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="BARCODE", index=5, number=5, serialized_options=None, type=None + name="BARCODE", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -109,6 +165,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_code", @@ -119,7 +176,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -127,6 +184,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -145,6 +203,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -165,6 +224,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -183,6 +243,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_prefix", @@ -201,11 +262,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_TEXTANNOTATION_DETECTEDBREAK_BREAKTYPE], + enum_types=[_TEXTANNOTATION_DETECTEDBREAK_BREAKTYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -221,6 +283,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="detected_languages", @@ -239,6 +302,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detected_break", @@ -257,6 +321,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -277,6 +342,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="pages", @@ -295,6 +361,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -305,7 +372,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -313,6 +380,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -338,6 +406,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -356,6 +425,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="width", @@ -374,6 +444,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="height", @@ -392,6 +463,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="blocks", @@ -410,6 +482,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -428,6 +501,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -449,6 +523,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -467,6 +542,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -485,6 +561,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="paragraphs", @@ -503,6 +580,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="block_type", @@ -521,6 +599,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -539,11 +618,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_BLOCK_BLOCKTYPE], + enum_types=[_BLOCK_BLOCKTYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -560,6 +640,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -578,6 +659,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -596,6 +678,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="words", @@ -614,6 +697,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -632,6 +716,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -653,6 +738,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -671,6 +757,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -689,6 +776,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="symbols", @@ -707,6 +795,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -725,6 +814,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -746,6 +836,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -764,6 +855,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -782,6 +874,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -792,7 +885,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -800,6 +893,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -818,6 +912,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -888,32 +983,34 @@ TextAnnotation = _reflection.GeneratedProtocolMessageType( "TextAnnotation", (_message.Message,), - dict( - DetectedLanguage=_reflection.GeneratedProtocolMessageType( + { + "DetectedLanguage": _reflection.GeneratedProtocolMessageType( "DetectedLanguage", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_DETECTEDLANGUAGE, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""Detected language for a structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_DETECTEDLANGUAGE, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """Detected language for a structural component. + Attributes: language_code: - The BCP-47 language code, such as "en-US" or "sr-Latn". For + 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. + code_locale_identifier. confidence: Confidence of detected language. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) - ), + }, ), - DetectedBreak=_reflection.GeneratedProtocolMessageType( + "DetectedBreak": _reflection.GeneratedProtocolMessageType( "DetectedBreak", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_DETECTEDBREAK, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""Detected start or end of a structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_DETECTEDBREAK, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """Detected start or end of a structural component. + Attributes: type: Detected break type. @@ -921,15 +1018,16 @@ True if break prepends the element. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) - ), + }, ), - TextProperty=_reflection.GeneratedProtocolMessageType( + "TextProperty": _reflection.GeneratedProtocolMessageType( "TextProperty", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_TEXTPROPERTY, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """Additional information detected on the structural component. + Attributes: detected_languages: A list of detected languages together with confidence. @@ -937,11 +1035,11 @@ Detected start or end of a text segment. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) - ), + }, ), - DESCRIPTOR=_TEXTANNOTATION, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""TextAnnotation contains a structured representation of OCR extracted + "DESCRIPTOR": _TEXTANNOTATION, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own @@ -949,6 +1047,7 @@ Please refer to the [TextAnnotation.TextProperty][google.cloud.vision. v1p3beta1.TextAnnotation.TextProperty] message definition below for more detail. + Attributes: pages: List of pages detected by OCR. @@ -956,7 +1055,7 @@ UTF-8 text detected on the pages. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.TextAnnotation) - ), + }, ) _sym_db.RegisterMessage(TextAnnotation) _sym_db.RegisterMessage(TextAnnotation.DetectedLanguage) @@ -966,10 +1065,11 @@ Page = _reflection.GeneratedProtocolMessageType( "Page", (_message.Message,), - dict( - DESCRIPTOR=_PAGE, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""Detected page from OCR. + { + "DESCRIPTOR": _PAGE, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """Detected page from OCR. + Attributes: property: Additional information detected on the page. @@ -985,17 +1085,18 @@ Confidence of the OCR results on the page. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Page) - ), + }, ) _sym_db.RegisterMessage(Page) Block = _reflection.GeneratedProtocolMessageType( "Block", (_message.Message,), - dict( - DESCRIPTOR=_BLOCK, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""Logical element on the page. + { + "DESCRIPTOR": _BLOCK, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """Logical element on the page. + Attributes: property: Additional information detected for the block. @@ -1004,12 +1105,12 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - text is read in the 'natural' orientation. For example: - + 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 + 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 will - still be (0, 1, 2, 3). + 2----3 | | 1----0 and the vertice order + will still be (0, 1, 2, 3). paragraphs: List of paragraphs in this block (if this blocks is of type text). @@ -1019,18 +1120,19 @@ Confidence of the OCR results on the block. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Block) - ), + }, ) _sym_db.RegisterMessage(Block) Paragraph = _reflection.GeneratedProtocolMessageType( "Paragraph", (_message.Message,), - dict( - DESCRIPTOR=_PARAGRAPH, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain + { + "DESCRIPTOR": _PARAGRAPH, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """Structural unit of text representing a number of words in certain order. + Attributes: property: Additional information detected for the paragraph. @@ -1039,28 +1141,29 @@ order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). words: List of words in this paragraph. confidence: Confidence of the OCR results for the paragraph. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Paragraph) - ), + }, ) _sym_db.RegisterMessage(Paragraph) Word = _reflection.GeneratedProtocolMessageType( "Word", (_message.Message,), - dict( - DESCRIPTOR=_WORD, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""A word representation. + { + "DESCRIPTOR": _WORD, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """A word representation. + Attributes: property: Additional information detected for the word. @@ -1069,11 +1172,11 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). symbols: List of symbols in the word. The order of the symbols follows the natural reading order. @@ -1081,17 +1184,18 @@ Confidence of the OCR results for the word. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Word) - ), + }, ) _sym_db.RegisterMessage(Word) Symbol = _reflection.GeneratedProtocolMessageType( "Symbol", (_message.Message,), - dict( - DESCRIPTOR=_SYMBOL, - __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""A single symbol representation. + { + "DESCRIPTOR": _SYMBOL, + "__module__": "google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", + "__doc__": """A single symbol representation. + Attributes: property: Additional information detected for the symbol. @@ -1100,18 +1204,18 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 - will still be (0, 1, 2, 3). + 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 will + still be (0, 1, 2, 3). text: The actual UTF-8 representation of the symbol. confidence: Confidence of the OCR results for the symbol. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.Symbol) - ), + }, ) _sym_db.RegisterMessage(Symbol) diff --git a/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2_grpc.py b/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2_grpc.py +++ b/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p3beta1/proto/web_detection_pb2.py b/google/cloud/vision_v1p3beta1/proto/web_detection_pb2.py index df70f6b8..5ae78609 100644 --- a/google/cloud/vision_v1p3beta1/proto/web_detection_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/web_detection_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p3beta1/proto/web_detection.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,13 +19,10 @@ name="google/cloud/vision_v1p3beta1/proto/web_detection.proto", package="google.cloud.vision.v1p3beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p3beta1B\021WebDetectionProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001" - ), - serialized_pb=_b( - '\n7google/cloud/vision_v1p3beta1/proto/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p3beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p3beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.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.v1p3beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tB\x80\x01\n!com.google.cloud.vision.v1p3beta1B\x11WebDetectionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3' - ), - dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], + serialized_options=b"\n!com.google.cloud.vision.v1p3beta1B\021WebDetectionProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\370\001\001", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n7google/cloud/vision_v1p3beta1/proto/web_detection.proto\x12\x1dgoogle.cloud.vision.v1p3beta1\x1a\x1cgoogle/api/annotations.proto"\x8c\x07\n\x0cWebDetection\x12K\n\x0cweb_entities\x18\x01 \x03(\x0b\x32\x35.google.cloud.vision.v1p3beta1.WebDetection.WebEntity\x12R\n\x14\x66ull_matching_images\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x03 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.WebDetection.WebImage\x12W\n\x1apages_with_matching_images\x18\x04 \x03(\x0b\x32\x33.google.cloud.vision.v1p3beta1.WebDetection.WebPage\x12U\n\x17visually_similar_images\x18\x06 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.WebDetection.WebImage\x12O\n\x11\x62\x65st_guess_labels\x18\x08 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.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.v1p3beta1.WebDetection.WebImage\x12U\n\x17partial_matching_images\x18\x05 \x03(\x0b\x32\x34.google.cloud.vision.v1p3beta1.WebDetection.WebImage\x1a\x30\n\x08WebLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\rlanguage_code\x18\x02 \x01(\tB\x80\x01\n!com.google.cloud.vision.v1p3beta1B\x11WebDetectionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3', + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,], ) @@ -38,6 +32,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_id", @@ -48,7 +43,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -56,6 +51,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -74,6 +70,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -84,7 +81,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -92,6 +89,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -112,6 +110,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -122,7 +121,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -130,6 +129,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -148,6 +148,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -168,6 +169,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -178,7 +180,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -186,6 +188,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -204,6 +207,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_title", @@ -214,7 +218,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -222,6 +226,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_matching_images", @@ -240,6 +245,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_matching_images", @@ -258,6 +264,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -278,6 +285,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="label", @@ -288,7 +296,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -296,6 +304,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -306,7 +315,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -314,6 +323,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -334,6 +344,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="web_entities", @@ -352,6 +363,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_matching_images", @@ -370,6 +382,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_matching_images", @@ -388,6 +401,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pages_with_matching_images", @@ -406,6 +420,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="visually_similar_images", @@ -424,6 +439,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="best_guess_labels", @@ -442,6 +458,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -491,14 +508,15 @@ WebDetection = _reflection.GeneratedProtocolMessageType( "WebDetection", (_message.Message,), - dict( - WebEntity=_reflection.GeneratedProtocolMessageType( + { + "WebEntity": _reflection.GeneratedProtocolMessageType( "WebEntity", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBENTITY, - __module__="google.cloud.vision_v1p3beta1.proto.web_detection_pb2", - __doc__="""Entity deduced from similar images on the Internet. + { + "DESCRIPTOR": _WEBDETECTION_WEBENTITY, + "__module__": "google.cloud.vision_v1p3beta1.proto.web_detection_pb2", + "__doc__": """Entity deduced from similar images on the Internet. + Attributes: entity_id: Opaque entity ID. @@ -509,15 +527,16 @@ Canonical description of the entity, in English. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebEntity) - ), + }, ), - WebImage=_reflection.GeneratedProtocolMessageType( + "WebImage": _reflection.GeneratedProtocolMessageType( "WebImage", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBIMAGE, - __module__="google.cloud.vision_v1p3beta1.proto.web_detection_pb2", - __doc__="""Metadata for online images. + { + "DESCRIPTOR": _WEBDETECTION_WEBIMAGE, + "__module__": "google.cloud.vision_v1p3beta1.proto.web_detection_pb2", + "__doc__": """Metadata for online images. + Attributes: url: The result image URL. @@ -525,15 +544,16 @@ (Deprecated) Overall relevancy score for the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebImage) - ), + }, ), - WebPage=_reflection.GeneratedProtocolMessageType( + "WebPage": _reflection.GeneratedProtocolMessageType( "WebPage", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBPAGE, - __module__="google.cloud.vision_v1p3beta1.proto.web_detection_pb2", - __doc__="""Metadata for web pages. + { + "DESCRIPTOR": _WEBDETECTION_WEBPAGE, + "__module__": "google.cloud.vision_v1p3beta1.proto.web_detection_pb2", + "__doc__": """Metadata for web pages. + Attributes: url: The result web page URL. @@ -551,29 +571,31 @@ crops. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection.WebPage) - ), + }, ), - WebLabel=_reflection.GeneratedProtocolMessageType( + "WebLabel": _reflection.GeneratedProtocolMessageType( "WebLabel", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBLABEL, - __module__="google.cloud.vision_v1p3beta1.proto.web_detection_pb2", - __doc__="""Label to provide extra metadata for the web detection. + { + "DESCRIPTOR": _WEBDETECTION_WEBLABEL, + "__module__": "google.cloud.vision_v1p3beta1.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. + 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.v1p3beta1.WebDetection.WebLabel) - ), + }, ), - DESCRIPTOR=_WEBDETECTION, - __module__="google.cloud.vision_v1p3beta1.proto.web_detection_pb2", - __doc__="""Relevant information for the image from the Internet. + "DESCRIPTOR": _WEBDETECTION, + "__module__": "google.cloud.vision_v1p3beta1.proto.web_detection_pb2", + "__doc__": """Relevant information for the image from the Internet. + Attributes: web_entities: Deduced entities from similar images on the Internet. @@ -593,7 +615,7 @@ Best guess text labels for the request image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.WebDetection) - ), + }, ) _sym_db.RegisterMessage(WebDetection) _sym_db.RegisterMessage(WebDetection.WebEntity) diff --git a/google/cloud/vision_v1p3beta1/proto/web_detection_pb2_grpc.py b/google/cloud/vision_v1p3beta1/proto/web_detection_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p3beta1/proto/web_detection_pb2_grpc.py +++ b/google/cloud/vision_v1p3beta1/proto/web_detection_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p4beta1/__init__.py b/google/cloud/vision_v1p4beta1/__init__.py index cedf170e..7050e0b0 100644 --- a/google/cloud/vision_v1p4beta1/__init__.py +++ b/google/cloud/vision_v1p4beta1/__init__.py @@ -30,8 +30,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) @@ -48,4 +48,9 @@ class ImageAnnotatorClient(VisionHelpers, iac.ImageAnnotatorClient): enums = enums -__all__ = ("enums", "types", "ProductSearchClient", "ImageAnnotatorClient") +__all__ = ( + "enums", + "types", + "ProductSearchClient", + "ImageAnnotatorClient", +) diff --git a/google/cloud/vision_v1p4beta1/gapic/enums.py b/google/cloud/vision_v1p4beta1/gapic/enums.py index 80aa4fce..911d2e7c 100644 --- a/google/cloud/vision_v1p4beta1/gapic/enums.py +++ b/google/cloud/vision_v1p4beta1/gapic/enums.py @@ -181,9 +181,9 @@ class Type(enum.IntEnum): LANDMARK_DETECTION (int): Run landmark detection. LOGO_DETECTION (int): Run logo detection. LABEL_DETECTION (int): Run label detection. - TEXT_DETECTION (int): Run text detection / optical character recognition (OCR). Text detection - is optimized for areas of text within a larger image; if the image is a - document, use ``DOCUMENT_TEXT_DETECTION`` instead. + TEXT_DETECTION (int): Run text detection / optical character recognition (OCR). Text + detection is optimized for areas of text within a larger image; if the + image is a document, use ``DOCUMENT_TEXT_DETECTION`` instead. DOCUMENT_TEXT_DETECTION (int): Run dense text document OCR. Takes precedence when both ``DOCUMENT_TEXT_DETECTION`` and ``TEXT_DETECTION`` are present. SAFE_SEARCH_DETECTION (int): Run Safe Search to detect potentially unsafe diff --git a/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py b/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py index 9ebb7733..2ee10005 100644 --- a/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py @@ -43,7 +43,7 @@ from google.protobuf import field_mask_pb2 -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision").version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision",).version class ImageAnnotatorClient(object): @@ -167,12 +167,12 @@ def __init__( self.transport = transport else: self.transport = image_annotator_grpc_transport.ImageAnnotatorGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -183,7 +183,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -193,15 +193,26 @@ def __init__( self._inner_api_calls = {} # Service calls - def batch_annotate_images( + def async_batch_annotate_images( self, requests, + output_config, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Run image detection and annotation for a batch of images. + Run asynchronous image detection and annotation for a list of + images. + + Progress and results can be retrieved through the + ``google.longrunning.Operations`` interface. ``Operation.metadata`` + contains ``OperationMetadata`` (metadata). ``Operation.response`` + contains ``AsyncBatchAnnotateImagesResponse`` (results). + + This service will write image annotation outputs to json files in + customer GCS bucket, each json file containing + BatchAnnotateImagesResponse proto. Example: >>> from google.cloud import vision_v1p4beta1 @@ -211,13 +222,29 @@ def batch_annotate_images( >>> # TODO: Initialize `requests`: >>> requests = [] >>> - >>> response = client.batch_annotate_images(requests) + >>> # TODO: Initialize `output_config`: + >>> output_config = {} + >>> + >>> response = client.async_batch_annotate_images(requests, output_config) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() Args: 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` + output_config (Union[dict, ~google.cloud.vision_v1p4beta1.types.OutputConfig]): Required. The desired output location and metadata (e.g. format). + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.vision_v1p4beta1.types.OutputConfig` 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. @@ -228,7 +255,7 @@ def batch_annotate_images( that is provided to the method. Returns: - A :class:`~google.cloud.vision_v1p4beta1.types.BatchAnnotateImagesResponse` instance. + A :class:`~google.cloud.vision_v1p4beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -238,22 +265,32 @@ def batch_annotate_images( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "batch_annotate_images" not in self._inner_api_calls: + if "async_batch_annotate_images" not in self._inner_api_calls: self._inner_api_calls[ - "batch_annotate_images" + "async_batch_annotate_images" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_annotate_images, - default_retry=self._method_configs["BatchAnnotateImages"].retry, - default_timeout=self._method_configs["BatchAnnotateImages"].timeout, + self.transport.async_batch_annotate_images, + default_retry=self._method_configs["AsyncBatchAnnotateImages"].retry, + default_timeout=self._method_configs[ + "AsyncBatchAnnotateImages" + ].timeout, client_info=self._client_info, ) - request = image_annotator_pb2.BatchAnnotateImagesRequest(requests=requests) - return self._inner_api_calls["batch_annotate_images"]( + request = image_annotator_pb2.AsyncBatchAnnotateImagesRequest( + requests=requests, output_config=output_config, + ) + operation = self._inner_api_calls["async_batch_annotate_images"]( request, retry=retry, timeout=timeout, metadata=metadata ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + image_annotator_pb2.AsyncBatchAnnotateImagesResponse, + metadata_type=image_annotator_pb2.OperationMetadata, + ) - def batch_annotate_files( + def async_batch_annotate_files( self, requests, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -261,13 +298,12 @@ def batch_annotate_files( metadata=None, ): """ - Service that performs image detection and annotation for a batch of files. - Now only "application/pdf", "image/tiff" and "image/gif" are supported. - - This service will extract at most 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. + 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). Example: >>> from google.cloud import vision_v1p4beta1 @@ -277,14 +313,22 @@ def batch_annotate_files( >>> # TODO: Initialize `requests`: >>> requests = [] >>> - >>> response = client.batch_annotate_files(requests) + >>> response = client.async_batch_annotate_files(requests) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() Args: - 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. + 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.AnnotateFileRequest` + message :class:`~google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileRequest` 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. @@ -295,7 +339,7 @@ def batch_annotate_files( that is provided to the method. Returns: - A :class:`~google.cloud.vision_v1p4beta1.types.BatchAnnotateFilesResponse` instance. + A :class:`~google.cloud.vision_v1p4beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -305,40 +349,36 @@ def batch_annotate_files( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "batch_annotate_files" not in self._inner_api_calls: + if "async_batch_annotate_files" not in self._inner_api_calls: self._inner_api_calls[ - "batch_annotate_files" + "async_batch_annotate_files" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.batch_annotate_files, - default_retry=self._method_configs["BatchAnnotateFiles"].retry, - default_timeout=self._method_configs["BatchAnnotateFiles"].timeout, + self.transport.async_batch_annotate_files, + default_retry=self._method_configs["AsyncBatchAnnotateFiles"].retry, + default_timeout=self._method_configs["AsyncBatchAnnotateFiles"].timeout, client_info=self._client_info, ) - request = image_annotator_pb2.BatchAnnotateFilesRequest(requests=requests) - return self._inner_api_calls["batch_annotate_files"]( + request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest(requests=requests,) + operation = self._inner_api_calls["async_batch_annotate_files"]( request, retry=retry, timeout=timeout, metadata=metadata ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + image_annotator_pb2.AsyncBatchAnnotateFilesResponse, + metadata_type=image_annotator_pb2.OperationMetadata, + ) - def async_batch_annotate_images( + def batch_annotate_images( self, requests, - output_config, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Run asynchronous image detection and annotation for a list of images. - - Progress and results can be retrieved through the - ``google.longrunning.Operations`` interface. ``Operation.metadata`` - contains ``OperationMetadata`` (metadata). ``Operation.response`` - contains ``AsyncBatchAnnotateImagesResponse`` (results). - - This service will write image annotation outputs to json files in - customer GCS bucket, each json file containing - BatchAnnotateImagesResponse proto. + Run image detection and annotation for a batch of images. Example: >>> from google.cloud import vision_v1p4beta1 @@ -348,29 +388,13 @@ def async_batch_annotate_images( >>> # TODO: Initialize `requests`: >>> requests = [] >>> - >>> # TODO: Initialize `output_config`: - >>> output_config = {} - >>> - >>> response = client.async_batch_annotate_images(requests, output_config) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() + >>> response = client.batch_annotate_images(requests) Args: 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` - output_config (Union[dict, ~google.cloud.vision_v1p4beta1.types.OutputConfig]): Required. The desired output location and metadata (e.g. format). - - If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.vision_v1p4beta1.types.OutputConfig` 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. @@ -381,7 +405,7 @@ def async_batch_annotate_images( that is provided to the method. Returns: - A :class:`~google.cloud.vision_v1p4beta1.types._OperationFuture` instance. + A :class:`~google.cloud.vision_v1p4beta1.types.BatchAnnotateImagesResponse` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -391,32 +415,22 @@ def async_batch_annotate_images( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "async_batch_annotate_images" not in self._inner_api_calls: + if "batch_annotate_images" not in self._inner_api_calls: self._inner_api_calls[ - "async_batch_annotate_images" + "batch_annotate_images" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.async_batch_annotate_images, - default_retry=self._method_configs["AsyncBatchAnnotateImages"].retry, - default_timeout=self._method_configs[ - "AsyncBatchAnnotateImages" - ].timeout, + self.transport.batch_annotate_images, + default_retry=self._method_configs["BatchAnnotateImages"].retry, + default_timeout=self._method_configs["BatchAnnotateImages"].timeout, client_info=self._client_info, ) - request = image_annotator_pb2.AsyncBatchAnnotateImagesRequest( - requests=requests, output_config=output_config - ) - operation = self._inner_api_calls["async_batch_annotate_images"]( + request = image_annotator_pb2.BatchAnnotateImagesRequest(requests=requests,) + return self._inner_api_calls["batch_annotate_images"]( request, retry=retry, timeout=timeout, metadata=metadata ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - image_annotator_pb2.AsyncBatchAnnotateImagesResponse, - metadata_type=image_annotator_pb2.OperationMetadata, - ) - def async_batch_annotate_files( + def batch_annotate_files( self, requests, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -424,12 +438,13 @@ def async_batch_annotate_files( metadata=None, ): """ - 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). + Service that performs image detection and annotation for a batch of files. + Now only "application/pdf", "image/tiff" and "image/gif" are supported. + + This service will extract at most 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. Example: >>> from google.cloud import vision_v1p4beta1 @@ -439,22 +454,14 @@ def async_batch_annotate_files( >>> # TODO: Initialize `requests`: >>> requests = [] >>> - >>> response = client.async_batch_annotate_files(requests) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() + >>> response = client.batch_annotate_files(requests) Args: - requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AsyncAnnotateFileRequest]]): Required. Individual async file annotation requests for this batch. + 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.AsyncAnnotateFileRequest` + message :class:`~google.cloud.vision_v1p4beta1.types.AnnotateFileRequest` 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. @@ -465,7 +472,7 @@ def async_batch_annotate_files( that is provided to the method. Returns: - A :class:`~google.cloud.vision_v1p4beta1.types._OperationFuture` instance. + A :class:`~google.cloud.vision_v1p4beta1.types.BatchAnnotateFilesResponse` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -475,23 +482,17 @@ def async_batch_annotate_files( ValueError: If the parameters are invalid. """ # Wrap the transport method to add retry and timeout logic. - if "async_batch_annotate_files" not in self._inner_api_calls: + if "batch_annotate_files" not in self._inner_api_calls: self._inner_api_calls[ - "async_batch_annotate_files" + "batch_annotate_files" ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.async_batch_annotate_files, - default_retry=self._method_configs["AsyncBatchAnnotateFiles"].retry, - default_timeout=self._method_configs["AsyncBatchAnnotateFiles"].timeout, + self.transport.batch_annotate_files, + default_retry=self._method_configs["BatchAnnotateFiles"].retry, + default_timeout=self._method_configs["BatchAnnotateFiles"].timeout, client_info=self._client_info, ) - request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest(requests=requests) - operation = self._inner_api_calls["async_batch_annotate_files"]( + request = image_annotator_pb2.BatchAnnotateFilesRequest(requests=requests,) + return self._inner_api_calls["batch_annotate_files"]( request, retry=retry, timeout=timeout, metadata=metadata ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - image_annotator_pb2.AsyncBatchAnnotateFilesResponse, - metadata_type=image_annotator_pb2.OperationMetadata, - ) diff --git a/google/cloud/vision_v1p4beta1/gapic/image_annotator_client_config.py b/google/cloud/vision_v1p4beta1/gapic/image_annotator_client_config.py index 18493e80..279577e8 100644 --- a/google/cloud/vision_v1p4beta1/gapic/image_annotator_client_config.py +++ b/google/cloud/vision_v1p4beta1/gapic/image_annotator_client_config.py @@ -1,41 +1,47 @@ config = { "interfaces": { "google.cloud.vision.v1p4beta1.ImageAnnotator": { - "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], - }, + "retry_codes": {"retry_policy_1_codes": [], "no_retry_codes": []}, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } - }, - "methods": { - "BatchAnnotateImages": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", }, - "BatchAnnotateFiles": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, }, + }, + "methods": { "AsyncBatchAnnotateImages": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "AsyncBatchAnnotateFiles": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + "BatchAnnotateImages": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + }, + "BatchAnnotateFiles": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/google/cloud/vision_v1p4beta1/gapic/product_search_client.py b/google/cloud/vision_v1p4beta1/gapic/product_search_client.py index 96663d8a..61b97ba3 100644 --- a/google/cloud/vision_v1p4beta1/gapic/product_search_client.py +++ b/google/cloud/vision_v1p4beta1/gapic/product_search_client.py @@ -44,13 +44,13 @@ from google.protobuf import field_mask_pb2 -_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision").version +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution("google-cloud-vision",).version class ProductSearchClient(object): """ - Manages Products and ProductSets of reference images for use in product - search. It uses the following resource model: + Manages Products and ProductSets of reference images for use in + product search. It uses the following resource model: - The API has a collection of ``ProductSet`` resources, named ``projects/*/locations/*/productSets/*``, which acts as a way to put @@ -219,12 +219,12 @@ def __init__( self.transport = transport else: self.transport = product_search_grpc_transport.ProductSearchGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -235,7 +235,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -245,11 +245,117 @@ def __init__( self._inner_api_calls = {} # Service calls + def import_product_sets( + self, + parent, + input_config, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Asynchronous API that imports a list of reference images to + specified product sets based on a list of image information. + + The ``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``. + + Example: + >>> from google.cloud import vision_v1p4beta1 + >>> + >>> client = vision_v1p4beta1.ProductSearchClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> # TODO: Initialize `input_config`: + >>> input_config = {} + >>> + >>> response = client.import_product_sets(parent, input_config) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() + + Args: + 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]): 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` + 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._OperationFuture` 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 "import_product_sets" not in self._inner_api_calls: + self._inner_api_calls[ + "import_product_sets" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.import_product_sets, + default_retry=self._method_configs["ImportProductSets"].retry, + default_timeout=self._method_configs["ImportProductSets"].timeout, + client_info=self._client_info, + ) + + request = product_search_service_pb2.ImportProductSetsRequest( + parent=parent, input_config=input_config, + ) + 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) + + operation = self._inner_api_calls["import_product_sets"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + product_search_service_pb2.ImportProductSetsResponse, + metadata_type=product_search_service_pb2.BatchOperationMetadata, + ) + def create_product_set( self, parent, product_set, - product_set_id, + product_set_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -259,7 +365,7 @@ def create_product_set( Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing, or is longer + - Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. Example: @@ -272,10 +378,7 @@ def create_product_set( >>> # TODO: Initialize `product_set`: >>> product_set = {} >>> - >>> # TODO: Initialize `product_set_id`: - >>> product_set_id = '' - >>> - >>> response = client.create_product_set(parent, product_set, product_set_id) + >>> response = client.create_product_set(parent, product_set) Args: parent (str): Required. The project in which the ProductSet should be created. @@ -285,9 +388,9 @@ def create_product_set( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.ProductSet` - product_set_id (str): 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 error is returned with code ALREADY\_EXISTS. Must be at most 128 + product_set_id (str): 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 error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character ``/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -320,7 +423,7 @@ def create_product_set( ) request = product_search_service_pb2.CreateProductSetRequest( - parent=parent, product_set=product_set, product_set_id=product_set_id + parent=parent, product_set=product_set, product_set_id=product_set_id, ) if metadata is None: metadata = [] @@ -352,7 +455,7 @@ def list_product_sets( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100, or less + - Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. Example: @@ -419,7 +522,7 @@ def list_product_sets( ) request = product_search_service_pb2.ListProductSetsRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -461,7 +564,7 @@ def get_product_set( Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. + - Returns NOT_FOUND if the ProductSet does not exist. Example: >>> from google.cloud import vision_v1p4beta1 @@ -507,7 +610,7 @@ def get_product_set( client_info=self._client_info, ) - request = product_search_service_pb2.GetProductSetRequest(name=name) + request = product_search_service_pb2.GetProductSetRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -528,19 +631,19 @@ def get_product_set( def update_product_set( self, product_set, - update_mask, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, ): """ - Makes changes to a ProductSet resource. Only display\_name can be + Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. - - Returns INVALID\_ARGUMENT if display\_name is present in update\_mask + - 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. Example: @@ -551,19 +654,16 @@ def update_product_set( >>> # TODO: Initialize `product_set`: >>> product_set = {} >>> - >>> # TODO: Initialize `update_mask`: - >>> update_mask = {} - >>> - >>> response = client.update_product_set(product_set, update_mask) + >>> response = client.update_product_set(product_set) Args: 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` - update_mask (Union[dict, ~google.cloud.vision_v1p4beta1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If update\_mask - isn't specified, all mutable fields are to be updated. Valid mask path - is ``display_name``. + update_mask (Union[dict, ~google.cloud.vision_v1p4beta1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If + update_mask isn't specified, all mutable fields are to be updated. Valid + mask path is ``display_name``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.FieldMask` @@ -598,7 +698,7 @@ def update_product_set( ) request = product_search_service_pb2.UpdateProductSetRequest( - product_set=product_set, update_mask=update_mask + product_set=product_set, update_mask=update_mask, ) if metadata is None: metadata = [] @@ -671,7 +771,7 @@ def delete_product_set( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteProductSetRequest(name=name) + request = product_search_service_pb2.DeleteProductSetRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -693,7 +793,7 @@ def create_product( self, parent, product, - product_id, + product_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -703,11 +803,11 @@ def create_product( Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing or longer than + - Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - - Returns INVALID\_ARGUMENT if description is longer than 4096 + - Returns INVALID_ARGUMENT if description is longer than 4096 characters. - - Returns INVALID\_ARGUMENT if product\_category is missing or invalid. + - Returns INVALID_ARGUMENT if product_category is missing or invalid. Example: >>> from google.cloud import vision_v1p4beta1 @@ -719,10 +819,7 @@ def create_product( >>> # TODO: Initialize `product`: >>> product = {} >>> - >>> # TODO: Initialize `product_id`: - >>> product_id = '' - >>> - >>> response = client.create_product(parent, product, product_id) + >>> response = client.create_product(parent, product) Args: parent (str): Required. The project in which the Product should be created. @@ -732,9 +829,9 @@ def create_product( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.Product` - product_id (str): 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 error is returned with code ALREADY\_EXISTS. Must be at most 128 + product_id (str): 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 error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character ``/``. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will @@ -767,7 +864,7 @@ def create_product( ) request = product_search_service_pb2.CreateProductRequest( - parent=parent, product=product, product_id=product_id + parent=parent, product=product, product_id=product_id, ) if metadata is None: metadata = [] @@ -799,7 +896,7 @@ def list_products( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Example: @@ -867,7 +964,7 @@ def list_products( ) request = product_search_service_pb2.ListProductsRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -909,7 +1006,7 @@ def get_product( Possible errors: - - Returns NOT\_FOUND if the Product does not exist. + - Returns NOT_FOUND if the Product does not exist. Example: >>> from google.cloud import vision_v1p4beta1 @@ -954,7 +1051,7 @@ def get_product( client_info=self._client_info, ) - request = product_search_service_pb2.GetProductRequest(name=name) + request = product_search_service_pb2.GetProductRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -975,7 +1072,7 @@ def get_product( def update_product( self, product, - update_mask, + update_mask=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -989,13 +1086,13 @@ def update_product( Possible errors: - - Returns NOT\_FOUND if the Product does not exist. - - Returns INVALID\_ARGUMENT if display\_name 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. + - 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. Example: >>> from google.cloud import vision_v1p4beta1 @@ -1005,10 +1102,7 @@ def update_product( >>> # TODO: Initialize `product`: >>> product = {} >>> - >>> # TODO: Initialize `update_mask`: - >>> update_mask = {} - >>> - >>> response = client.update_product(product, update_mask) + >>> response = client.update_product(product) Args: product (Union[dict, ~google.cloud.vision_v1p4beta1.types.Product]): Required. The Product resource which replaces the one on the server. @@ -1016,9 +1110,10 @@ def update_product( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.Product` - update_mask (Union[dict, ~google.cloud.vision_v1p4beta1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If update\_mask - isn't specified, all mutable fields are to be updated. Valid mask paths - include ``product_labels``, ``display_name``, and ``description``. + update_mask (Union[dict, ~google.cloud.vision_v1p4beta1.types.FieldMask]): The ``FieldMask`` that specifies which fields to update. If + update_mask isn't specified, all mutable fields are to be updated. Valid + mask paths include ``product_labels``, ``display_name``, and + ``description``. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.FieldMask` @@ -1053,7 +1148,7 @@ def update_product( ) request = product_search_service_pb2.UpdateProductRequest( - product=product, update_mask=update_mask + product=product, update_mask=update_mask, ) if metadata is None: metadata = [] @@ -1126,7 +1221,7 @@ def delete_product( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteProductRequest(name=name) + request = product_search_service_pb2.DeleteProductRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1148,7 +1243,7 @@ def create_reference_image( self, parent, reference_image, - reference_image_id, + reference_image_id=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -1158,7 +1253,7 @@ def create_reference_image( 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 + 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. @@ -1167,13 +1262,13 @@ def create_reference_image( Possible errors: - - Returns INVALID\_ARGUMENT if the image\_uri is missing or longer than + - 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 + - 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 + - Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. Example: @@ -1186,14 +1281,11 @@ def create_reference_image( >>> # TODO: Initialize `reference_image`: >>> reference_image = {} >>> - >>> # TODO: Initialize `reference_image_id`: - >>> reference_image_id = '' - >>> - >>> response = client.create_reference_image(parent, reference_image, reference_image_id) + >>> response = client.create_reference_image(parent, reference_image) Args: - parent (str): Required. 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]): Required. The reference image to create. @@ -1201,10 +1293,10 @@ def create_reference_image( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.ReferenceImage` - reference_image_id (str): 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 - already in use, an error is returned with code ALREADY\_EXISTS. Must be - at most 128 characters long. It cannot contain the character ``/``. + reference_image_id (str): 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 already in use, an error is returned with code ALREADY_EXISTS. Must + be at most 128 characters long. It cannot contain the character ``/``. 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. @@ -1315,7 +1407,7 @@ def delete_reference_image( client_info=self._client_info, ) - request = product_search_service_pb2.DeleteReferenceImageRequest(name=name) + request = product_search_service_pb2.DeleteReferenceImageRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1346,8 +1438,8 @@ def list_reference_images( Possible errors: - - Returns NOT\_FOUND if the parent product does not exist. - - Returns INVALID\_ARGUMENT if the page\_size is greater than 100, or + - 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. Example: @@ -1372,7 +1464,8 @@ def list_reference_images( ... pass Args: - parent (str): Required. 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 @@ -1414,7 +1507,7 @@ def list_reference_images( ) request = product_search_service_pb2.ListReferenceImagesRequest( - parent=parent, page_size=page_size + parent=parent, page_size=page_size, ) if metadata is None: metadata = [] @@ -1456,7 +1549,7 @@ def get_reference_image( Possible errors: - - Returns NOT\_FOUND if the specified image does not exist. + - Returns NOT_FOUND if the specified image does not exist. Example: >>> from google.cloud import vision_v1p4beta1 @@ -1503,7 +1596,7 @@ def get_reference_image( client_info=self._client_info, ) - request = product_search_service_pb2.GetReferenceImageRequest(name=name) + request = product_search_service_pb2.GetReferenceImageRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1530,14 +1623,14 @@ def add_product_to_product_set( metadata=None, ): """ - Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + Adds a Product to the specified ProductSet. If the Product is + already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: - - Returns NOT\_FOUND if the Product or the ProductSet doesn't exist. + - Returns NOT_FOUND if the Product or the ProductSet doesn't exist. Example: >>> from google.cloud import vision_v1p4beta1 @@ -1545,9 +1638,7 @@ def add_product_to_product_set( >>> client = vision_v1p4beta1.ProductSearchClient() >>> >>> name = client.product_set_path('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]') - >>> - >>> # TODO: Initialize `product`: - >>> product = '' + >>> product = client.product_path('[PROJECT]', '[LOCATION]', '[PRODUCT]') >>> >>> client.add_product_to_product_set(name, product) @@ -1588,7 +1679,7 @@ def add_product_to_product_set( ) request = product_search_service_pb2.AddProductToProductSetRequest( - name=name, product=product + name=name, product=product, ) if metadata is None: metadata = [] @@ -1624,9 +1715,7 @@ def remove_product_from_product_set( >>> client = vision_v1p4beta1.ProductSearchClient() >>> >>> name = client.product_set_path('[PROJECT]', '[LOCATION]', '[PRODUCT_SET]') - >>> - >>> # TODO: Initialize `product`: - >>> product = '' + >>> product = client.product_path('[PROJECT]', '[LOCATION]', '[PRODUCT]') >>> >>> client.remove_product_from_product_set(name, product) @@ -1669,7 +1758,7 @@ def remove_product_from_product_set( ) request = product_search_service_pb2.RemoveProductFromProductSetRequest( - name=name, product=product + name=name, product=product, ) if metadata is None: metadata = [] @@ -1703,7 +1792,7 @@ def list_products_in_product_set( Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Example: @@ -1773,7 +1862,7 @@ def list_products_in_product_set( ) request = product_search_service_pb2.ListProductsInProductSetRequest( - name=name, page_size=page_size + name=name, page_size=page_size, ) if metadata is None: metadata = [] @@ -1803,125 +1892,19 @@ def list_products_in_product_set( ) return iterator - def import_product_sets( - self, - parent, - input_config, - retry=google.api_core.gapic_v1.method.DEFAULT, - timeout=google.api_core.gapic_v1.method.DEFAULT, - metadata=None, - ): - """ - Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. - - The ``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``. - - Example: - >>> from google.cloud import vision_v1p4beta1 - >>> - >>> client = vision_v1p4beta1.ProductSearchClient() - >>> - >>> parent = client.location_path('[PROJECT]', '[LOCATION]') - >>> - >>> # TODO: Initialize `input_config`: - >>> input_config = {} - >>> - >>> response = client.import_product_sets(parent, input_config) - >>> - >>> def callback(operation_future): - ... # Handle result. - ... result = operation_future.result() - >>> - >>> response.add_done_callback(callback) - >>> - >>> # Handle metadata. - >>> metadata = response.metadata() - - Args: - 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]): 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` - 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._OperationFuture` 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 "import_product_sets" not in self._inner_api_calls: - self._inner_api_calls[ - "import_product_sets" - ] = google.api_core.gapic_v1.method.wrap_method( - self.transport.import_product_sets, - default_retry=self._method_configs["ImportProductSets"].retry, - default_timeout=self._method_configs["ImportProductSets"].timeout, - client_info=self._client_info, - ) - - request = product_search_service_pb2.ImportProductSetsRequest( - parent=parent, input_config=input_config - ) - 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) - - operation = self._inner_api_calls["import_product_sets"]( - request, retry=retry, timeout=timeout, metadata=metadata - ) - return google.api_core.operation.from_gapic( - operation, - self.transport._operations_client, - product_search_service_pb2.ImportProductSetsResponse, - metadata_type=product_search_service_pb2.BatchOperationMetadata, - ) - def purge_products( self, + parent, 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. + 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. @@ -1950,19 +1933,30 @@ def purge_products( >>> >>> client = vision_v1p4beta1.ProductSearchClient() >>> - >>> response = client.purge_products() + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> response = client.purge_products(parent) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() Args: + parent (str): Required. The project and location in which the Products should be + deleted. + + Format is ``projects/PROJECT_ID/locations/LOC_ID``. 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 + 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 @@ -1975,7 +1969,7 @@ def purge_products( that is provided to the method. Returns: - A :class:`~google.cloud.vision_v1p4beta1.types.Operation` instance. + A :class:`~google.cloud.vision_v1p4beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -2003,9 +1997,9 @@ def purge_products( ) request = product_search_service_pb2.PurgeProductsRequest( + parent=parent, product_set_purge_config=product_set_purge_config, delete_orphan_products=delete_orphan_products, - parent=parent, force=force, ) if metadata is None: @@ -2021,6 +2015,12 @@ def purge_products( ) metadata.append(routing_metadata) - return self._inner_api_calls["purge_products"]( + operation = self._inner_api_calls["purge_products"]( request, retry=retry, timeout=timeout, metadata=metadata ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + empty_pb2.Empty, + metadata_type=product_search_service_pb2.BatchOperationMetadata, + ) diff --git a/google/cloud/vision_v1p4beta1/gapic/product_search_client_config.py b/google/cloud/vision_v1p4beta1/gapic/product_search_client_config.py index 8b8f4f67..a94442e6 100644 --- a/google/cloud/vision_v1p4beta1/gapic/product_search_client_config.py +++ b/google/cloud/vision_v1p4beta1/gapic/product_search_client_config.py @@ -2,115 +2,134 @@ "interfaces": { "google.cloud.vision.v1p4beta1.ProductSearch": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "no_retry_codes": [], + "retry_policy_3_codes": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "retry_policy_2_codes": [], }, "retry_params": { - "default": { + "retry_policy_3_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000, + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, }, "methods": { + "ImportProductSets": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", + }, "CreateProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "ListProductSets": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "UpdateProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "DeleteProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateProduct": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "ListProducts": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetProduct": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "UpdateProduct": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "DeleteProduct": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "CreateReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "DeleteReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "ListReferenceImages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "GetReferenceImage": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "AddProductToProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "RemoveProductFromProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params", }, "ListProductsInProductSet": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", - }, - "ImportProductSets": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params", }, "PurgeProducts": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params", }, }, } diff --git a/google/cloud/vision_v1p4beta1/gapic/transports/image_annotator_grpc_transport.py b/google/cloud/vision_v1p4beta1/gapic/transports/image_annotator_grpc_transport.py index 35eea305..b60bdde9 100644 --- a/google/cloud/vision_v1p4beta1/gapic/transports/image_annotator_grpc_transport.py +++ b/google/cloud/vision_v1p4beta1/gapic/transports/image_annotator_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -76,7 +76,9 @@ def __init__( # gRPC uses objects called "stubs" that are bound to the # channel and provide a basic method for each RPC. self._stubs = { - "image_annotator_stub": image_annotator_pb2_grpc.ImageAnnotatorStub(channel) + "image_annotator_stub": image_annotator_pb2_grpc.ImageAnnotatorStub( + channel + ), } # Because this API includes a method that returns a @@ -119,73 +121,74 @@ def channel(self): return self._channel @property - def batch_annotate_images(self): - """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_images`. + def async_batch_annotate_images(self): + """Return the gRPC stub for :meth:`ImageAnnotatorClient.async_batch_annotate_images`. - Run image detection and annotation for a batch of images. + Run asynchronous image detection and annotation for a list of + images. + + Progress and results can be retrieved through the + ``google.longrunning.Operations`` interface. ``Operation.metadata`` + contains ``OperationMetadata`` (metadata). ``Operation.response`` + contains ``AsyncBatchAnnotateImagesResponse`` (results). + + This service will write image annotation outputs to json files in + customer GCS bucket, each json file containing + BatchAnnotateImagesResponse proto. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["image_annotator_stub"].BatchAnnotateImages + return self._stubs["image_annotator_stub"].AsyncBatchAnnotateImages @property - def batch_annotate_files(self): - """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_files`. - - Service that performs image detection and annotation for a batch of files. - Now only "application/pdf", "image/tiff" and "image/gif" are supported. + def async_batch_annotate_files(self): + """Return the gRPC stub for :meth:`ImageAnnotatorClient.async_batch_annotate_files`. - 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. + 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). Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["image_annotator_stub"].BatchAnnotateFiles + return self._stubs["image_annotator_stub"].AsyncBatchAnnotateFiles @property - def async_batch_annotate_images(self): - """Return the gRPC stub for :meth:`ImageAnnotatorClient.async_batch_annotate_images`. - - 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). + def batch_annotate_images(self): + """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_images`. - This service will write image annotation outputs to json files in - customer GCS bucket, each json file containing - BatchAnnotateImagesResponse proto. + Run image detection and annotation for a batch of images. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["image_annotator_stub"].AsyncBatchAnnotateImages + return self._stubs["image_annotator_stub"].BatchAnnotateImages @property - def async_batch_annotate_files(self): - """Return the gRPC stub for :meth:`ImageAnnotatorClient.async_batch_annotate_files`. + def batch_annotate_files(self): + """Return the gRPC stub for :meth:`ImageAnnotatorClient.batch_annotate_files`. - 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). + Service that performs image detection and annotation for a batch of files. + Now only "application/pdf", "image/tiff" and "image/gif" are supported. + + This service will extract at most 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. Returns: Callable: A callable which accepts the appropriate deserialized request object and returns a deserialized response object. """ - return self._stubs["image_annotator_stub"].AsyncBatchAnnotateFiles + return self._stubs["image_annotator_stub"].BatchAnnotateFiles diff --git a/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py b/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py index 00bf1156..ea0f1fce 100644 --- a/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py +++ b/google/cloud/vision_v1p4beta1/gapic/transports/product_search_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -78,7 +78,7 @@ def __init__( self._stubs = { "product_search_stub": product_search_service_pb2_grpc.ProductSearchStub( channel - ) + ), } # Because this API includes a method that returns a @@ -120,6 +120,29 @@ def channel(self): """ return self._channel + @property + def import_product_sets(self): + """Return the gRPC stub for :meth:`ProductSearchClient.import_product_sets`. + + Asynchronous API that imports a list of reference images to + specified product sets based on a list of image information. + + The ``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``. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["product_search_stub"].ImportProductSets + @property def create_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.create_product_set`. @@ -128,7 +151,7 @@ def create_product_set(self): Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing, or is longer + - Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. Returns: @@ -146,7 +169,7 @@ def list_product_sets(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100, or less + - Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1. Returns: @@ -164,7 +187,7 @@ def get_product_set(self): Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. + - Returns NOT_FOUND if the ProductSet does not exist. Returns: Callable: A callable which accepts the appropriate @@ -177,13 +200,13 @@ def get_product_set(self): def update_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.update_product_set`. - Makes changes to a ProductSet resource. Only display\_name can be + Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: - - Returns NOT\_FOUND if the ProductSet does not exist. - - Returns INVALID\_ARGUMENT if display\_name is present in update\_mask + - 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: @@ -217,11 +240,11 @@ def create_product(self): Possible errors: - - Returns INVALID\_ARGUMENT if display\_name is missing or longer than + - Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. - - Returns INVALID\_ARGUMENT if description is longer than 4096 + - Returns INVALID_ARGUMENT if description is longer than 4096 characters. - - Returns INVALID\_ARGUMENT if product\_category is missing or invalid. + - Returns INVALID_ARGUMENT if product_category is missing or invalid. Returns: Callable: A callable which accepts the appropriate @@ -238,7 +261,7 @@ def list_products(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Returns: @@ -256,7 +279,7 @@ def get_product(self): Possible errors: - - Returns NOT\_FOUND if the Product does not exist. + - Returns NOT_FOUND if the Product does not exist. Returns: Callable: A callable which accepts the appropriate @@ -277,13 +300,13 @@ def update_product(self): Possible errors: - - Returns NOT\_FOUND if the Product does not exist. - - Returns INVALID\_ARGUMENT if display\_name 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. + - 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: Callable: A callable which accepts the appropriate @@ -317,7 +340,7 @@ def create_reference_image(self): 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 + 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. @@ -326,13 +349,13 @@ def create_reference_image(self): Possible errors: - - Returns INVALID\_ARGUMENT if the image\_uri is missing or longer than + - 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 + - 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 + - Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons. Returns: @@ -369,8 +392,8 @@ def list_reference_images(self): Possible errors: - - Returns NOT\_FOUND if the parent product does not exist. - - Returns INVALID\_ARGUMENT if the page\_size is greater than 100, or + - 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: @@ -388,7 +411,7 @@ def get_reference_image(self): Possible errors: - - Returns NOT\_FOUND if the specified image does not exist. + - Returns NOT_FOUND if the specified image does not exist. Returns: Callable: A callable which accepts the appropriate @@ -401,14 +424,14 @@ def get_reference_image(self): def add_product_to_product_set(self): """Return the gRPC stub for :meth:`ProductSearchClient.add_product_to_product_set`. - Adds a Product to the specified ProductSet. If the Product is already - present, no change is made. + Adds a Product to the specified ProductSet. If the Product is + already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: - - Returns NOT\_FOUND if the Product or the ProductSet doesn't exist. + - Returns NOT_FOUND if the Product or the ProductSet doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -440,7 +463,7 @@ def list_products_in_product_set(self): Possible errors: - - Returns INVALID\_ARGUMENT if page\_size is greater than 100 or less + - Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1. Returns: @@ -450,35 +473,12 @@ def list_products_in_product_set(self): """ return self._stubs["product_search_stub"].ListProductsInProductSet - @property - def import_product_sets(self): - """Return the gRPC stub for :meth:`ProductSearchClient.import_product_sets`. - - Asynchronous API that imports a list of reference images to specified - product sets based on a list of image information. - - The ``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``. - - Returns: - Callable: A callable which accepts the appropriate - deserialized request object and returns a - 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. + 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. diff --git a/google/cloud/vision_v1p4beta1/proto/face_pb2.py b/google/cloud/vision_v1p4beta1/proto/face_pb2.py index 5632853b..6b0756d4 100644 --- a/google/cloud/vision_v1p4beta1/proto/face_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/face_pb2.py @@ -1,10 +1,7 @@ # -*- 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")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -25,12 +22,9 @@ 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' - ), + 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", + create_key=_descriptor._internal_create_key, + 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, @@ -44,6 +38,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="celebrity_set", @@ -62,7 +57,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -83,6 +79,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -93,7 +90,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -101,6 +98,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -111,7 +109,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -119,6 +117,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -129,7 +128,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -137,6 +136,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -158,6 +158,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="celebrity", @@ -176,6 +177,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -194,6 +196,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -217,52 +220,55 @@ FaceRecognitionParams = _reflection.GeneratedProtocolMessageType( "FaceRecognitionParams", (_message.Message,), - dict( - DESCRIPTOR=_FACERECOGNITIONPARAMS, - __module__="google.cloud.vision_v1p4beta1.proto.face_pb2", - __doc__="""Parameters for a celebrity recognition request. + { + "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 + “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. + { + "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. + The Celebrity’s display name. description: - The Celebrity's 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. + { + "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 @@ -271,7 +277,7 @@ Recognition confidence. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceRecognitionResult) - ), + }, ) _sym_db.RegisterMessage(FaceRecognitionResult) diff --git a/google/cloud/vision_v1p4beta1/proto/face_pb2_grpc.py b/google/cloud/vision_v1p4beta1/proto/face_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p4beta1/proto/face_pb2_grpc.py +++ b/google/cloud/vision_v1p4beta1/proto/face_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p4beta1/proto/geometry_pb2.py b/google/cloud/vision_v1p4beta1/proto/geometry_pb2.py index b9633070..a8a3d04e 100644 --- a/google/cloud/vision_v1p4beta1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/geometry_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p4beta1/proto/geometry.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,13 +19,10 @@ name="google/cloud/vision_v1p4beta1/proto/geometry.proto", package="google.cloud.vision.v1p4beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p4beta1B\rGeometryProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN" - ), - serialized_pb=_b( - '\n2google/cloud/vision_v1p4beta1/proto/geometry.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02"\x95\x01\n\x0c\x42oundingPoly\x12\x37\n\x08vertices\x18\x01 \x03(\x0b\x32%.google.cloud.vision.v1p4beta1.Vertex\x12L\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.NormalizedVertex"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42\x83\x01\n!com.google.cloud.vision.v1p4beta1B\rGeometryProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' - ), - dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR], + serialized_options=b"\n!com.google.cloud.vision.v1p4beta1B\rGeometryProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n2google/cloud/vision_v1p4beta1/proto/geometry.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto"\x1e\n\x06Vertex\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02"\x95\x01\n\x0c\x42oundingPoly\x12\x37\n\x08vertices\x18\x01 \x03(\x0b\x32%.google.cloud.vision.v1p4beta1.Vertex\x12L\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32/.google.cloud.vision.v1p4beta1.NormalizedVertex"+\n\x08Position\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\x42\x83\x01\n!com.google.cloud.vision.v1p4beta1B\rGeometryProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3', + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,], ) @@ -38,6 +32,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -56,6 +51,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -74,6 +70,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -95,6 +92,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -113,6 +111,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -131,6 +130,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -152,6 +152,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="vertices", @@ -170,6 +171,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="normalized_vertices", @@ -188,6 +190,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -209,6 +212,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="x", @@ -227,6 +231,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="y", @@ -245,6 +250,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="z", @@ -263,6 +269,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -288,42 +295,45 @@ Vertex = _reflection.GeneratedProtocolMessageType( "Vertex", (_message.Message,), - dict( - DESCRIPTOR=_VERTEX, - __module__="google.cloud.vision_v1p4beta1.proto.geometry_pb2", - __doc__="""X coordinate. + { + "DESCRIPTOR": _VERTEX, + "__module__": "google.cloud.vision_v1p4beta1.proto.geometry_pb2", + "__doc__": """X coordinate. + Attributes: y: Y coordinate. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Vertex) - ), + }, ) _sym_db.RegisterMessage(Vertex) NormalizedVertex = _reflection.GeneratedProtocolMessageType( "NormalizedVertex", (_message.Message,), - dict( - DESCRIPTOR=_NORMALIZEDVERTEX, - __module__="google.cloud.vision_v1p4beta1.proto.geometry_pb2", - __doc__="""X coordinate. + { + "DESCRIPTOR": _NORMALIZEDVERTEX, + "__module__": "google.cloud.vision_v1p4beta1.proto.geometry_pb2", + "__doc__": """X coordinate. + Attributes: y: Y coordinate. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.NormalizedVertex) - ), + }, ) _sym_db.RegisterMessage(NormalizedVertex) BoundingPoly = _reflection.GeneratedProtocolMessageType( "BoundingPoly", (_message.Message,), - dict( - DESCRIPTOR=_BOUNDINGPOLY, - __module__="google.cloud.vision_v1p4beta1.proto.geometry_pb2", - __doc__="""A bounding polygon for the detected image annotation. + { + "DESCRIPTOR": _BOUNDINGPOLY, + "__module__": "google.cloud.vision_v1p4beta1.proto.geometry_pb2", + "__doc__": """A bounding polygon for the detected image annotation. + Attributes: vertices: The bounding polygon vertices. @@ -331,19 +341,20 @@ The bounding polygon normalized vertices. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BoundingPoly) - ), + }, ) _sym_db.RegisterMessage(BoundingPoly) Position = _reflection.GeneratedProtocolMessageType( "Position", (_message.Message,), - dict( - DESCRIPTOR=_POSITION, - __module__="google.cloud.vision_v1p4beta1.proto.geometry_pb2", - __doc__="""A 3D position in the image, used primarily for Face detection + { + "DESCRIPTOR": _POSITION, + "__module__": "google.cloud.vision_v1p4beta1.proto.geometry_pb2", + "__doc__": """A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image. + Attributes: x: X coordinate. @@ -353,7 +364,7 @@ Z coordinate (or depth). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Position) - ), + }, ) _sym_db.RegisterMessage(Position) diff --git a/google/cloud/vision_v1p4beta1/proto/geometry_pb2_grpc.py b/google/cloud/vision_v1p4beta1/proto/geometry_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p4beta1/proto/geometry_pb2_grpc.py +++ b/google/cloud/vision_v1p4beta1/proto/geometry_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py b/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py index 61d99e14..92ac0789 100644 --- a/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p4beta1/proto/image_annotator.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -48,12 +45,9 @@ name="google/cloud/vision_v1p4beta1/proto/image_annotator.proto", package="google.cloud.vision.v1p4beta1", syntax="proto3", - serialized_options=_b( - "\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\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"h\n\x1a\x42\x61tchAnnotateImagesRequest\x12J\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateImageRequestB\x03\xe0\x41\x02"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' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p4beta1B\023ImageAnnotatorProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\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"h\n\x1a\x42\x61tchAnnotateImagesRequest\x12J\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateImageRequestB\x03\xe0\x41\x02"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, @@ -77,24 +71,55 @@ full_name="google.cloud.vision.v1p4beta1.Likelihood", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERY_UNLIKELY", index=1, number=1, serialized_options=None, type=None + name="VERY_UNLIKELY", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UNLIKELY", index=2, number=2, serialized_options=None, type=None + name="UNLIKELY", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="POSSIBLE", index=3, number=3, serialized_options=None, type=None + name="POSSIBLE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LIKELY", index=4, number=4, serialized_options=None, type=None + name="LIKELY", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="VERY_LIKELY", index=5, number=5, serialized_options=None, type=None + name="VERY_LIKELY", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -118,6 +143,7 @@ full_name="google.cloud.vision.v1p4beta1.Feature.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="TYPE_UNSPECIFIED", @@ -125,9 +151,15 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FACE_DETECTION", index=1, number=1, serialized_options=None, type=None + name="FACE_DETECTION", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LANDMARK_DETECTION", @@ -135,9 +167,15 @@ number=2, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOGO_DETECTION", index=3, number=3, serialized_options=None, type=None + name="LOGO_DETECTION", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LABEL_DETECTION", @@ -145,9 +183,15 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TEXT_DETECTION", index=5, number=5, serialized_options=None, type=None + name="TEXT_DETECTION", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="DOCUMENT_TEXT_DETECTION", @@ -155,6 +199,7 @@ number=11, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="SAFE_SEARCH_DETECTION", @@ -162,6 +207,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="IMAGE_PROPERTIES", @@ -169,9 +215,15 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CROP_HINTS", index=9, number=9, serialized_options=None, type=None + name="CROP_HINTS", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="WEB_DETECTION", @@ -179,6 +231,7 @@ number=10, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="PRODUCT_SEARCH", @@ -186,6 +239,7 @@ number=12, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="OBJECT_LOCALIZATION", @@ -193,6 +247,7 @@ number=19, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -207,6 +262,7 @@ full_name="google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="UNKNOWN_LANDMARK", @@ -214,12 +270,23 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LEFT_EYE", index=1, number=1, serialized_options=None, type=None + name="LEFT_EYE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RIGHT_EYE", index=2, number=2, serialized_options=None, type=None + name="RIGHT_EYE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_OF_LEFT_EYEBROW", @@ -227,6 +294,7 @@ number=3, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_OF_LEFT_EYEBROW", @@ -234,6 +302,7 @@ number=4, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_OF_RIGHT_EYEBROW", @@ -241,6 +310,7 @@ number=5, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_OF_RIGHT_EYEBROW", @@ -248,6 +318,7 @@ number=6, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="MIDPOINT_BETWEEN_EYES", @@ -255,24 +326,55 @@ number=7, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="NOSE_TIP", index=8, number=8, serialized_options=None, type=None + name="NOSE_TIP", + index=8, + number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="UPPER_LIP", index=9, number=9, serialized_options=None, type=None + name="UPPER_LIP", + index=9, + number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LOWER_LIP", index=10, number=10, serialized_options=None, type=None + name="LOWER_LIP", + index=10, + number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_LEFT", index=11, number=11, serialized_options=None, type=None + name="MOUTH_LEFT", + index=11, + number=11, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_RIGHT", index=12, number=12, serialized_options=None, type=None + name="MOUTH_RIGHT", + index=12, + number=12, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="MOUTH_CENTER", index=13, number=13, serialized_options=None, type=None + name="MOUTH_CENTER", + index=13, + number=13, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_RIGHT", @@ -280,6 +382,7 @@ number=14, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_LEFT", @@ -287,6 +390,7 @@ number=15, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="NOSE_BOTTOM_CENTER", @@ -294,6 +398,7 @@ number=16, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_TOP_BOUNDARY", @@ -301,6 +406,7 @@ number=17, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_RIGHT_CORNER", @@ -308,6 +414,7 @@ number=18, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_BOTTOM_BOUNDARY", @@ -315,6 +422,7 @@ number=19, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_LEFT_CORNER", @@ -322,6 +430,7 @@ number=20, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_TOP_BOUNDARY", @@ -329,6 +438,7 @@ number=21, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_RIGHT_CORNER", @@ -336,6 +446,7 @@ number=22, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_BOTTOM_BOUNDARY", @@ -343,6 +454,7 @@ number=23, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_LEFT_CORNER", @@ -350,6 +462,7 @@ number=24, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYEBROW_UPPER_MIDPOINT", @@ -357,6 +470,7 @@ number=25, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYEBROW_UPPER_MIDPOINT", @@ -364,6 +478,7 @@ number=26, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EAR_TRAGION", @@ -371,6 +486,7 @@ number=27, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EAR_TRAGION", @@ -378,6 +494,7 @@ number=28, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="LEFT_EYE_PUPIL", @@ -385,6 +502,7 @@ number=29, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="RIGHT_EYE_PUPIL", @@ -392,6 +510,7 @@ number=30, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="FOREHEAD_GLABELLA", @@ -399,6 +518,7 @@ number=31, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_GNATHION", @@ -406,6 +526,7 @@ number=32, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_LEFT_GONION", @@ -413,6 +534,7 @@ number=33, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( name="CHIN_RIGHT_GONION", @@ -420,6 +542,7 @@ number=34, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -434,6 +557,7 @@ full_name="google.cloud.vision.v1p4beta1.OperationMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -441,18 +565,39 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CREATED", index=1, number=1, serialized_options=None, type=None + name="CREATED", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=2, number=2, serialized_options=None, type=None + name="RUNNING", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="DONE", index=3, number=3, serialized_options=None, type=None + name="DONE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=4, number=4, serialized_options=None, type=None + name="CANCELLED", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -469,6 +614,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -487,6 +633,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="max_results", @@ -505,6 +652,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -515,7 +663,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -523,11 +671,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_FEATURE_TYPE], + enum_types=[_FEATURE_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -544,6 +693,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_image_uri", @@ -554,7 +704,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -562,6 +712,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_uri", @@ -572,7 +723,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -580,6 +731,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -601,6 +753,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="content", @@ -611,7 +764,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -619,6 +772,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source", @@ -637,6 +791,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -658,6 +813,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -676,6 +832,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="position", @@ -694,11 +851,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_FACEANNOTATION_LANDMARK_TYPE], + enum_types=[_FACEANNOTATION_LANDMARK_TYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -714,6 +872,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -732,6 +891,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="fd_bounding_poly", @@ -750,6 +910,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmarks", @@ -768,6 +929,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="roll_angle", @@ -786,6 +948,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pan_angle", @@ -804,6 +967,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tilt_angle", @@ -822,6 +986,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detection_confidence", @@ -840,6 +1005,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmarking_confidence", @@ -858,6 +1024,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="joy_likelihood", @@ -876,6 +1043,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sorrow_likelihood", @@ -894,6 +1062,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="anger_likelihood", @@ -912,6 +1081,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="surprise_likelihood", @@ -930,6 +1100,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="under_exposed_likelihood", @@ -948,6 +1119,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="blurred_likelihood", @@ -966,6 +1138,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="headwear_likelihood", @@ -984,6 +1157,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="recognition_result", @@ -1002,10 +1176,11 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_FACEANNOTATION_LANDMARK], + nested_types=[_FACEANNOTATION_LANDMARK,], enum_types=[], serialized_options=None, is_extendable=False, @@ -1023,6 +1198,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="lat_lng", @@ -1041,7 +1217,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1062,6 +1239,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1072,7 +1250,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1080,6 +1258,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1090,7 +1269,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1098,6 +1277,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uint64_value", @@ -1116,6 +1296,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1137,6 +1318,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mid", @@ -1147,7 +1329,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1155,6 +1337,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="locale", @@ -1165,7 +1348,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1173,6 +1356,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -1183,7 +1367,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1191,6 +1375,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1209,6 +1394,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1225,8 +1411,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=b"\030\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="topicality", @@ -1245,6 +1432,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_poly", @@ -1263,6 +1451,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="locations", @@ -1281,6 +1470,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="properties", @@ -1299,6 +1489,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1320,6 +1511,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mid", @@ -1330,7 +1522,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1338,6 +1530,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -1348,7 +1541,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1356,6 +1549,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="name", @@ -1366,7 +1560,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1374,6 +1568,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1392,6 +1587,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_poly", @@ -1410,6 +1606,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1431,6 +1628,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="adult", @@ -1449,6 +1647,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="spoof", @@ -1467,6 +1666,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="medical", @@ -1485,6 +1685,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="violence", @@ -1503,6 +1704,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="racy", @@ -1521,6 +1723,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1542,6 +1745,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="min_lat_lng", @@ -1560,6 +1764,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="max_lat_lng", @@ -1578,6 +1783,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1599,6 +1805,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="color", @@ -1617,6 +1824,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -1635,6 +1843,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pixel_fraction", @@ -1653,6 +1862,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1674,6 +1884,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="colors", @@ -1692,7 +1903,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1713,6 +1925,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="dominant_colors", @@ -1731,7 +1944,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1752,6 +1966,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -1770,6 +1985,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -1788,6 +2004,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="importance_fraction", @@ -1806,6 +2023,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1827,6 +2045,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="crop_hints", @@ -1845,7 +2064,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1866,6 +2086,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="aspect_ratios", @@ -1884,7 +2105,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1905,6 +2127,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="include_geo_results", @@ -1923,7 +2146,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1944,6 +2168,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="lat_long_rect", @@ -1962,6 +2187,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_hints", @@ -1980,6 +2206,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="crop_hints_params", @@ -1998,6 +2225,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="face_recognition_params", @@ -2016,6 +2244,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_search_params", @@ -2034,6 +2263,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="web_detection_params", @@ -2052,6 +2282,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2073,6 +2304,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="image", @@ -2091,6 +2323,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="features", @@ -2109,6 +2342,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_context", @@ -2127,6 +2361,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2148,6 +2383,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -2158,7 +2394,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2166,6 +2402,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_number", @@ -2184,6 +2421,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2205,6 +2443,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="face_annotations", @@ -2223,6 +2462,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="landmark_annotations", @@ -2241,6 +2481,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="logo_annotations", @@ -2259,6 +2500,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="label_annotations", @@ -2277,6 +2519,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="localized_object_annotations", @@ -2295,6 +2538,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text_annotations", @@ -2313,6 +2557,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_text_annotation", @@ -2331,6 +2576,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="safe_search_annotation", @@ -2349,6 +2595,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_properties_annotation", @@ -2367,6 +2614,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="crop_hints_annotation", @@ -2385,6 +2633,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="web_detection", @@ -2403,6 +2652,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_search_results", @@ -2421,6 +2671,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="error", @@ -2439,6 +2690,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="context", @@ -2457,6 +2709,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2478,6 +2731,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -2494,9 +2748,10 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2517,6 +2772,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="responses", @@ -2535,7 +2791,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2556,6 +2813,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_config", @@ -2574,6 +2832,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="features", @@ -2592,6 +2851,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_context", @@ -2610,6 +2870,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pages", @@ -2628,6 +2889,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2649,6 +2911,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_config", @@ -2667,6 +2930,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="responses", @@ -2685,6 +2949,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="total_pages", @@ -2703,6 +2968,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="error", @@ -2721,6 +2987,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2742,6 +3009,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -2758,9 +3026,10 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2781,6 +3050,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="responses", @@ -2799,7 +3069,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2820,6 +3091,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_config", @@ -2838,6 +3110,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="features", @@ -2856,6 +3129,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image_context", @@ -2874,6 +3148,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_config", @@ -2892,6 +3167,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2913,6 +3189,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="output_config", @@ -2931,7 +3208,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2952,6 +3230,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -2968,8 +3247,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_config", @@ -2986,8 +3266,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3009,6 +3290,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="output_config", @@ -3027,7 +3309,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -3048,6 +3331,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="requests", @@ -3064,9 +3348,10 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -3087,6 +3372,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="responses", @@ -3105,7 +3391,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -3126,6 +3413,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -3144,6 +3432,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="content", @@ -3154,7 +3443,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b(""), + default_value=b"", message_type=None, enum_type=None, containing_type=None, @@ -3162,6 +3451,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mime_type", @@ -3172,7 +3462,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3180,6 +3470,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3201,6 +3492,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", @@ -3219,6 +3511,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="batch_size", @@ -3237,6 +3530,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -3258,6 +3552,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -3268,7 +3563,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3276,7 +3571,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -3297,6 +3593,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="uri", @@ -3307,7 +3604,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -3315,7 +3612,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -3336,6 +3634,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="state", @@ -3354,6 +3653,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="create_time", @@ -3372,6 +3672,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_time", @@ -3390,11 +3691,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_OPERATIONMETADATA_STATE], + enum_types=[_OPERATIONMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -3651,12 +3953,13 @@ Feature = _reflection.GeneratedProtocolMessageType( "Feature", (_message.Message,), - dict( - DESCRIPTOR=_FEATURE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""The type of Google Cloud Vision API detection to perform, and the + { + "DESCRIPTOR": _FEATURE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple ``Feature`` objects can be specified in the ``features`` list. + Attributes: type: The feature type. @@ -3666,21 +3969,22 @@ ``CROP_HINTS``. model: Model to use for the feature. Supported values: - "builtin/stable" (the default if unset) and "builtin/latest". + “builtin/stable” (the default if unset) and “builtin/latest”. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Feature) - ), + }, ) _sym_db.RegisterMessage(Feature) ImageSource = _reflection.GeneratedProtocolMessageType( "ImageSource", (_message.Message,), - dict( - DESCRIPTOR=_IMAGESOURCE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage or web URL image + { + "DESCRIPTOR": _IMAGESOURCE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """External image source (Google Cloud Storage or web URL image location). + Attributes: gcs_image_uri: \ **Use ``image_uri`` instead.** The Google Cloud Storage URI @@ -3697,7 +4001,7 @@ more info. 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Google cannot guarantee that the request will be completed. Your request - may fail if the specified host denies the request (e.g. due + may fail if the specified host denies the request (e.g. due to request throttling or DOS prevention), or if Google throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production @@ -3705,17 +4009,18 @@ are specified, ``image_uri`` takes precedence. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageSource) - ), + }, ) _sym_db.RegisterMessage(ImageSource) Image = _reflection.GeneratedProtocolMessageType( "Image", (_message.Message,), - dict( - DESCRIPTOR=_IMAGE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + { + "DESCRIPTOR": _IMAGE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Client image to perform Google Cloud Vision API tasks over. + Attributes: content: Image content, represented as a stream of bytes. Note: As with @@ -3728,21 +4033,22 @@ the image annotation request. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Image) - ), + }, ) _sym_db.RegisterMessage(Image) FaceAnnotation = _reflection.GeneratedProtocolMessageType( "FaceAnnotation", (_message.Message,), - dict( - Landmark=_reflection.GeneratedProtocolMessageType( + { + "Landmark": _reflection.GeneratedProtocolMessageType( "Landmark", (_message.Message,), - dict( - DESCRIPTOR=_FACEANNOTATION_LANDMARK, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A face-specific landmark (for example, a face feature). + { + "DESCRIPTOR": _FACEANNOTATION_LANDMARK, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """A face-specific landmark (for example, a face feature). + Attributes: type: Face landmark type. @@ -3750,16 +4056,17 @@ Face landmark position. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) - ), + }, ), - DESCRIPTOR=_FACEANNOTATION, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + "DESCRIPTOR": _FACEANNOTATION, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """A face annotation object contains the results of face detection. + Attributes: bounding_poly: The bounding polygon around the face. The coordinates of the - bounding box are in the original image's scale. The bounding - box is computed to "frame" the face in accordance with human + bounding box are in the original image’s scale. The bounding + box is computed to “frame” the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the ``BoundingPoly`` (the polygon will be unbounded) if only a @@ -3768,7 +4075,7 @@ The ``fd_bounding_poly`` bounding polygon is tighter than the ``boundingPoly``, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image - analysis that detects the "amount of skin" visible in an + analysis that detects the “amount of skin” visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix. landmarks: @@ -3783,7 +4090,7 @@ perpendicular to the image. Range [-180,180]. tilt_angle: Pitch angle, which indicates the upwards/downwards angle that - the face is pointing relative to the image's horizontal plane. + the face is pointing relative to the image’s horizontal plane. Range [-180,180]. detection_confidence: Detection confidence. Range [0, 1]. @@ -3805,15 +4112,15 @@ Headwear likelihood. recognition_result: Additional recognition information. Only computed if - image\_context.face\_recognition\_params is provided, **and** - a match is found to a + 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) - ), + }, ) _sym_db.RegisterMessage(FaceAnnotation) _sym_db.RegisterMessage(FaceAnnotation.Landmark) @@ -3821,26 +4128,28 @@ LocationInfo = _reflection.GeneratedProtocolMessageType( "LocationInfo", (_message.Message,), - dict( - DESCRIPTOR=_LOCATIONINFO, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Detected entity location information. + { + "DESCRIPTOR": _LOCATIONINFO, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Detected entity location information. + Attributes: lat_lng: lat/long location coordinates. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LocationInfo) - ), + }, ) _sym_db.RegisterMessage(LocationInfo) Property = _reflection.GeneratedProtocolMessageType( "Property", (_message.Message,), - dict( - DESCRIPTOR=_PROPERTY, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + { + "DESCRIPTOR": _PROPERTY, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """A ``Property`` consists of a user-supplied name/value pair. + Attributes: name: Name of the property. @@ -3850,17 +4159,18 @@ Value of numeric properties. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Property) - ), + }, ) _sym_db.RegisterMessage(Property) EntityAnnotation = _reflection.GeneratedProtocolMessageType( "EntityAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_ENTITYANNOTATION, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Set of detected entity features. + { + "DESCRIPTOR": _ENTITYANNOTATION, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Set of detected entity features. + Attributes: mid: Opaque entity ID. Some IDs may be available in `Google @@ -3877,13 +4187,13 @@ confidence: \ **Deprecated. Use ``score`` instead.** The accuracy of the entity detection in an image. For example, for an image in - which the "Eiffel Tower" entity is detected, this field + which the “Eiffel Tower” entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1]. topicality: The relevancy of the ICA (Image Content Annotation) label to - the image. For example, the relevancy of "tower" is likely - higher to an image containing the detected "Eiffel Tower" than + the image. For example, the relevancy of “tower” is likely + higher to an image containing the detected “Eiffel Tower” than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1]. @@ -3903,24 +4213,25 @@ entity. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.EntityAnnotation) - ), + }, ) _sym_db.RegisterMessage(EntityAnnotation) LocalizedObjectAnnotation = _reflection.GeneratedProtocolMessageType( "LocalizedObjectAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_LOCALIZEDOBJECTANNOTATION, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Set of detected objects with bounding boxes. + { + "DESCRIPTOR": _LOCALIZEDOBJECTANNOTATION, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Set of detected objects with bounding boxes. + 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 + 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. + code_locale_identifier. name: Object name, expressed in its ``language_code`` language. score: @@ -3930,19 +4241,20 @@ populated. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) - ), + }, ) _sym_db.RegisterMessage(LocalizedObjectAnnotation) SafeSearchAnnotation = _reflection.GeneratedProtocolMessageType( "SafeSearchAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_SAFESEARCHANNOTATION, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Set of features pertaining to the image, computed by computer vision + { + "DESCRIPTOR": _SAFESEARCHANNOTATION, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence). + Attributes: adult: Represents the adult content likelihood for the image. Adult @@ -3950,7 +4262,7 @@ images or cartoons, or sexual activities. spoof: Spoof likelihood. The likelihood that an modification was made - to the image's canonical version to make it appear funny or + to the image’s canonical version to make it appear funny or offensive. medical: Likelihood that this is a medical image. @@ -3963,17 +4275,18 @@ poses, or close-ups of sensitive body areas. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.SafeSearchAnnotation) - ), + }, ) _sym_db.RegisterMessage(SafeSearchAnnotation) LatLongRect = _reflection.GeneratedProtocolMessageType( "LatLongRect", (_message.Message,), - dict( - DESCRIPTOR=_LATLONGRECT, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Rectangle determined by min and max ``LatLng`` pairs. + { + "DESCRIPTOR": _LATLONGRECT, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Rectangle determined by min and max ``LatLng`` pairs. + Attributes: min_lat_lng: Min lat/long pair. @@ -3981,18 +4294,19 @@ Max lat/long pair. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.LatLongRect) - ), + }, ) _sym_db.RegisterMessage(LatLongRect) ColorInfo = _reflection.GeneratedProtocolMessageType( "ColorInfo", (_message.Message,), - dict( - DESCRIPTOR=_COLORINFO, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Color information consists of RGB channels, score, and the fraction of + { + "DESCRIPTOR": _COLORINFO, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image. + Attributes: color: RGB components of the color. @@ -4003,54 +4317,57 @@ in range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ColorInfo) - ), + }, ) _sym_db.RegisterMessage(ColorInfo) DominantColorsAnnotation = _reflection.GeneratedProtocolMessageType( "DominantColorsAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_DOMINANTCOLORSANNOTATION, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Set of dominant colors and their corresponding scores. + { + "DESCRIPTOR": _DOMINANTCOLORSANNOTATION, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Set of dominant colors and their corresponding scores. + Attributes: colors: RGB color values with their score and pixel fraction. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DominantColorsAnnotation) - ), + }, ) _sym_db.RegisterMessage(DominantColorsAnnotation) ImageProperties = _reflection.GeneratedProtocolMessageType( "ImageProperties", (_message.Message,), - dict( - DESCRIPTOR=_IMAGEPROPERTIES, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Stores image properties, such as dominant colors. + { + "DESCRIPTOR": _IMAGEPROPERTIES, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Stores image properties, such as dominant colors. + Attributes: dominant_colors: If present, dominant colors completed successfully. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageProperties) - ), + }, ) _sym_db.RegisterMessage(ImageProperties) CropHint = _reflection.GeneratedProtocolMessageType( "CropHint", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINT, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Single crop hint that is used to generate a new crop when serving an + { + "DESCRIPTOR": _CROPHINT, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Single crop hint that is used to generate a new crop when serving an image. + Attributes: bounding_poly: The bounding polygon for the crop region. The coordinates of - the bounding box are in the original image's scale. + the bounding box are in the original image’s scale. confidence: Confidence of this being a salient region. Range [0, 1]. importance_fraction: @@ -4058,34 +4375,36 @@ the original image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHint) - ), + }, ) _sym_db.RegisterMessage(CropHint) CropHintsAnnotation = _reflection.GeneratedProtocolMessageType( "CropHintsAnnotation", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINTSANNOTATION, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Set of crop hints that are used to generate new crops when serving + { + "DESCRIPTOR": _CROPHINTSANNOTATION, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Set of crop hints that are used to generate new crops when serving images. + Attributes: crop_hints: Crop hint results. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHintsAnnotation) - ), + }, ) _sym_db.RegisterMessage(CropHintsAnnotation) CropHintsParams = _reflection.GeneratedProtocolMessageType( "CropHintsParams", (_message.Message,), - dict( - DESCRIPTOR=_CROPHINTSPARAMS, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Parameters for crop hints annotation request. + { + "DESCRIPTOR": _CROPHINTSPARAMS, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Parameters for crop hints annotation request. + Attributes: aspect_ratios: Aspect ratios in floats, representing the ratio of the width @@ -4096,47 +4415,49 @@ 16; any aspect ratios provided after the 16th are ignored. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CropHintsParams) - ), + }, ) _sym_db.RegisterMessage(CropHintsParams) WebDetectionParams = _reflection.GeneratedProtocolMessageType( "WebDetectionParams", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTIONPARAMS, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Parameters for web detection request. + { + "DESCRIPTOR": _WEBDETECTIONPARAMS, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Parameters for web detection request. + Attributes: include_geo_results: Whether to include results derived from the geo information in the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetectionParams) - ), + }, ) _sym_db.RegisterMessage(WebDetectionParams) ImageContext = _reflection.GeneratedProtocolMessageType( "ImageContext", (_message.Message,), - dict( - DESCRIPTOR=_IMAGECONTEXT, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Image context and/or feature-specific parameters. + { + "DESCRIPTOR": _IMAGECONTEXT, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Image context and/or feature-specific parameters. + Attributes: lat_long_rect: Not used. language_hints: - List of languages to use for TEXT\_DETECTION. In most cases, - an empty value yields the best results since it enables - automatic language detection. For languages based on the Latin - alphabet, setting ``language_hints`` is not needed. In rare - cases, when the language of the text in the image is known, - setting a hint will help get better results (although it will - be a significant hindrance if the hint is wrong). Text - detection returns an error if one or more of the specified - languages is not one of the `supported languages + List of languages to use for TEXT_DETECTION. In most cases, an + empty value yields the best results since it enables automatic + language detection. For languages based on the Latin alphabet, + setting ``language_hints`` is not needed. In rare cases, when + the language of the text in the image is known, setting a hint + will help get better results (although it will be a + significant hindrance if the hint is wrong). Text detection + returns an error if one or more of the specified languages is + not one of the `supported languages `__. crop_hints_params: Parameters for crop hints annotation request. @@ -4148,19 +4469,20 @@ Parameters for web detection. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageContext) - ), + }, ) _sym_db.RegisterMessage(ImageContext) AnnotateImageRequest = _reflection.GeneratedProtocolMessageType( "AnnotateImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGEREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Request for performing Google Cloud Vision API tasks over a user- + { + "DESCRIPTOR": _ANNOTATEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Request for performing Google Cloud Vision API tasks over a user- provided image, with user-requested features, and with context information. + Attributes: image: The image to be processed. @@ -4170,18 +4492,19 @@ Additional context that may accompany the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateImageRequest) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageRequest) ImageAnnotationContext = _reflection.GeneratedProtocolMessageType( "ImageAnnotationContext", (_message.Message,), - dict( - DESCRIPTOR=_IMAGEANNOTATIONCONTEXT, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""If an image was produced from a file (e.g. a PDF), this message gives + { + "DESCRIPTOR": _IMAGEANNOTATIONCONTEXT, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image. + Attributes: uri: The URI of the file used to produce the image. @@ -4190,17 +4513,18 @@ number within the file used to produce the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImageAnnotationContext) - ), + }, ) _sym_db.RegisterMessage(ImageAnnotationContext) AnnotateImageResponse = _reflection.GeneratedProtocolMessageType( "AnnotateImageResponse", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEIMAGERESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Response to an image annotation request. + { + "DESCRIPTOR": _ANNOTATEIMAGERESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Response to an image annotation request. + Attributes: face_annotations: If present, face detection has completed successfully. @@ -4239,51 +4563,54 @@ where this image comes from. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateImageResponse) - ), + }, ) _sym_db.RegisterMessage(AnnotateImageResponse) BatchAnnotateImagesRequest = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Multiple image annotation requests are batched into a single service call. + Attributes: requests: Required. Individual image annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesRequest) BatchAnnotateImagesResponse = _reflection.GeneratedProtocolMessageType( "BatchAnnotateImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEIMAGESRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Response to a batch image annotation request. + { + "DESCRIPTOR": _BATCHANNOTATEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Response to a batch image annotation request. + Attributes: responses: Individual responses to image annotation requests within the batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateImagesResponse) AnnotateFileRequest = _reflection.GeneratedProtocolMessageType( "AnnotateFileRequest", (_message.Message,), - dict( - DESCRIPTOR=_ANNOTATEFILEREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A request to annotate one single file, e.g. a PDF, TIFF or GIF file. + { + "DESCRIPTOR": _ANNOTATEFILEREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """A request to annotate one single file, e.g. a PDF, TIFF or GIF file. + Attributes: input_config: Required. Information about the input file. @@ -4304,18 +4631,19 @@ file. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AnnotateFileRequest) - ), + }, ) _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 + { + "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 @@ -4330,17 +4658,18 @@ 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,), - dict( - DESCRIPTOR=_BATCHANNOTATEFILESREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A list of requests to annotate files using the BatchAnnotateFiles API. + { + "DESCRIPTOR": _BATCHANNOTATEFILESREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """A list of requests to annotate files using the BatchAnnotateFiles API. + Attributes: requests: Required. The list of file annotation requests. Right now we @@ -4348,17 +4677,18 @@ BatchAnnotateFilesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateFilesRequest) BatchAnnotateFilesResponse = _reflection.GeneratedProtocolMessageType( "BatchAnnotateFilesResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHANNOTATEFILESRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A list of file annotation responses. + { + "DESCRIPTOR": _BATCHANNOTATEFILESRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """A list of file annotation responses. + Attributes: responses: The list of file annotation responses, each response @@ -4366,17 +4696,18 @@ BatchAnnotateFilesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) - ), + }, ) _sym_db.RegisterMessage(BatchAnnotateFilesResponse) AsyncAnnotateFileRequest = _reflection.GeneratedProtocolMessageType( "AsyncAnnotateFileRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCANNOTATEFILEREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""An offline file annotation request. + { + "DESCRIPTOR": _ASYNCANNOTATEFILEREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """An offline file annotation request. + Attributes: input_config: Required. Information about the input file. @@ -4386,109 +4717,115 @@ Additional context that may accompany the image(s) in the file. output_config: - Required. The desired output location and metadata (e.g. - format). + Required. The desired output location and metadata + (e.g. format). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncAnnotateFileRequest) AsyncAnnotateFileResponse = _reflection.GeneratedProtocolMessageType( "AsyncAnnotateFileResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCANNOTATEFILERESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""The response for a single offline file annotation request. + { + "DESCRIPTOR": _ASYNCANNOTATEFILERESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """The response for a single offline file annotation request. + Attributes: output_config: The output location and metadata from AsyncAnnotateFileRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncAnnotateFileResponse) AsyncBatchAnnotateImagesRequest = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEIMAGESREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Request for async image annotation for a list of images. + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Request for async image annotation for a list of images. + Attributes: requests: Required. Individual image annotation requests for this batch. output_config: - Required. The desired output location and metadata (e.g. - format). + Required. The desired output location and metadata + (e.g. format). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateImagesRequest) AsyncBatchAnnotateImagesResponse = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEIMAGESRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Response to an async batch image annotation request. + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Response to an async batch image annotation request. + Attributes: output_config: The output location and metadata from AsyncBatchAnnotateImagesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateImagesResponse) AsyncBatchAnnotateFilesRequest = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateFilesRequest", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEFILESREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Multiple async file annotation requests are batched into a single + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEFILESREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Multiple async file annotation requests are batched into a single service call. + Attributes: requests: Required. Individual async file annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateFilesRequest) AsyncBatchAnnotateFilesResponse = _reflection.GeneratedProtocolMessageType( "AsyncBatchAnnotateFilesResponse", (_message.Message,), - dict( - DESCRIPTOR=_ASYNCBATCHANNOTATEFILESRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Response to an async batch file annotation request. + { + "DESCRIPTOR": _ASYNCBATCHANNOTATEFILESRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Response to an async batch file annotation request. + Attributes: responses: The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) - ), + }, ) _sym_db.RegisterMessage(AsyncBatchAnnotateFilesResponse) InputConfig = _reflection.GeneratedProtocolMessageType( "InputConfig", (_message.Message,), - dict( - DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""The desired input location and metadata. + { + "DESCRIPTOR": _INPUTCONFIG, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """The desired input location and metadata. + Attributes: gcs_source: The Google Cloud Storage location to read the input from. @@ -4500,22 +4837,23 @@ requests. It does not work for AsyncBatchAnnotateFiles requests. mime_type: - The type of the file. Currently only "application/pdf", - "image/tiff" and "image/gif" are supported. Wildcards are not + 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) - ), + }, ) _sym_db.RegisterMessage(InputConfig) OutputConfig = _reflection.GeneratedProtocolMessageType( "OutputConfig", (_message.Message,), - dict( - DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""The desired output location and metadata. + { + "DESCRIPTOR": _OUTPUTCONFIG, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """The desired output location and metadata. + Attributes: gcs_destination: The Google Cloud Storage location to write the output(s) to. @@ -4526,22 +4864,23 @@ pdf file with 100 pages, 100 response protos will be generated. If ``batch_size`` = 20, then 5 json files each containing 20 response protos will be written under the prefix - ``gcs_destination``.\ ``uri``. Currently, batch\_size only + ``gcs_destination``.\ ``uri``. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.OutputConfig) - ), + }, ) _sym_db.RegisterMessage(OutputConfig) GcsSource = _reflection.GeneratedProtocolMessageType( "GcsSource", (_message.Message,), - dict( - DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""The Google Cloud Storage location where the input will be read from. + { + "DESCRIPTOR": _GCSSOURCE, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """The Google Cloud Storage location where the input will be read from. + Attributes: uri: Google Cloud Storage URI for the input file. This must only be @@ -4549,17 +4888,18 @@ supported. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GcsSource) - ), + }, ) _sym_db.RegisterMessage(GcsSource) GcsDestination = _reflection.GeneratedProtocolMessageType( "GcsDestination", (_message.Message,), - dict( - DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""The Google Cloud Storage location where the output will be written to. + { + "DESCRIPTOR": _GCSDESTINATION, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """The Google Cloud Storage location where the output will be written to. + Attributes: uri: Google Cloud Storage URI prefix where the results will be @@ -4571,7 +4911,7 @@ 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". - + 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 @@ -4583,17 +4923,18 @@ multiple sharded files. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GcsDestination) - ), + }, ) _sym_db.RegisterMessage(GcsDestination) OperationMetadata = _reflection.GeneratedProtocolMessageType( "OperationMetadata", (_message.Message,), - dict( - DESCRIPTOR=_OPERATIONMETADATA, - __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Contains metadata for the BatchAnnotateImages operation. + { + "DESCRIPTOR": _OPERATIONMETADATA, + "__module__": "google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", + "__doc__": """Contains metadata for the BatchAnnotateImages operation. + Attributes: state: Current state of the batch operation. @@ -4603,7 +4944,7 @@ The time when the operation result was last updated. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.OperationMetadata) - ), + }, ) _sym_db.RegisterMessage(OperationMetadata) @@ -4621,9 +4962,8 @@ full_name="google.cloud.vision.v1p4beta1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" - ), + serialized_options=b"\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision", + create_key=_descriptor._internal_create_key, serialized_start=8895, serialized_end=9904, methods=[ @@ -4634,9 +4974,8 @@ containing_service=None, input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\037"\032/v1p4beta1/images:annotate:\001*\332A\010requests' - ), + serialized_options=b'\202\323\344\223\002\037"\032/v1p4beta1/images:annotate:\001*\332A\010requests', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchAnnotateFiles", @@ -4645,9 +4984,8 @@ containing_service=None, input_type=_BATCHANNOTATEFILESREQUEST, output_type=_BATCHANNOTATEFILESRESPONSE, - serialized_options=_b( - '\202\323\344\223\002\036"\031/v1p4beta1/files:annotate:\001*\332A\010requests' - ), + serialized_options=b'\202\323\344\223\002\036"\031/v1p4beta1/files:annotate:\001*\332A\010requests', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AsyncBatchAnnotateImages", @@ -4656,9 +4994,8 @@ containing_service=None, input_type=_ASYNCBATCHANNOTATEIMAGESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002)"$/v1p4beta1/images:asyncBatchAnnotate:\001*\332A\026requests,output_config\312A5\n AsyncBatchAnnotateImagesResponse\022\021OperationMetadata' - ), + serialized_options=b'\202\323\344\223\002)"$/v1p4beta1/images:asyncBatchAnnotate:\001*\332A\026requests,output_config\312A5\n AsyncBatchAnnotateImagesResponse\022\021OperationMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AsyncBatchAnnotateFiles", @@ -4667,9 +5004,8 @@ containing_service=None, input_type=_ASYNCBATCHANNOTATEFILESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002("#/v1p4beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata' - ), + serialized_options=b'\202\323\344\223\002("#/v1p4beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata', + create_key=_descriptor._internal_create_key, ), ], ) 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..ebfedef4 100644 --- a/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2_grpc.py +++ b/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.vision_v1p4beta1.proto import ( @@ -11,16 +12,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 +46,26 @@ 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. - """ + """ 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 +73,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!") @@ -124,3 +125,119 @@ def add_ImageAnnotatorServicer_to_server(servicer, server): "google.cloud.vision.v1p4beta1.ImageAnnotator", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ImageAnnotator(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. + """ + + @staticmethod + def BatchAnnotateImages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateImages", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateImagesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchAnnotateFiles( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ImageAnnotator/BatchAnnotateFiles", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateFilesRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_image__annotator__pb2.BatchAnnotateFilesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def AsyncBatchAnnotateImages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateImages", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateImagesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def AsyncBatchAnnotateFiles( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ImageAnnotator/AsyncBatchAnnotateFiles", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_image__annotator__pb2.AsyncBatchAnnotateFilesRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py b/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py index 10c74eb7..ca773d67 100644 --- a/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p4beta1/proto/product_search.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -30,12 +27,9 @@ name="google/cloud/vision_v1p4beta1/proto/product_search.proto", package="google.cloud.vision.v1p4beta1", syntax="proto3", - serialized_options=_b( - "\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\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' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p4beta1B\022ProductSearchProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\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, @@ -52,6 +46,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -70,6 +65,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_set", @@ -80,14 +76,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b('\372A"\n vision.googleapis.com/ProductSet'), + serialized_options=b'\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_categories", @@ -106,6 +103,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -116,7 +114,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -124,6 +122,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -145,6 +144,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product", @@ -163,6 +163,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -181,6 +182,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="image", @@ -191,7 +193,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -199,6 +201,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -219,6 +222,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mid", @@ -229,7 +233,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -237,6 +241,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -247,7 +252,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -255,6 +260,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="name", @@ -265,7 +271,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -273,6 +279,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -291,6 +298,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -311,6 +319,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="bounding_poly", @@ -329,6 +338,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="results", @@ -347,6 +357,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="object_annotations", @@ -365,6 +376,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -385,6 +397,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="index_time", @@ -403,6 +416,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="results", @@ -421,6 +435,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_grouped_results", @@ -439,6 +454,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -497,10 +513,11 @@ ProductSearchParams = _reflection.GeneratedProtocolMessageType( "ProductSearchParams", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCTSEARCHPARAMS, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_pb2", - __doc__="""Parameters for a product search request. + { + "DESCRIPTOR": _PRODUCTSEARCHPARAMS, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_pb2", + "__doc__": """Parameters for a product search request. + Attributes: bounding_poly: The bounding polygon around the area of interest in the image. @@ -512,40 +529,41 @@ /locations/LOC_ID/productSets/PRODUCT_SET_ID``. product_categories: The list of product categories to search in. Currently, we - only consider the first category, and either "homegoods-v2", - "apparel-v2", "toys-v2", "packagedgoods-v1", or "general-v1" - should be specified. The legacy categories "homegoods", - "apparel", and "toys" are still supported but will be - deprecated. For new products, please use "homegoods-v2", - "apparel-v2", or "toys-v2" for better product search accuracy. + only consider the first category, and either “homegoods-v2”, + “apparel-v2”, “toys-v2”, “packagedgoods-v1”, or “general-v1” + should be specified. The legacy categories “homegoods”, + “apparel”, and “toys” are still supported but will be + deprecated. For new products, please use “homegoods-v2”, + “apparel-v2”, or “toys-v2” for better product search accuracy. It is recommended to migrate existing products to these categories as well. filter: 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. 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 '='. + 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) - ), + }, ) _sym_db.RegisterMessage(ProductSearchParams) ProductSearchResults = _reflection.GeneratedProtocolMessageType( "ProductSearchResults", (_message.Message,), - dict( - Result=_reflection.GeneratedProtocolMessageType( + { + "Result": _reflection.GeneratedProtocolMessageType( "Result", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCTSEARCHRESULTS_RESULT, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_pb2", - __doc__="""Information about a product. + { + "DESCRIPTOR": _PRODUCTSEARCHRESULTS_RESULT, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_pb2", + "__doc__": """Information about a product. + Attributes: product: The Product. @@ -557,38 +575,40 @@ closest match to the query. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.Result) - ), + }, ), - ObjectAnnotation=_reflection.GeneratedProtocolMessageType( + "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. + { + "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 + 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. + 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": _reflection.GeneratedProtocolMessageType( "GroupedResult", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCTSEARCHRESULTS_GROUPEDRESULT, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_pb2", - __doc__="""Information about the products similar to a single product in a query + { + "DESCRIPTOR": _PRODUCTSEARCHRESULTS_GROUPEDRESULT, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_pb2", + "__doc__": """Information about the products similar to a single product in a query image. + Attributes: bounding_poly: The bounding polygon around the product detected in the query @@ -600,11 +620,12 @@ box. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) - ), + }, ), - DESCRIPTOR=_PRODUCTSEARCHRESULTS, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_pb2", - __doc__="""Results for a product search request. + "DESCRIPTOR": _PRODUCTSEARCHRESULTS, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_pb2", + "__doc__": """Results for a product search request. + Attributes: index_time: Timestamp of the index which provided these results. Products @@ -620,7 +641,7 @@ union of all the per-product results. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSearchResults) - ), + }, ) _sym_db.RegisterMessage(ProductSearchResults) _sym_db.RegisterMessage(ProductSearchResults.Result) diff --git a/google/cloud/vision_v1p4beta1/proto/product_search_pb2_grpc.py b/google/cloud/vision_v1p4beta1/proto/product_search_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p4beta1/proto/product_search_pb2_grpc.py +++ b/google/cloud/vision_v1p4beta1/proto/product_search_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py b/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py index 53b16dae..0323a4fe 100644 --- a/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p4beta1/proto/product_search_service.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -35,12 +32,9 @@ name="google/cloud/vision_v1p4beta1/proto/product_search_service.proto", package="google.cloud.vision.v1p4beta1", syntax="proto3", - serialized_options=_b( - "\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\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' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p4beta1B\031ProductSearchServiceProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\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, @@ -61,6 +55,7 @@ full_name="google.cloud.vision.v1p4beta1.BatchOperationMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -68,18 +63,39 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="PROCESSING", index=1, number=1, serialized_options=None, type=None + name="PROCESSING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SUCCESSFUL", index=2, number=2, serialized_options=None, type=None + name="SUCCESSFUL", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILED", index=3, number=3, serialized_options=None, type=None + name="FAILED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=4, number=4, serialized_options=None, type=None + name="CANCELLED", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -96,6 +112,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -106,7 +123,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -114,6 +131,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -124,7 +142,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -132,6 +150,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -152,6 +171,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -162,7 +182,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -170,6 +190,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -180,7 +201,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -188,6 +209,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -198,7 +220,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -206,6 +228,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_category", @@ -216,14 +239,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\005"), + serialized_options=b"\340A\005", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_labels", @@ -242,14 +266,13 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_PRODUCT_KEYVALUE], + nested_types=[_PRODUCT_KEYVALUE,], enum_types=[], - serialized_options=_b( - "\352A[\n\035vision.googleapis.com/Product\022:projects/{project}/locations/{location}/products/{product}" - ), + serialized_options=b"\352A[\n\035vision.googleapis.com/Product\022:projects/{project}/locations/{location}/products/{product}", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -265,6 +288,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -275,7 +299,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -283,6 +307,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -293,7 +318,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -301,6 +326,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="index_time", @@ -317,8 +343,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="index_error", @@ -335,16 +362,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b( - "\352Ae\n vision.googleapis.com/ProductSet\022Aprojects/{project}/locations/{location}/productSets/{product_set}" - ), + serialized_options=b"\352Ae\n vision.googleapis.com/ProductSet\022Aprojects/{project}/locations/{location}/productSets/{product_set}", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -360,6 +386,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -370,7 +397,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -378,6 +405,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="uri", @@ -388,14 +416,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_polys", @@ -412,16 +441,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b( - "\352A\204\001\n$vision.googleapis.com/ReferenceImage\022\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" - ), + 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=[], @@ -437,6 +465,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -447,16 +476,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product", @@ -473,8 +501,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_id", @@ -485,7 +514,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -493,6 +522,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -514,6 +544,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -524,16 +555,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -552,6 +582,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -562,7 +593,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -570,6 +601,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -591,6 +623,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="products", @@ -609,6 +642,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -619,7 +653,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -627,6 +661,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -648,6 +683,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -658,17 +694,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -689,6 +724,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product", @@ -705,8 +741,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -725,6 +762,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -746,6 +784,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -756,17 +795,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -787,6 +825,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -797,16 +836,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_set", @@ -823,8 +861,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product_set_id", @@ -835,7 +874,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -843,6 +882,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -864,6 +904,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -874,16 +915,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -902,6 +942,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -912,7 +953,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -920,6 +961,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -941,6 +983,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product_sets", @@ -959,6 +1002,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -969,7 +1013,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -977,6 +1021,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -998,6 +1043,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1008,15 +1054,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1037,6 +1084,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product_set", @@ -1053,8 +1101,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="update_mask", @@ -1073,6 +1122,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1094,6 +1144,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1104,15 +1155,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1133,6 +1185,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1143,16 +1196,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reference_image", @@ -1169,8 +1221,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="reference_image_id", @@ -1181,7 +1234,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1189,6 +1242,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1210,6 +1264,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1220,16 +1275,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1248,6 +1302,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -1258,7 +1313,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1266,6 +1321,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1287,6 +1343,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="reference_images", @@ -1305,6 +1362,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1323,6 +1381,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -1333,7 +1392,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1341,6 +1400,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1362,6 +1422,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1372,17 +1433,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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$vision.googleapis.com/ReferenceImage" - ), + serialized_options=b"\340A\002\372A&\n$vision.googleapis.com/ReferenceImage", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1403,6 +1463,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1413,17 +1474,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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$vision.googleapis.com/ReferenceImage" - ), + serialized_options=b"\340A\002\372A&\n$vision.googleapis.com/ReferenceImage", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1444,6 +1504,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1454,14 +1515,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product", @@ -1472,16 +1534,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1503,6 +1564,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1513,14 +1575,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="product", @@ -1531,16 +1594,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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\037\n\035vision.googleapis.com/Product" - ), + serialized_options=b"\340A\002\372A\037\n\035vision.googleapis.com/Product", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1562,6 +1624,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1572,14 +1635,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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 vision.googleapis.com/ProductSet'), + serialized_options=b'\340A\002\372A"\n vision.googleapis.com/ProductSet', file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -1598,6 +1662,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -1608,7 +1673,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1616,6 +1681,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1637,6 +1703,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="products", @@ -1655,6 +1722,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -1665,7 +1733,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1673,6 +1741,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1694,6 +1763,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="csv_file_uri", @@ -1704,7 +1774,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1712,7 +1782,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1733,6 +1804,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -1751,7 +1823,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1766,8 +1839,9 @@ full_name="google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], serialized_start=3907, serialized_end=4028, @@ -1780,6 +1854,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1790,16 +1865,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_config", @@ -1816,8 +1890,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1839,6 +1914,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="reference_images", @@ -1857,6 +1933,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="statuses", @@ -1875,6 +1952,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1896,6 +1974,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="state", @@ -1914,6 +1993,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -1932,6 +2012,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -1950,11 +2031,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_BATCHOPERATIONMETADATA_STATE], + enum_types=[_BATCHOPERATIONMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -1971,6 +2053,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product_set_id", @@ -1981,7 +2064,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1989,7 +2072,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2010,6 +2094,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="product_set_purge_config", @@ -2028,6 +2113,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="delete_orphan_products", @@ -2046,6 +2132,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parent", @@ -2056,16 +2143,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + 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" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="force", @@ -2084,6 +2170,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2099,8 +2186,9 @@ full_name="google.cloud.vision.v1p4beta1.PurgeProductsRequest.target", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], serialized_start=4686, serialized_end=4916, @@ -2239,14 +2327,15 @@ Product = _reflection.GeneratedProtocolMessageType( "Product", (_message.Message,), - dict( - KeyValue=_reflection.GeneratedProtocolMessageType( + { + "KeyValue": _reflection.GeneratedProtocolMessageType( "KeyValue", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCT_KEYVALUE, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""A product label represented as a key-value pair. + { + "DESCRIPTOR": _PRODUCT_KEYVALUE, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """A product label represented as a key-value pair. + Attributes: key: The key of the label attached to the product. Cannot be empty @@ -2256,11 +2345,12 @@ empty and cannot exceed 128 bytes. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Product.KeyValue) - ), + }, ), - DESCRIPTOR=_PRODUCT, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""A Product contains ReferenceImages. + "DESCRIPTOR": _PRODUCT, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """A Product contains ReferenceImages. + Attributes: name: The resource name of the product. Format is: @@ -2274,24 +2364,24 @@ at most 4096 characters long. product_category: 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 + 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 - product\_labels. Note that integer values can be provided as - strings, e.g. "1199". Only strings with integer values can + product_labels. Note that integer values can be provided as + 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 500 product\_labels. Notice that the total - number of distinct product\_labels over all products in one + 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) - ), + }, ) _sym_db.RegisterMessage(Product) _sym_db.RegisterMessage(Product.KeyValue) @@ -2299,12 +2389,13 @@ ProductSet = _reflection.GeneratedProtocolMessageType( "ProductSet", (_message.Message,), - dict( - DESCRIPTOR=_PRODUCTSET, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""A ProductSet contains Products. A ProductSet can contain a maximum of + { + "DESCRIPTOR": _PRODUCTSET, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """A ProductSet contains Products. A ProductSet can contain a maximum of 1 million reference images. If the limit is exceeded, periodic indexing will fail. + Attributes: name: The resource name of the ProductSet. Format is: ``projects/PR @@ -2317,7 +2408,7 @@ Output only. The time at which this ProductSet was last indexed. Query results will reflect all updates before this time. If this ProductSet has never been indexed, this - timestamp is the default value "1970-01-01T00:00:00Z". This + timestamp is the default value “1970-01-01T00:00:00Z”. This field is ignored when creating a ProductSet. index_error: Output only. If there was an error with indexing the product @@ -2325,18 +2416,19 @@ creating a ProductSet. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ProductSet) - ), + }, ) _sym_db.RegisterMessage(ProductSet) ReferenceImage = _reflection.GeneratedProtocolMessageType( "ReferenceImage", (_message.Message,), - dict( - DESCRIPTOR=_REFERENCEIMAGE, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""A ``ReferenceImage`` represents a product image and its associated + { + "DESCRIPTOR": _REFERENCEIMAGE, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """A ``ReferenceImage`` represents a product image and its associated metadata, such as bounding boxes. + Attributes: name: The resource name of the reference image. Format is: ``proje @@ -2353,20 +2445,21 @@ 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). + aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ReferenceImage) - ), + }, ) _sym_db.RegisterMessage(ReferenceImage) CreateProductRequest = _reflection.GeneratedProtocolMessageType( "CreateProductRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEPRODUCTREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``CreateProduct`` method. + { + "DESCRIPTOR": _CREATEPRODUCTREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``CreateProduct`` method. + Attributes: parent: Required. The project in which the Product should be created. @@ -2377,21 +2470,22 @@ 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 error is returned with code - ALREADY\_EXISTS. Must be at most 128 characters long. It - cannot contain the character ``/``. + ALREADY_EXISTS. Must be at most 128 characters long. It cannot + contain the character ``/``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateProductRequest) - ), + }, ) _sym_db.RegisterMessage(CreateProductRequest) ListProductsRequest = _reflection.GeneratedProtocolMessageType( "ListProductsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProducts`` method. + { + "DESCRIPTOR": _LISTPRODUCTSREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ListProducts`` method. + Attributes: parent: Required. The project OR ProductSet from which Products should @@ -2400,21 +2494,22 @@ The maximum number of items to return. Default 10, maximum 100. page_token: - The next\_page\_token returned from a previous List request, - if any. + The next_page_token returned from a previous List request, if + any. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsRequest) - ), + }, ) _sym_db.RegisterMessage(ListProductsRequest) ListProductsResponse = _reflection.GeneratedProtocolMessageType( "ListProductsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProducts`` method. + { + "DESCRIPTOR": _LISTPRODUCTSRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ListProducts`` method. + Attributes: products: List of products. @@ -2423,73 +2518,77 @@ are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsResponse) - ), + }, ) _sym_db.RegisterMessage(ListProductsResponse) GetProductRequest = _reflection.GeneratedProtocolMessageType( "GetProductRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETPRODUCTREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``GetProduct`` method. + { + "DESCRIPTOR": _GETPRODUCTREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``GetProduct`` method. + Attributes: name: 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) - ), + }, ) _sym_db.RegisterMessage(GetProductRequest) UpdateProductRequest = _reflection.GeneratedProtocolMessageType( "UpdateProductRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEPRODUCTREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``UpdateProduct`` method. + { + "DESCRIPTOR": _UPDATEPRODUCTREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``UpdateProduct`` method. + Attributes: product: 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 + which fields to update. If update_mask isn’t specified, all mutable fields are to be updated. Valid mask paths include ``product_labels``, ``display_name``, and ``description``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.UpdateProductRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateProductRequest) DeleteProductRequest = _reflection.GeneratedProtocolMessageType( "DeleteProductRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEPRODUCTREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``DeleteProduct`` method. + { + "DESCRIPTOR": _DELETEPRODUCTREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``DeleteProduct`` method. + Attributes: name: 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) - ), + }, ) _sym_db.RegisterMessage(DeleteProductRequest) CreateProductSetRequest = _reflection.GeneratedProtocolMessageType( "CreateProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``CreateProductSet`` method. + { + "DESCRIPTOR": _CREATEPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``CreateProductSet`` method. + Attributes: parent: Required. The project in which the ProductSet should be @@ -2500,21 +2599,22 @@ 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 error is returned with code - ALREADY\_EXISTS. Must be at most 128 characters long. It - cannot contain the character ``/``. + ALREADY_EXISTS. Must be at most 128 characters long. It cannot + contain the character ``/``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(CreateProductSetRequest) ListProductSetsRequest = _reflection.GeneratedProtocolMessageType( "ListProductSetsRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSETSREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProductSets`` method. + { + "DESCRIPTOR": _LISTPRODUCTSETSREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ListProductSets`` method. + Attributes: parent: Required. The project from which ProductSets should be listed. @@ -2523,21 +2623,22 @@ The maximum number of items to return. Default 10, maximum 100. page_token: - The next\_page\_token returned from a previous List request, - if any. + The next_page_token returned from a previous List request, if + any. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductSetsRequest) - ), + }, ) _sym_db.RegisterMessage(ListProductSetsRequest) ListProductSetsResponse = _reflection.GeneratedProtocolMessageType( "ListProductSetsResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSETSRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProductSets`` method. + { + "DESCRIPTOR": _LISTPRODUCTSETSRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ListProductSets`` method. + Attributes: product_sets: List of ProductSets. @@ -2546,17 +2647,18 @@ are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductSetsResponse) - ), + }, ) _sym_db.RegisterMessage(ListProductSetsResponse) GetProductSetRequest = _reflection.GeneratedProtocolMessageType( "GetProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``GetProductSet`` method. + { + "DESCRIPTOR": _GETPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``GetProductSet`` method. + Attributes: name: Required. Resource name of the ProductSet to get. Format is: @@ -2564,39 +2666,41 @@ _ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(GetProductSetRequest) UpdateProductSetRequest = _reflection.GeneratedProtocolMessageType( "UpdateProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_UPDATEPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``UpdateProductSet`` method. + { + "DESCRIPTOR": _UPDATEPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``UpdateProductSet`` method. + Attributes: product_set: 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 + which fields to update. If update_mask isn’t specified, all mutable fields are to be updated. Valid mask path is ``display_name``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.UpdateProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(UpdateProductSetRequest) DeleteProductSetRequest = _reflection.GeneratedProtocolMessageType( "DeleteProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``DeleteProductSet`` method. + { + "DESCRIPTOR": _DELETEPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``DeleteProductSet`` method. + Attributes: name: Required. Resource name of the ProductSet to delete. Format @@ -2604,17 +2708,18 @@ _SET_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteProductSetRequest) CreateReferenceImageRequest = _reflection.GeneratedProtocolMessageType( "CreateReferenceImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEREFERENCEIMAGEREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``CreateReferenceImage`` method. + { + "DESCRIPTOR": _CREATEREFERENCEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``CreateReferenceImage`` method. + Attributes: parent: Required. Resource name of the product in which to create the @@ -2627,21 +2732,22 @@ 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 already in use, an error is returned - with code ALREADY\_EXISTS. Must be at most 128 characters - long. It cannot contain the character ``/``. + with code ALREADY_EXISTS. Must be at most 128 characters long. + It cannot contain the character ``/``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) - ), + }, ) _sym_db.RegisterMessage(CreateReferenceImageRequest) ListReferenceImagesRequest = _reflection.GeneratedProtocolMessageType( "ListReferenceImagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTREFERENCEIMAGESREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListReferenceImages`` method. + { + "DESCRIPTOR": _LISTREFERENCEIMAGESREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ListReferenceImages`` method. + Attributes: parent: Required. Resource name of the product containing the @@ -2657,17 +2763,18 @@ not specified. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) - ), + }, ) _sym_db.RegisterMessage(ListReferenceImagesRequest) ListReferenceImagesResponse = _reflection.GeneratedProtocolMessageType( "ListReferenceImagesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTREFERENCEIMAGESRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListReferenceImages`` method. + { + "DESCRIPTOR": _LISTREFERENCEIMAGESRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ListReferenceImages`` method. + Attributes: reference_images: The list of reference images. @@ -2675,21 +2782,22 @@ The maximum number of items to return. Default 10, maximum 100. next_page_token: - The next\_page\_token returned from a previous List request, - if any. + The next_page_token returned from a previous List request, if + any. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) - ), + }, ) _sym_db.RegisterMessage(ListReferenceImagesResponse) GetReferenceImageRequest = _reflection.GeneratedProtocolMessageType( "GetReferenceImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETREFERENCEIMAGEREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``GetReferenceImage`` method. + { + "DESCRIPTOR": _GETREFERENCEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``GetReferenceImage`` method. + Attributes: name: Required. The resource name of the ReferenceImage to get. @@ -2697,17 +2805,18 @@ ODUCT_ID/referenceImages/IMAGE_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetReferenceImageRequest) - ), + }, ) _sym_db.RegisterMessage(GetReferenceImageRequest) DeleteReferenceImageRequest = _reflection.GeneratedProtocolMessageType( "DeleteReferenceImageRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEREFERENCEIMAGEREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``DeleteReferenceImage`` method. + { + "DESCRIPTOR": _DELETEREFERENCEIMAGEREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``DeleteReferenceImage`` method. + Attributes: name: Required. The resource name of the reference image to delete. @@ -2715,17 +2824,18 @@ ODUCT_ID/referenceImages/IMAGE_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteReferenceImageRequest) AddProductToProductSetRequest = _reflection.GeneratedProtocolMessageType( "AddProductToProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_ADDPRODUCTTOPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``AddProductToProductSet`` method. + { + "DESCRIPTOR": _ADDPRODUCTTOPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``AddProductToProductSet`` method. + Attributes: name: Required. The resource name for the ProductSet to modify. @@ -2737,17 +2847,18 @@ ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(AddProductToProductSetRequest) RemoveProductFromProductSetRequest = _reflection.GeneratedProtocolMessageType( "RemoveProductFromProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_REMOVEPRODUCTFROMPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``RemoveProductFromProductSet`` method. + { + "DESCRIPTOR": _REMOVEPRODUCTFROMPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``RemoveProductFromProductSet`` method. + Attributes: name: Required. The resource name for the ProductSet to modify. @@ -2759,17 +2870,18 @@ ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(RemoveProductFromProductSetRequest) ListProductsInProductSetRequest = _reflection.GeneratedProtocolMessageType( "ListProductsInProductSetRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProductsInProductSet`` method. + { + "DESCRIPTOR": _LISTPRODUCTSINPRODUCTSETREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ListProductsInProductSet`` method. + Attributes: name: Required. The ProductSet resource for which to retrieve @@ -2779,21 +2891,22 @@ The maximum number of items to return. Default 10, maximum 100. page_token: - The next\_page\_token returned from a previous List request, - if any. + The next_page_token returned from a previous List request, if + any. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) - ), + }, ) _sym_db.RegisterMessage(ListProductsInProductSetRequest) ListProductsInProductSetResponse = _reflection.GeneratedProtocolMessageType( "ListProductsInProductSetResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProductsInProductSet`` method. + { + "DESCRIPTOR": _LISTPRODUCTSINPRODUCTSETRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ListProductsInProductSet`` method. + Attributes: products: The list of Products. @@ -2802,18 +2915,19 @@ are no more results in the list. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) - ), + }, ) _sym_db.RegisterMessage(ListProductsInProductSetResponse) ImportProductSetsGcsSource = _reflection.GeneratedProtocolMessageType( "ImportProductSetsGcsSource", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTPRODUCTSETSGCSSOURCE, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""The Google Cloud Storage location for a csv file which preserves a + { + "DESCRIPTOR": _IMPORTPRODUCTSETSGCSSOURCE, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line. + Attributes: csv_file_uri: The Google Cloud Storage URI of the input csv file. The URI @@ -2828,24 +2942,23 @@ id`` and ``product-id`` values does not exist, then the system will create a new ``ProductSet`` or ``Product`` for the image. In this case, the ``product-display-name`` column refers to [d - isplay\_name][google.cloud.vision.v1p4beta1.Product.display\_n - ame], the ``product-category`` column refers to [product\_cate - gory][google.cloud.vision.v1p4beta1.Product.product\_category] - , and the ``labels`` column refers to [product\_labels][google - .cloud.vision.v1p4beta1.Product.product\_labels]. The - ``image-id`` column is optional but must be unique if - provided. If it is empty, the system will automatically assign - a unique id to the image. The ``product-display-name`` column - is optional. If it is empty, the system sets the [display\_nam - e][google.cloud.vision.v1p4beta1.Product.display\_name] field - for the product to a space (" "). You can update the - ``display_name`` later by using the API. If a ``Product`` - with the specified ``product-id`` already exists, then the - system ignores the ``product-display-name``, ``product- - category``, and ``labels`` columns. The ``labels`` column - (optional) is a line containing a list of comma-separated key- - value pairs, in the following format: :: - "key_1=value_1,key_2=value_2,...,key_n=value_n" The + isplay_name][google.cloud.vision.v1p4beta1.Product.display_nam + e], the ``product-category`` column refers to [product_categor + y][google.cloud.vision.v1p4beta1.Product.product_category], + and the ``labels`` column refers to [product_labels][google.cl + oud.vision.v1p4beta1.Product.product_labels]. The ``image- + id`` column is optional but must be unique if provided. If it + is empty, the system will automatically assign a unique id to + the image. The ``product-display-name`` column is optional. + If it is empty, the system sets the [display_name][google.clou + d.vision.v1p4beta1.Product.display_name] field for the product + to a space (" "). You can update the ``display_name`` later by + using the API. If a ``Product`` with the specified ``product- + id`` already exists, then the system ignores the ``product- + display-name``, ``product-category``, and ``labels`` columns. + The ``labels`` column (optional) is a line containing a list + of comma-separated key-value pairs, in the following format: + :: "key_1=value_1,key_2=value_2,...,key_n=value_n" The ``bounding-poly`` column (optional) identifies one region of interest from the image in the same manner as ``CreateReferenceImage``. If you do not specify the @@ -2856,25 +2969,25 @@ includes the same product information, and the ``bounding- poly`` values for each region of interest. The ``bounding- poly`` column must contain an even number of comma-separated - numbers, in the format - "p1\_x,p1\_y,p2\_x,p2\_y,...,pn\_x,pn\_y". Use non-negative - integers for absolute bounding polygons, and float values in - [0, 1] for normalized bounding polygons. The system will - resize the image if the image resolution is too large to - process (larger than 20MP). + numbers, in the format “p1_x,p1_y,p2_x,p2_y,…,pn_x,pn_y”. Use + non-negative integers for absolute bounding polygons, and + float values in [0, 1] for normalized bounding polygons. The + system will resize the image if the image resolution is too + large to process (larger than 20MP). """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) - ), + }, ) _sym_db.RegisterMessage(ImportProductSetsGcsSource) ImportProductSetsInputConfig = _reflection.GeneratedProtocolMessageType( "ImportProductSetsInputConfig", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTPRODUCTSETSINPUTCONFIG, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""The input content for the ``ImportProductSets`` method. + { + "DESCRIPTOR": _IMPORTPRODUCTSETSINPUTCONFIG, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """The input content for the ``ImportProductSets`` method. + Attributes: source: The source of the input. @@ -2883,17 +2996,18 @@ preserves a list of ImportProductSetRequests in each line. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) - ), + }, ) _sym_db.RegisterMessage(ImportProductSetsInputConfig) ImportProductSetsRequest = _reflection.GeneratedProtocolMessageType( "ImportProductSetsRequest", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTPRODUCTSETSREQUEST, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ImportProductSets`` method. + { + "DESCRIPTOR": _IMPORTPRODUCTSETSREQUEST, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Request message for the ``ImportProductSets`` method. + Attributes: parent: Required. The project in which the ProductSets should be @@ -2902,24 +3016,25 @@ Required. The input content for the list of requests. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsRequest) - ), + }, ) _sym_db.RegisterMessage(ImportProductSetsRequest) ImportProductSetsResponse = _reflection.GeneratedProtocolMessageType( "ImportProductSetsResponse", (_message.Message,), - dict( - DESCRIPTOR=_IMPORTPRODUCTSETSRESPONSE, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ImportProductSets`` method. This message + { + "DESCRIPTOR": _IMPORTPRODUCTSETSRESPONSE, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Response message for the ``ImportProductSets`` method. This message is returned by the [google.longrunning.Operations.GetOperation][google .longrunning.Operations.GetOperation] method in the returned [google.l ongrunning.Operation.response][google.longrunning.Operation.response] field. + Attributes: reference_images: - The list of reference\_images that are imported successfully. + The list of reference_images that are imported successfully. statuses: The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here @@ -2928,20 +3043,21 @@ line of the csv, starting from line 0. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.ImportProductSetsResponse) - ), + }, ) _sym_db.RegisterMessage(ImportProductSetsResponse) BatchOperationMetadata = _reflection.GeneratedProtocolMessageType( "BatchOperationMetadata", (_message.Message,), - dict( - DESCRIPTOR=_BATCHOPERATIONMETADATA, - __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Metadata for the batch operations such as the current state. This is + { + "DESCRIPTOR": _BATCHOPERATIONMETADATA, + "__module__": "google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", + "__doc__": """Metadata for the batch operations such as the current state. This is included in the ``metadata`` field of the ``Operation`` returned by the ``GetOperation`` call of the ``google::longrunning::Operations`` service. + Attributes: state: The current state of the batch operation. @@ -2953,43 +3069,45 @@ set to true. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchOperationMetadata) - ), + }, ) _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 + { + "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 + 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. + { + "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 + 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 @@ -3000,7 +3118,7 @@ actually perform the purge. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.PurgeProductsRequest) - ), + }, ) _sym_db.RegisterMessage(PurgeProductsRequest) @@ -3045,9 +3163,8 @@ full_name="google.cloud.vision.v1p4beta1.ProductSearch", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" - ), + serialized_options=b"\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision", + create_key=_descriptor._internal_create_key, serialized_start=4919, serialized_end=9097, methods=[ @@ -3058,9 +3175,8 @@ containing_service=None, input_type=_CREATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, - serialized_options=_b( - '\202\323\344\223\002E"6/v1p4beta1/{parent=projects/*/locations/*}/productSets:\013product_set\332A!parent,product_set,product_set_id' - ), + serialized_options=b'\202\323\344\223\002E"6/v1p4beta1/{parent=projects/*/locations/*}/productSets:\013product_set\332A!parent,product_set,product_set_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProductSets", @@ -3069,9 +3185,8 @@ containing_service=None, input_type=_LISTPRODUCTSETSREQUEST, output_type=_LISTPRODUCTSETSRESPONSE, - serialized_options=_b( - "\202\323\344\223\0028\0226/v1p4beta1/{parent=projects/*/locations/*}/productSets\332A\006parent" - ), + serialized_options=b"\202\323\344\223\0028\0226/v1p4beta1/{parent=projects/*/locations/*}/productSets\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetProductSet", @@ -3080,9 +3195,8 @@ containing_service=None, input_type=_GETPRODUCTSETREQUEST, output_type=_PRODUCTSET, - serialized_options=_b( - "\202\323\344\223\0028\0226/v1p4beta1/{name=projects/*/locations/*/productSets/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0028\0226/v1p4beta1/{name=projects/*/locations/*/productSets/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateProductSet", @@ -3091,9 +3205,8 @@ containing_service=None, input_type=_UPDATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, - serialized_options=_b( - "\202\323\344\223\002Q2B/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set\332A\027product_set,update_mask" - ), + serialized_options=b"\202\323\344\223\002Q2B/v1p4beta1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set\332A\027product_set,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteProductSet", @@ -3102,9 +3215,8 @@ containing_service=None, 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/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0028*6/v1p4beta1/{name=projects/*/locations/*/productSets/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateProduct", @@ -3113,9 +3225,8 @@ containing_service=None, input_type=_CREATEPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - '\202\323\344\223\002>"3/v1p4beta1/{parent=projects/*/locations/*}/products:\007product\332A\031parent,product,product_id' - ), + serialized_options=b'\202\323\344\223\002>"3/v1p4beta1/{parent=projects/*/locations/*}/products:\007product\332A\031parent,product,product_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProducts", @@ -3124,9 +3235,8 @@ containing_service=None, input_type=_LISTPRODUCTSREQUEST, output_type=_LISTPRODUCTSRESPONSE, - serialized_options=_b( - "\202\323\344\223\0025\0223/v1p4beta1/{parent=projects/*/locations/*}/products\332A\006parent" - ), + serialized_options=b"\202\323\344\223\0025\0223/v1p4beta1/{parent=projects/*/locations/*}/products\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetProduct", @@ -3135,9 +3245,8 @@ containing_service=None, input_type=_GETPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - "\202\323\344\223\0025\0223/v1p4beta1/{name=projects/*/locations/*/products/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0025\0223/v1p4beta1/{name=projects/*/locations/*/products/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="UpdateProduct", @@ -3146,9 +3255,8 @@ containing_service=None, input_type=_UPDATEPRODUCTREQUEST, output_type=_PRODUCT, - serialized_options=_b( - "\202\323\344\223\002F2;/v1p4beta1/{product.name=projects/*/locations/*/products/*}:\007product\332A\023product,update_mask" - ), + serialized_options=b"\202\323\344\223\002F2;/v1p4beta1/{product.name=projects/*/locations/*/products/*}:\007product\332A\023product,update_mask", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteProduct", @@ -3157,9 +3265,8 @@ containing_service=None, 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/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0025*3/v1p4beta1/{name=projects/*/locations/*/products/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateReferenceImage", @@ -3168,9 +3275,8 @@ containing_service=None, input_type=_CREATEREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, - serialized_options=_b( - '\202\323\344\223\002X"E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image\332A)parent,reference_image,reference_image_id' - ), + serialized_options=b'\202\323\344\223\002X"E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image\332A)parent,reference_image,reference_image_id', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteReferenceImage", @@ -3179,9 +3285,8 @@ containing_service=None, 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/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002G*E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListReferenceImages", @@ -3190,9 +3295,8 @@ containing_service=None, input_type=_LISTREFERENCEIMAGESREQUEST, output_type=_LISTREFERENCEIMAGESRESPONSE, - serialized_options=_b( - "\202\323\344\223\002G\022E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages\332A\006parent" - ), + serialized_options=b"\202\323\344\223\002G\022E/v1p4beta1/{parent=projects/*/locations/*/products/*}/referenceImages\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetReferenceImage", @@ -3201,9 +3305,8 @@ containing_service=None, input_type=_GETREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, - serialized_options=_b( - "\202\323\344\223\002G\022E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\002G\022E/v1p4beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="AddProductToProductSet", @@ -3212,9 +3315,8 @@ containing_service=None, 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*\332A\014name,product' - ), + serialized_options=b'\202\323\344\223\002F"A/v1p4beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\001*\332A\014name,product', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="RemoveProductFromProductSet", @@ -3223,9 +3325,8 @@ containing_service=None, 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*\332A\014name,product' - ), + serialized_options=b'\202\323\344\223\002I"D/v1p4beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\001*\332A\014name,product', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListProductsInProductSet", @@ -3234,9 +3335,8 @@ containing_service=None, input_type=_LISTPRODUCTSINPRODUCTSETREQUEST, output_type=_LISTPRODUCTSINPRODUCTSETRESPONSE, - serialized_options=_b( - "\202\323\344\223\002A\022?/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products\332A\004name" - ), + serialized_options=b"\202\323\344\223\002A\022?/v1p4beta1/{name=projects/*/locations/*/productSets/*}/products\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ImportProductSets", @@ -3245,9 +3345,8 @@ containing_service=None, 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*\332A\023parent,input_config\312A3\n\031ImportProductSetsResponse\022\026BatchOperationMetadata' - ), + serialized_options=b'\202\323\344\223\002B"=/v1p4beta1/{parent=projects/*/locations/*}/productSets:import:\001*\332A\023parent,input_config\312A3\n\031ImportProductSetsResponse\022\026BatchOperationMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="PurgeProducts", @@ -3256,9 +3355,8 @@ 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' - ), + 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', + create_key=_descriptor._internal_create_key, ), ], ) 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..542268e6 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 @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.vision_v1p4beta1.proto import ( @@ -12,31 +13,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 +137,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 +171,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 +183,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 +218,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 +232,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 +243,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 +275,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 +286,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 +311,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 +324,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 +337,91 @@ 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. - """ + """ 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!") @@ -528,3 +529,539 @@ def add_ProductSearchServicer_to_server(servicer, server): "google.cloud.vision.v1p4beta1.ProductSearch", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class ProductSearch(object): + """Manages Products and ProductSets of reference images for use in product + search. It uses the following resource model: + + - The API has a collection of + [ProductSet][google.cloud.vision.v1p4beta1.ProductSet] resources, named + `projects/*/locations/*/productSets/*`, which acts as a way to put different + products into groups to limit identification. + + In parallel, + + - The API has a collection of + [Product][google.cloud.vision.v1p4beta1.Product] resources, named + `projects/*/locations/*/products/*` + + - Each [Product][google.cloud.vision.v1p4beta1.Product] has a collection of + [ReferenceImage][google.cloud.vision.v1p4beta1.ReferenceImage] resources, + named + `projects/*/locations/*/products/*/referenceImages/*` + """ + + @staticmethod + def CreateProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/CreateProductSet", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.CreateProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProductSets( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/ListProductSets", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ListProductSetsRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ListProductSetsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/GetProductSet", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.GetProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/UpdateProductSet", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.UpdateProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ProductSet.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/DeleteProductSet", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.DeleteProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/CreateProduct", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.CreateProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProducts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/ListProducts", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ListProductsRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ListProductsResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/GetProduct", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.GetProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def UpdateProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/UpdateProduct", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.UpdateProductRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.Product.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteProduct( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/DeleteProduct", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.DeleteProductRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/CreateReferenceImage", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.CreateReferenceImageRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ReferenceImage.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/DeleteReferenceImage", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.DeleteReferenceImageRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListReferenceImages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/ListReferenceImages", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ListReferenceImagesRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ListReferenceImagesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetReferenceImage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/GetReferenceImage", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.GetReferenceImageRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ReferenceImage.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def AddProductToProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/AddProductToProductSet", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.AddProductToProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def RemoveProductFromProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/RemoveProductFromProductSet", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.RemoveProductFromProductSetRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListProductsInProductSet( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/ListProductsInProductSet", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ListProductsInProductSetRequest.SerializeToString, + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ListProductsInProductSetResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ImportProductSets( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/ImportProductSets", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.ImportProductSetsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def PurgeProducts( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.vision.v1p4beta1.ProductSearch/PurgeProducts", + google_dot_cloud_dot_vision__v1p4beta1_dot_proto_dot_product__search__service__pb2.PurgeProductsRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py b/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py index aa8abe22..f5446f09 100644 --- a/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p4beta1/proto/text_annotation.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -25,12 +22,9 @@ name="google/cloud/vision_v1p4beta1/proto/text_annotation.proto", package="google.cloud.vision.v1p4beta1", syntax="proto3", - serialized_options=_b( - "\n!com.google.cloud.vision.v1p4beta1B\023TextAnnotationProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN" - ), - serialized_pb=_b( - '\n9google/cloud/vision_v1p4beta1/proto/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p4beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p4beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p4beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p4beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p4beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p4beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x89\x01\n!com.google.cloud.vision.v1p4beta1B\x13TextAnnotationProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' - ), + serialized_options=b"\n!com.google.cloud.vision.v1p4beta1B\023TextAnnotationProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n9google/cloud/vision_v1p4beta1/proto/text_annotation.proto\x12\x1dgoogle.cloud.vision.v1p4beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/cloud/vision_v1p4beta1/proto/geometry.proto"\xb2\x04\n\x0eTextAnnotation\x12\x32\n\x05pages\x18\x01 \x03(\x0b\x32#.google.cloud.vision.v1p4beta1.Page\x12\x0c\n\x04text\x18\x02 \x01(\t\x1a=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x1a\xdc\x01\n\rDetectedBreak\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType\x12\x11\n\tis_prefix\x18\x02 \x01(\x08"c\n\tBreakType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\x0e\n\nSURE_SPACE\x10\x02\x12\x12\n\x0e\x45OL_SURE_SPACE\x10\x03\x12\n\n\x06HYPHEN\x10\x04\x12\x0e\n\nLINE_BREAK\x10\x05\x1a\xbf\x01\n\x0cTextProperty\x12Z\n\x12\x64\x65tected_languages\x18\x01 \x03(\x0b\x32>.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage\x12S\n\x0e\x64\x65tected_break\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak"\xbd\x01\n\x04Page\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\x34\n\x06\x62locks\x18\x04 \x03(\x0b\x32$.google.cloud.vision.v1p4beta1.Block\x12\x12\n\nconfidence\x18\x05 \x01(\x02"\x82\x03\n\x05\x42lock\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12<\n\nparagraphs\x18\x03 \x03(\x0b\x32(.google.cloud.vision.v1p4beta1.Paragraph\x12\x42\n\nblock_type\x18\x04 \x01(\x0e\x32..google.cloud.vision.v1p4beta1.Block.BlockType\x12\x12\n\nconfidence\x18\x05 \x01(\x02"R\n\tBlockType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04TEXT\x10\x01\x12\t\n\x05TABLE\x10\x02\x12\x0b\n\x07PICTURE\x10\x03\x12\t\n\x05RULER\x10\x04\x12\x0b\n\x07\x42\x41RCODE\x10\x05"\xe4\x01\n\tParagraph\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x32\n\x05words\x18\x03 \x03(\x0b\x32#.google.cloud.vision.v1p4beta1.Word\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xe3\x01\n\x04Word\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x36\n\x07symbols\x18\x03 \x03(\x0b\x32%.google.cloud.vision.v1p4beta1.Symbol\x12\x12\n\nconfidence\x18\x04 \x01(\x02"\xbb\x01\n\x06Symbol\x12L\n\x08property\x18\x01 \x01(\x0b\x32:.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty\x12\x41\n\x0c\x62ounding_box\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.BoundingPoly\x12\x0c\n\x04text\x18\x03 \x01(\t\x12\x12\n\nconfidence\x18\x04 \x01(\x02\x42\x89\x01\n!com.google.cloud.vision.v1p4beta1B\x13TextAnnotationProtoP\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, @@ -43,24 +37,55 @@ full_name="google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SPACE", index=1, number=1, serialized_options=None, type=None + name="SPACE", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SURE_SPACE", index=2, number=2, serialized_options=None, type=None + name="SURE_SPACE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="EOL_SURE_SPACE", index=3, number=3, serialized_options=None, type=None + name="EOL_SURE_SPACE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="HYPHEN", index=4, number=4, serialized_options=None, type=None + name="HYPHEN", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="LINE_BREAK", index=5, number=5, serialized_options=None, type=None + name="LINE_BREAK", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -75,24 +100,55 @@ full_name="google.cloud.vision.v1p4beta1.Block.BlockType", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( - name="UNKNOWN", index=0, number=0, serialized_options=None, type=None + name="UNKNOWN", + index=0, + number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TEXT", index=1, number=1, serialized_options=None, type=None + name="TEXT", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="TABLE", index=2, number=2, serialized_options=None, type=None + name="TABLE", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="PICTURE", index=3, number=3, serialized_options=None, type=None + name="PICTURE", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RULER", index=4, number=4, serialized_options=None, type=None + name="RULER", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="BARCODE", index=5, number=5, serialized_options=None, type=None + name="BARCODE", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, @@ -109,6 +165,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_code", @@ -119,7 +176,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -127,6 +184,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -145,6 +203,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -165,6 +224,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="type", @@ -183,6 +243,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="is_prefix", @@ -201,11 +262,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_TEXTANNOTATION_DETECTEDBREAK_BREAKTYPE], + enum_types=[_TEXTANNOTATION_DETECTEDBREAK_BREAKTYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -221,6 +283,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="detected_languages", @@ -239,6 +302,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detected_break", @@ -257,6 +321,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -277,6 +342,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="pages", @@ -295,6 +361,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -305,7 +372,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -313,6 +380,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -338,6 +406,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -356,6 +425,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="width", @@ -374,6 +444,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="height", @@ -392,6 +463,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="blocks", @@ -410,6 +482,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -428,6 +501,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -449,6 +523,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -467,6 +542,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -485,6 +561,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="paragraphs", @@ -503,6 +580,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="block_type", @@ -521,6 +599,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -539,11 +618,12 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_BLOCK_BLOCKTYPE], + enum_types=[_BLOCK_BLOCKTYPE,], serialized_options=None, is_extendable=False, syntax="proto3", @@ -560,6 +640,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -578,6 +659,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -596,6 +678,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="words", @@ -614,6 +697,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -632,6 +716,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -653,6 +738,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -671,6 +757,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -689,6 +776,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="symbols", @@ -707,6 +795,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -725,6 +814,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -746,6 +836,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="property", @@ -764,6 +855,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="bounding_box", @@ -782,6 +874,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="text", @@ -792,7 +885,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -800,6 +893,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -818,6 +912,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -888,32 +983,34 @@ TextAnnotation = _reflection.GeneratedProtocolMessageType( "TextAnnotation", (_message.Message,), - dict( - DetectedLanguage=_reflection.GeneratedProtocolMessageType( + { + "DetectedLanguage": _reflection.GeneratedProtocolMessageType( "DetectedLanguage", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_DETECTEDLANGUAGE, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""Detected language for a structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_DETECTEDLANGUAGE, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """Detected language for a structural component. + Attributes: language_code: - The BCP-47 language code, such as "en-US" or "sr-Latn". For + 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. + code_locale_identifier. confidence: Confidence of detected language. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) - ), + }, ), - DetectedBreak=_reflection.GeneratedProtocolMessageType( + "DetectedBreak": _reflection.GeneratedProtocolMessageType( "DetectedBreak", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_DETECTEDBREAK, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""Detected start or end of a structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_DETECTEDBREAK, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """Detected start or end of a structural component. + Attributes: type: Detected break type. @@ -921,15 +1018,16 @@ True if break prepends the element. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) - ), + }, ), - TextProperty=_reflection.GeneratedProtocolMessageType( + "TextProperty": _reflection.GeneratedProtocolMessageType( "TextProperty", (_message.Message,), - dict( - DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + { + "DESCRIPTOR": _TEXTANNOTATION_TEXTPROPERTY, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """Additional information detected on the structural component. + Attributes: detected_languages: A list of detected languages together with confidence. @@ -937,11 +1035,11 @@ Detected start or end of a text segment. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) - ), + }, ), - DESCRIPTOR=_TEXTANNOTATION, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""TextAnnotation contains a structured representation of OCR extracted + "DESCRIPTOR": _TEXTANNOTATION, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own @@ -949,6 +1047,7 @@ Please refer to the [TextAnnotation.TextProperty][google.cloud.vision. v1p4beta1.TextAnnotation.TextProperty] message definition below for more detail. + Attributes: pages: List of pages detected by OCR. @@ -956,7 +1055,7 @@ UTF-8 text detected on the pages. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.TextAnnotation) - ), + }, ) _sym_db.RegisterMessage(TextAnnotation) _sym_db.RegisterMessage(TextAnnotation.DetectedLanguage) @@ -966,10 +1065,11 @@ Page = _reflection.GeneratedProtocolMessageType( "Page", (_message.Message,), - dict( - DESCRIPTOR=_PAGE, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""Detected page from OCR. + { + "DESCRIPTOR": _PAGE, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """Detected page from OCR. + Attributes: property: Additional information detected on the page. @@ -985,17 +1085,18 @@ Confidence of the OCR results on the page. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Page) - ), + }, ) _sym_db.RegisterMessage(Page) Block = _reflection.GeneratedProtocolMessageType( "Block", (_message.Message,), - dict( - DESCRIPTOR=_BLOCK, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""Logical element on the page. + { + "DESCRIPTOR": _BLOCK, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """Logical element on the page. + Attributes: property: Additional information detected for the block. @@ -1004,12 +1105,12 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - text is read in the 'natural' orientation. For example: - + 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 + 0----1 | | 3----2 - when it’s rotated 180 degrees around the top-left corner it becomes: :: - 2----3 | | 1----0 and the vertex order will - still be (0, 1, 2, 3). + 2----3 | | 1----0 and the vertex order + will still be (0, 1, 2, 3). paragraphs: List of paragraphs in this block (if this blocks is of type text). @@ -1019,18 +1120,19 @@ Confidence of the OCR results on the block. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Block) - ), + }, ) _sym_db.RegisterMessage(Block) Paragraph = _reflection.GeneratedProtocolMessageType( "Paragraph", (_message.Message,), - dict( - DESCRIPTOR=_PARAGRAPH, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain + { + "DESCRIPTOR": _PARAGRAPH, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """Structural unit of text representing a number of words in certain order. + Attributes: property: Additional information detected for the paragraph. @@ -1039,28 +1141,29 @@ order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 vertex order - will still be (0, 1, 2, 3). + 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 vertex order will + still be (0, 1, 2, 3). words: List of all words in this paragraph. confidence: Confidence of the OCR results for the paragraph. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Paragraph) - ), + }, ) _sym_db.RegisterMessage(Paragraph) Word = _reflection.GeneratedProtocolMessageType( "Word", (_message.Message,), - dict( - DESCRIPTOR=_WORD, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""A word representation. + { + "DESCRIPTOR": _WORD, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """A word representation. + Attributes: property: Additional information detected for the word. @@ -1069,11 +1172,11 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 vertex order - will still be (0, 1, 2, 3). + 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 vertex order will + still be (0, 1, 2, 3). symbols: List of symbols in the word. The order of the symbols follows the natural reading order. @@ -1081,17 +1184,18 @@ Confidence of the OCR results for the word. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Word) - ), + }, ) _sym_db.RegisterMessage(Word) Symbol = _reflection.GeneratedProtocolMessageType( "Symbol", (_message.Message,), - dict( - DESCRIPTOR=_SYMBOL, - __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""A single symbol representation. + { + "DESCRIPTOR": _SYMBOL, + "__module__": "google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", + "__doc__": """A single symbol representation. + Attributes: property: Additional information detected for the symbol. @@ -1100,18 +1204,18 @@ of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the - 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 vertex order - will still be (0, 1, 2, 3). + 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 vertex order will + still be (0, 1, 2, 3). text: The actual UTF-8 representation of the symbol. confidence: Confidence of the OCR results for the symbol. Range [0, 1]. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.Symbol) - ), + }, ) _sym_db.RegisterMessage(Symbol) diff --git a/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2_grpc.py b/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2_grpc.py +++ b/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/google/cloud/vision_v1p4beta1/proto/web_detection_pb2.py b/google/cloud/vision_v1p4beta1/proto/web_detection_pb2.py index 2503b1fe..069cac3a 100644 --- a/google/cloud/vision_v1p4beta1/proto/web_detection_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/web_detection_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/vision_v1p4beta1/proto/web_detection.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -22,13 +19,10 @@ name="google/cloud/vision_v1p4beta1/proto/web_detection.proto", package="google.cloud.vision.v1p4beta1", syntax="proto3", - serialized_options=_b( - "\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\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], + serialized_options=b"\n!com.google.cloud.vision.v1p4beta1B\021WebDetectionProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\370\001\001\242\002\004GCVN", + create_key=_descriptor._internal_create_key, + 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\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,], ) @@ -38,6 +32,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="entity_id", @@ -48,7 +43,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -56,6 +51,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -74,6 +70,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="description", @@ -84,7 +81,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -92,6 +89,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -112,6 +110,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -122,7 +121,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -130,6 +129,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -148,6 +148,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -168,6 +169,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="url", @@ -178,7 +180,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -186,6 +188,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="score", @@ -204,6 +207,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_title", @@ -214,7 +218,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -222,6 +226,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_matching_images", @@ -240,6 +245,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_matching_images", @@ -258,6 +264,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -278,6 +285,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="label", @@ -288,7 +296,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -296,6 +304,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_code", @@ -306,7 +315,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -314,6 +323,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -334,6 +344,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="web_entities", @@ -352,6 +363,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="full_matching_images", @@ -370,6 +382,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="partial_matching_images", @@ -388,6 +401,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pages_with_matching_images", @@ -406,6 +420,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="visually_similar_images", @@ -424,6 +439,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="best_guess_labels", @@ -442,6 +458,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -491,14 +508,15 @@ WebDetection = _reflection.GeneratedProtocolMessageType( "WebDetection", (_message.Message,), - dict( - WebEntity=_reflection.GeneratedProtocolMessageType( + { + "WebEntity": _reflection.GeneratedProtocolMessageType( "WebEntity", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBENTITY, - __module__="google.cloud.vision_v1p4beta1.proto.web_detection_pb2", - __doc__="""Entity deduced from similar images on the Internet. + { + "DESCRIPTOR": _WEBDETECTION_WEBENTITY, + "__module__": "google.cloud.vision_v1p4beta1.proto.web_detection_pb2", + "__doc__": """Entity deduced from similar images on the Internet. + Attributes: entity_id: Opaque entity ID. @@ -509,15 +527,16 @@ Canonical description of the entity, in English. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) - ), + }, ), - WebImage=_reflection.GeneratedProtocolMessageType( + "WebImage": _reflection.GeneratedProtocolMessageType( "WebImage", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBIMAGE, - __module__="google.cloud.vision_v1p4beta1.proto.web_detection_pb2", - __doc__="""Metadata for online images. + { + "DESCRIPTOR": _WEBDETECTION_WEBIMAGE, + "__module__": "google.cloud.vision_v1p4beta1.proto.web_detection_pb2", + "__doc__": """Metadata for online images. + Attributes: url: The result image URL. @@ -525,15 +544,16 @@ (Deprecated) Overall relevancy score for the image. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebImage) - ), + }, ), - WebPage=_reflection.GeneratedProtocolMessageType( + "WebPage": _reflection.GeneratedProtocolMessageType( "WebPage", (_message.Message,), - dict( - DESCRIPTOR=_WEBDETECTION_WEBPAGE, - __module__="google.cloud.vision_v1p4beta1.proto.web_detection_pb2", - __doc__="""Metadata for web pages. + { + "DESCRIPTOR": _WEBDETECTION_WEBPAGE, + "__module__": "google.cloud.vision_v1p4beta1.proto.web_detection_pb2", + "__doc__": """Metadata for web pages. + Attributes: url: The result web page URL. @@ -551,29 +571,31 @@ crops. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebPage) - ), + }, ), - WebLabel=_reflection.GeneratedProtocolMessageType( + "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. + { + "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. + 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. + "DESCRIPTOR": _WEBDETECTION, + "__module__": "google.cloud.vision_v1p4beta1.proto.web_detection_pb2", + "__doc__": """Relevant information for the image from the Internet. + Attributes: web_entities: Deduced entities from similar images on the Internet. @@ -590,11 +612,11 @@ visually_similar_images: The visually similar image results. best_guess_labels: - The service's best guess as to the topic of the request image. + The service’s best guess as to the topic of the request image. Inferred from similar images on the open web. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection) - ), + }, ) _sym_db.RegisterMessage(WebDetection) _sym_db.RegisterMessage(WebDetection.WebEntity) diff --git a/google/cloud/vision_v1p4beta1/proto/web_detection_pb2_grpc.py b/google/cloud/vision_v1p4beta1/proto/web_detection_pb2_grpc.py index 07cb78fe..8a939394 100644 --- a/google/cloud/vision_v1p4beta1/proto/web_detection_pb2_grpc.py +++ b/google/cloud/vision_v1p4beta1/proto/web_detection_pb2_grpc.py @@ -1,2 +1,3 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc diff --git a/noxfile.py b/noxfile.py index 8846b9a2..d7260c64 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,14 +23,15 @@ import nox -BLACK_VERSION = "black==19.3b0" +BLACK_VERSION = "black==19.10b0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] -if os.path.exists("samples"): - BLACK_PATHS.append("samples") +DEFAULT_PYTHON_VERSION = "3.8" +SYSTEM_TEST_PYTHON_VERSIONS = ["2.7", "3.8"] +UNIT_TEST_PYTHON_VERSIONS = ["2.7", "3.5", "3.6", "3.7", "3.8"] -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint(session): """Run linters. @@ -38,7 +39,9 @@ def lint(session): serious code quality issues. """ session.install("flake8", BLACK_VERSION) - session.run("black", "--check", *BLACK_PATHS) + session.run( + "black", "--check", *BLACK_PATHS, + ) session.run("flake8", "google", "tests") @@ -53,10 +56,12 @@ def blacken(session): check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ session.install(BLACK_VERSION) - session.run("black", *BLACK_PATHS) + session.run( + "black", *BLACK_PATHS, + ) -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint_setup_py(session): """Verify that setup.py is valid (including RST check).""" session.install("docutils", "pygments") @@ -84,13 +89,13 @@ def default(session): ) -@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"]) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) def unit(session): """Run the unit test suite.""" default(session) -@nox.session(python=["2.7", "3.7"]) +@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) def system(session): """Run the system test suite.""" system_test_path = os.path.join("tests", "system.py") @@ -120,7 +125,7 @@ def system(session): session.run("py.test", "--quiet", system_test_folder_path, *session.posargs) -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def cover(session): """Run the final coverage report. @@ -133,7 +138,7 @@ def cover(session): session.run("coverage", "erase") -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def docs(session): """Build the docs for this library.""" diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh new file mode 100755 index 00000000..ff599eb2 --- /dev/null +++ b/scripts/decrypt-secrets.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Copyright 2015 Google Inc. All rights reserved. +# +# 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. + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +ROOT=$( dirname "$DIR" ) + +# Work from the project root. +cd $ROOT + +# Use SECRET_MANAGER_PROJECT if set, fallback to cloud-devrel-kokoro-resources. +PROJECT_ID="${SECRET_MANAGER_PROJECT:-cloud-devrel-kokoro-resources}" + +gcloud secrets versions access latest --secret="python-docs-samples-test-env" \ + > testing/test-env.sh +gcloud secrets versions access latest \ + --secret="python-docs-samples-service-account" \ + > testing/service-account.json +gcloud secrets versions access latest \ + --secret="python-docs-samples-client-secrets" \ + > testing/client-secrets.json \ No newline at end of file diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py new file mode 100644 index 00000000..d309d6e9 --- /dev/null +++ b/scripts/readme-gen/readme_gen.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python + +# Copyright 2016 Google Inc +# +# 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. + +"""Generates READMEs using configuration defined in yaml.""" + +import argparse +import io +import os +import subprocess + +import jinja2 +import yaml + + +jinja_env = jinja2.Environment( + trim_blocks=True, + loader=jinja2.FileSystemLoader( + os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')))) + +README_TMPL = jinja_env.get_template('README.tmpl.rst') + + +def get_help(file): + return subprocess.check_output(['python', file, '--help']).decode() + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('source') + parser.add_argument('--destination', default='README.rst') + + args = parser.parse_args() + + source = os.path.abspath(args.source) + root = os.path.dirname(source) + destination = os.path.join(root, args.destination) + + jinja_env.globals['get_help'] = get_help + + with io.open(source, 'r') as f: + config = yaml.load(f) + + # This allows get_help to execute in the right directory. + os.chdir(root) + + output = README_TMPL.render(config) + + with io.open(destination, 'w') as f: + f.write(output) + + +if __name__ == '__main__': + main() diff --git a/scripts/readme-gen/templates/README.tmpl.rst b/scripts/readme-gen/templates/README.tmpl.rst new file mode 100644 index 00000000..4fd23976 --- /dev/null +++ b/scripts/readme-gen/templates/README.tmpl.rst @@ -0,0 +1,87 @@ +{# The following line is a lie. BUT! Once jinja2 is done with it, it will + become truth! #} +.. This file is automatically generated. Do not edit this file directly. + +{{product.name}} Python Samples +=============================================================================== + +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/README.rst + + +This directory contains samples for {{product.name}}. {{product.description}} + +{{description}} + +.. _{{product.name}}: {{product.url}} + +{% if required_api_url %} +To run the sample, you need to enable the API at: {{required_api_url}} +{% endif %} + +{% if required_role %} +To run the sample, you need to have `{{required_role}}` role. +{% endif %} + +{{other_required_steps}} + +{% if setup %} +Setup +------------------------------------------------------------------------------- + +{% for section in setup %} + +{% include section + '.tmpl.rst' %} + +{% endfor %} +{% endif %} + +{% if samples %} +Samples +------------------------------------------------------------------------------- + +{% for sample in samples %} +{{sample.name}} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +{% if not sample.hide_cloudshell_button %} +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/{{sample.file}},{{folder}}/README.rst +{% endif %} + + +{{sample.description}} + +To run this sample: + +.. code-block:: bash + + $ python {{sample.file}} +{% if sample.show_help %} + + {{get_help(sample.file)|indent}} +{% endif %} + + +{% endfor %} +{% endif %} + +{% if cloud_client_library %} + +The client library +------------------------------------------------------------------------------- + +This sample uses the `Google Cloud Client Library for Python`_. +You can read the documentation for more details on API usage and use GitHub +to `browse the source`_ and `report issues`_. + +.. _Google Cloud Client Library for Python: + https://googlecloudplatform.github.io/google-cloud-python/ +.. _browse the source: + https://github.com/GoogleCloudPlatform/google-cloud-python +.. _report issues: + https://github.com/GoogleCloudPlatform/google-cloud-python/issues + +{% endif %} + +.. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/scripts/readme-gen/templates/auth.tmpl.rst b/scripts/readme-gen/templates/auth.tmpl.rst new file mode 100644 index 00000000..1446b94a --- /dev/null +++ b/scripts/readme-gen/templates/auth.tmpl.rst @@ -0,0 +1,9 @@ +Authentication +++++++++++++++ + +This sample requires you to have authentication setup. Refer to the +`Authentication Getting Started Guide`_ for instructions on setting up +credentials for applications. + +.. _Authentication Getting Started Guide: + https://cloud.google.com/docs/authentication/getting-started diff --git a/scripts/readme-gen/templates/auth_api_key.tmpl.rst b/scripts/readme-gen/templates/auth_api_key.tmpl.rst new file mode 100644 index 00000000..11957ce2 --- /dev/null +++ b/scripts/readme-gen/templates/auth_api_key.tmpl.rst @@ -0,0 +1,14 @@ +Authentication +++++++++++++++ + +Authentication for this service is done via an `API Key`_. To obtain an API +Key: + +1. Open the `Cloud Platform Console`_ +2. Make sure that billing is enabled for your project. +3. From the **Credentials** page, create a new **API Key** or use an existing + one for your project. + +.. _API Key: + https://developers.google.com/api-client-library/python/guide/aaa_apikeys +.. _Cloud Console: https://console.cloud.google.com/project?_ diff --git a/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst new file mode 100644 index 00000000..a0406dba --- /dev/null +++ b/scripts/readme-gen/templates/install_deps.tmpl.rst @@ -0,0 +1,29 @@ +Install Dependencies +++++++++++++++++++++ + +#. Clone python-docs-samples and change directory to the sample directory you want to use. + + .. code-block:: bash + + $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git + +#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. + + .. _Python Development Environment Setup Guide: + https://cloud.google.com/python/setup + +#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. + + .. code-block:: bash + + $ virtualenv env + $ source env/bin/activate + +#. Install the dependencies needed to run the samples. + + .. code-block:: bash + + $ pip install -r requirements.txt + +.. _pip: https://pip.pypa.io/ +.. _virtualenv: https://virtualenv.pypa.io/ diff --git a/scripts/readme-gen/templates/install_portaudio.tmpl.rst b/scripts/readme-gen/templates/install_portaudio.tmpl.rst new file mode 100644 index 00000000..5ea33d18 --- /dev/null +++ b/scripts/readme-gen/templates/install_portaudio.tmpl.rst @@ -0,0 +1,35 @@ +Install PortAudio ++++++++++++++++++ + +Install `PortAudio`_. This is required by the `PyAudio`_ library to stream +audio from your computer's microphone. PyAudio depends on PortAudio for cross-platform compatibility, and is installed differently depending on the +platform. + +* For Mac OS X, you can use `Homebrew`_:: + + brew install portaudio + + **Note**: if you encounter an error when running `pip install` that indicates + it can't find `portaudio.h`, try running `pip install` with the following + flags:: + + pip install --global-option='build_ext' \ + --global-option='-I/usr/local/include' \ + --global-option='-L/usr/local/lib' \ + pyaudio + +* For Debian / Ubuntu Linux:: + + apt-get install portaudio19-dev python-all-dev + +* Windows may work without having to install PortAudio explicitly (it will get + installed with PyAudio). + +For more details, see the `PyAudio installation`_ page. + + +.. _PyAudio: https://people.csail.mit.edu/hubert/pyaudio/ +.. _PortAudio: http://www.portaudio.com/ +.. _PyAudio installation: + https://people.csail.mit.edu/hubert/pyaudio/#downloads +.. _Homebrew: http://brew.sh diff --git a/synth.metadata b/synth.metadata index a5dda203..57f564e7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,32 +1,25 @@ { "sources": [ - { - "generator": { - "name": "artman", - "version": "2.0.0", - "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098" - } - }, { "git": { "name": ".", - "remote": "git@github.com:googleapis/python-vision", - "sha": "e067d8a283aaba44d9da7147c9ded5c8ab0e536c" + "remote": "https://github.com/googleapis/python-vision.git", + "sha": "b33fa88e4f1e9cb2f6e029e6a34364fb6cdc1a96" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "756b174de4a122461993c1c583345533d819936d", - "internalRef": "308824110" + "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", + "internalRef": "318028816" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "01b6f23d24b27878b48667ce597876d66b59780e" + "sha": "2a29860e484695a07aa8670f9e750bfeeb308a43" } } ], @@ -37,8 +30,7 @@ "apiName": "vision", "apiVersion": "v1", "language": "python", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1.yaml" + "generator": "bazel" } }, { @@ -47,8 +39,7 @@ "apiName": "vision", "apiVersion": "v1p1beta1", "language": "python", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1p1beta1.yaml" + "generator": "bazel" } }, { @@ -57,8 +48,7 @@ "apiName": "vision", "apiVersion": "v1p2beta1", "language": "python", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1p2beta1.yaml" + "generator": "bazel" } }, { @@ -67,8 +57,7 @@ "apiName": "vision", "apiVersion": "v1p3beta1", "language": "python", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1p3beta1.yaml" + "generator": "bazel" } }, { @@ -77,8 +66,7 @@ "apiName": "vision", "apiVersion": "v1p4beta1", "language": "python", - "generator": "gapic", - "config": "google/cloud/vision/artman_vision_v1p4beta1.yaml" + "generator": "bazel" } } ] diff --git a/synth.py b/synth.py index baa3a072..b98c7b33 100644 --- a/synth.py +++ b/synth.py @@ -88,5 +88,7 @@ cov_level=99, system_test_external_dependencies=["google-cloud-storage"] ) s.move(templated_files) +# TODO(busunkim): Use latest sphinx after microgenerator transition +s.replace("noxfile.py", """['"]sphinx['"]""", '"sphinx<3.0.0"') s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/testing/.gitignore b/testing/.gitignore new file mode 100644 index 00000000..b05fbd63 --- /dev/null +++ b/testing/.gitignore @@ -0,0 +1,3 @@ +test-env.sh +service-account.json +client-secrets.json \ No newline at end of file diff --git a/tests/unit/gapic/v1/test_image_annotator_client_v1.py b/tests/unit/gapic/v1/test_image_annotator_client_v1.py index 0cca03f9..d7975e51 100644 --- a/tests/unit/gapic/v1/test_image_annotator_client_v1.py +++ b/tests/unit/gapic/v1/test_image_annotator_client_v1.py @@ -63,47 +63,6 @@ class CustomException(Exception): class TestImageAnnotatorClient(object): - def test_batch_annotate_images(self): - # Setup Expected Response - expected_response = {} - expected_response = image_annotator_pb2.BatchAnnotateImagesResponse( - **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_v1.ImageAnnotatorClient() - - # Setup Request - requests = [] - - response = client.batch_annotate_images(requests) - assert expected_response == response - - assert len(channel.requests) == 1 - expected_request = image_annotator_pb2.BatchAnnotateImagesRequest( - requests=requests - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_batch_annotate_images_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_v1.ImageAnnotatorClient() - - # Setup request - requests = [] - - with pytest.raises(CustomException): - client.batch_annotate_images(requests) - def test_batch_annotate_files(self): # Setup Expected Response expected_response = {} @@ -254,3 +213,44 @@ def test_async_batch_annotate_files_exception(self): response = client.async_batch_annotate_files(requests) exception = response.exception() assert exception.errors[0] == error + + def test_batch_annotate_images(self): + # Setup Expected Response + expected_response = {} + expected_response = image_annotator_pb2.BatchAnnotateImagesResponse( + **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_v1.ImageAnnotatorClient() + + # Setup Request + requests = [] + + response = client.batch_annotate_images(requests) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = image_annotator_pb2.BatchAnnotateImagesRequest( + requests=requests + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_batch_annotate_images_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_v1.ImageAnnotatorClient() + + # Setup request + requests = [] + + with pytest.raises(CustomException): + client.batch_annotate_images(requests) 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..4326e3f3 100644 --- a/tests/unit/gapic/v1/test_product_search_client_v1.py +++ b/tests/unit/gapic/v1/test_product_search_client_v1.py @@ -64,6 +64,114 @@ class CustomException(Exception): class TestProductSearchClient(object): + def test_import_product_sets(self): + # Setup Expected Response + expected_response = {} + expected_response = product_search_service_pb2.ImportProductSetsResponse( + **expected_response + ) + operation = operations_pb2.Operation( + name="operations/test_import_product_sets", done=True + ) + operation.response.Pack(expected_response) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1.ProductSearchClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + input_config = {} + + response = client.import_product_sets(parent, input_config) + result = response.result() + assert expected_response == result + + assert len(channel.requests) == 1 + expected_request = product_search_service_pb2.ImportProductSetsRequest( + parent=parent, input_config=input_config + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_import_product_sets_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_import_product_sets_exception", done=True + ) + operation.error.CopyFrom(error) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1.ProductSearchClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + input_config = {} + + response = client.import_product_sets(parent, input_config) + exception = response.exception() + assert exception.errors[0] == error + + def test_purge_products(self): + # Setup Expected Response + expected_response = {} + expected_response = empty_pb2.Empty(**expected_response) + operation = operations_pb2.Operation( + name="operations/test_purge_products", done=True + ) + operation.response.Pack(expected_response) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1.ProductSearchClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + + response = client.purge_products(parent) + result = response.result() + assert expected_response == result + + assert len(channel.requests) == 1 + expected_request = product_search_service_pb2.PurgeProductsRequest( + parent=parent + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_purge_products_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_purge_products_exception", done=True + ) + operation.error.CopyFrom(error) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1.ProductSearchClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + + response = client.purge_products(parent) + exception = response.exception() + assert exception.errors[0] == error + def test_create_product_set(self): # Setup Expected Response name = "name3373707" @@ -785,111 +893,3 @@ def test_list_products_in_product_set_exception(self): paged_list_response = client.list_products_in_product_set(name) with pytest.raises(CustomException): list(paged_list_response) - - def test_import_product_sets(self): - # Setup Expected Response - expected_response = {} - expected_response = product_search_service_pb2.ImportProductSetsResponse( - **expected_response - ) - operation = operations_pb2.Operation( - name="operations/test_import_product_sets", done=True - ) - operation.response.Pack(expected_response) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = vision_v1.ProductSearchClient() - - # Setup Request - parent = client.location_path("[PROJECT]", "[LOCATION]") - input_config = {} - - response = client.import_product_sets(parent, input_config) - result = response.result() - assert expected_response == result - - assert len(channel.requests) == 1 - expected_request = product_search_service_pb2.ImportProductSetsRequest( - parent=parent, input_config=input_config - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_import_product_sets_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_import_product_sets_exception", done=True - ) - operation.error.CopyFrom(error) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = vision_v1.ProductSearchClient() - - # Setup Request - parent = client.location_path("[PROJECT]", "[LOCATION]") - input_config = {} - - response = client.import_product_sets(parent, input_config) - exception = response.exception() - assert exception.errors[0] == error - - def test_purge_products(self): - # Setup Expected Response - expected_response = {} - expected_response = empty_pb2.Empty(**expected_response) - operation = operations_pb2.Operation( - name="operations/test_purge_products", done=True - ) - operation.response.Pack(expected_response) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = vision_v1.ProductSearchClient() - - # Setup Request - parent = client.location_path("[PROJECT]", "[LOCATION]") - - response = client.purge_products(parent) - result = response.result() - assert expected_response == result - - assert len(channel.requests) == 1 - expected_request = product_search_service_pb2.PurgeProductsRequest( - parent=parent - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_purge_products_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_purge_products_exception", done=True - ) - operation.error.CopyFrom(error) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = vision_v1.ProductSearchClient() - - # Setup Request - parent = client.location_path("[PROJECT]", "[LOCATION]") - - response = client.purge_products(parent) - exception = response.exception() - assert exception.errors[0] == error diff --git a/tests/unit/gapic/v1p2beta1/test_image_annotator_client_v1p2beta1.py b/tests/unit/gapic/v1p2beta1/test_image_annotator_client_v1p2beta1.py index 8bc24368..1c5ab408 100644 --- a/tests/unit/gapic/v1p2beta1/test_image_annotator_client_v1p2beta1.py +++ b/tests/unit/gapic/v1p2beta1/test_image_annotator_client_v1p2beta1.py @@ -63,15 +63,19 @@ class CustomException(Exception): class TestImageAnnotatorClient(object): - def test_batch_annotate_images(self): + def test_async_batch_annotate_files(self): # Setup Expected Response expected_response = {} - expected_response = image_annotator_pb2.BatchAnnotateImagesResponse( + expected_response = image_annotator_pb2.AsyncBatchAnnotateFilesResponse( **expected_response ) + operation = operations_pb2.Operation( + name="operations/test_async_batch_annotate_files", done=True + ) + operation.response.Pack(expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel @@ -80,43 +84,48 @@ def test_batch_annotate_images(self): # Setup Request requests = [] - response = client.batch_annotate_images(requests) - assert expected_response == response + response = client.async_batch_annotate_files(requests) + result = response.result() + assert expected_response == result assert len(channel.requests) == 1 - expected_request = image_annotator_pb2.BatchAnnotateImagesRequest( + expected_request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest( requests=requests ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_batch_annotate_images_exception(self): + def test_async_batch_annotate_files_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_async_batch_annotate_files_exception", done=True + ) + operation.error.CopyFrom(error) + # Mock the API response - channel = ChannelStub(responses=[CustomException()]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = vision_v1p2beta1.ImageAnnotatorClient() - # Setup request + # Setup Request requests = [] - with pytest.raises(CustomException): - client.batch_annotate_images(requests) + response = client.async_batch_annotate_files(requests) + exception = response.exception() + assert exception.errors[0] == error - def test_async_batch_annotate_files(self): + def test_batch_annotate_images(self): # Setup Expected Response expected_response = {} - expected_response = image_annotator_pb2.AsyncBatchAnnotateFilesResponse( + expected_response = image_annotator_pb2.BatchAnnotateImagesResponse( **expected_response ) - operation = operations_pb2.Operation( - name="operations/test_async_batch_annotate_files", done=True - ) - operation.response.Pack(expected_response) # Mock the API response - channel = ChannelStub(responses=[operation]) + 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 @@ -125,35 +134,26 @@ def test_async_batch_annotate_files(self): # Setup Request requests = [] - response = client.async_batch_annotate_files(requests) - result = response.result() - assert expected_response == result + response = client.batch_annotate_images(requests) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest( + expected_request = image_annotator_pb2.BatchAnnotateImagesRequest( requests=requests ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_async_batch_annotate_files_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_async_batch_annotate_files_exception", done=True - ) - operation.error.CopyFrom(error) - + def test_batch_annotate_images_exception(self): # Mock the API response - channel = ChannelStub(responses=[operation]) + 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_v1p2beta1.ImageAnnotatorClient() - # Setup Request + # Setup request requests = [] - response = client.async_batch_annotate_files(requests) - exception = response.exception() - assert exception.errors[0] == error + with pytest.raises(CustomException): + client.batch_annotate_images(requests) diff --git a/tests/unit/gapic/v1p3beta1/test_image_annotator_client_v1p3beta1.py b/tests/unit/gapic/v1p3beta1/test_image_annotator_client_v1p3beta1.py index de5486ba..2bb87588 100644 --- a/tests/unit/gapic/v1p3beta1/test_image_annotator_client_v1p3beta1.py +++ b/tests/unit/gapic/v1p3beta1/test_image_annotator_client_v1p3beta1.py @@ -77,16 +77,11 @@ def test_batch_annotate_images(self): create_channel.return_value = channel client = vision_v1p3beta1.ImageAnnotatorClient() - # Setup Request - requests = [] - - response = client.batch_annotate_images(requests) + response = client.batch_annotate_images() assert expected_response == response assert len(channel.requests) == 1 - expected_request = image_annotator_pb2.BatchAnnotateImagesRequest( - requests=requests - ) + expected_request = image_annotator_pb2.BatchAnnotateImagesRequest() actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -98,11 +93,8 @@ def test_batch_annotate_images_exception(self): create_channel.return_value = channel client = vision_v1p3beta1.ImageAnnotatorClient() - # Setup request - requests = [] - with pytest.raises(CustomException): - client.batch_annotate_images(requests) + client.batch_annotate_images() def test_async_batch_annotate_files(self): # Setup Expected Response 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..1a38fc75 100644 --- a/tests/unit/gapic/v1p3beta1/test_product_search_client_v1p3beta1.py +++ b/tests/unit/gapic/v1p3beta1/test_product_search_client_v1p3beta1.py @@ -25,7 +25,6 @@ from google.cloud.vision_v1p3beta1.proto import product_search_service_pb2 from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 -from google.protobuf import field_mask_pb2 class MultiCallableStub(object): @@ -65,6 +64,62 @@ class CustomException(Exception): class TestProductSearchClient(object): + def test_import_product_sets(self): + # Setup Expected Response + expected_response = {} + expected_response = product_search_service_pb2.ImportProductSetsResponse( + **expected_response + ) + operation = operations_pb2.Operation( + name="operations/test_import_product_sets", done=True + ) + operation.response.Pack(expected_response) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1p3beta1.ProductSearchClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + input_config = {} + + response = client.import_product_sets(parent, input_config) + result = response.result() + assert expected_response == result + + assert len(channel.requests) == 1 + expected_request = product_search_service_pb2.ImportProductSetsRequest( + parent=parent, input_config=input_config + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_import_product_sets_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_import_product_sets_exception", done=True + ) + operation.error.CopyFrom(error) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1p3beta1.ProductSearchClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + input_config = {} + + response = client.import_product_sets(parent, input_config) + exception = response.exception() + assert exception.errors[0] == error + def test_create_product_set(self): # Setup Expected Response name = "name3373707" @@ -82,14 +137,13 @@ def test_create_product_set(self): # Setup Request parent = client.location_path("[PROJECT]", "[LOCATION]") product_set = {} - product_set_id = "productSetId4216680" - response = client.create_product_set(parent, product_set, product_set_id) + response = client.create_product_set(parent, product_set) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.CreateProductSetRequest( - parent=parent, product_set=product_set, product_set_id=product_set_id + parent=parent, product_set=product_set ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -105,10 +159,9 @@ def test_create_product_set_exception(self): # Setup request parent = client.location_path("[PROJECT]", "[LOCATION]") product_set = {} - product_set_id = "productSetId4216680" with pytest.raises(CustomException): - client.create_product_set(parent, product_set, product_set_id) + client.create_product_set(parent, product_set) def test_list_product_sets(self): # Setup Expected Response @@ -215,14 +268,13 @@ def test_update_product_set(self): # Setup Request product_set = {} - update_mask = {} - response = client.update_product_set(product_set, update_mask) + response = client.update_product_set(product_set) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.UpdateProductSetRequest( - product_set=product_set, update_mask=update_mask + product_set=product_set ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -237,10 +289,9 @@ def test_update_product_set_exception(self): # Setup request product_set = {} - update_mask = {} with pytest.raises(CustomException): - client.update_product_set(product_set, update_mask) + client.update_product_set(product_set) def test_delete_product_set(self): channel = ChannelStub() @@ -297,14 +348,13 @@ def test_create_product(self): # Setup Request parent = client.location_path("[PROJECT]", "[LOCATION]") product = {} - product_id = "productId1753008747" - response = client.create_product(parent, product, product_id) + response = client.create_product(parent, product) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.CreateProductRequest( - parent=parent, product=product, product_id=product_id + parent=parent, product=product ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -320,10 +370,9 @@ def test_create_product_exception(self): # Setup request parent = client.location_path("[PROJECT]", "[LOCATION]") product = {} - product_id = "productId1753008747" with pytest.raises(CustomException): - client.create_product(parent, product, product_id) + client.create_product(parent, product) def test_list_products(self): # Setup Expected Response @@ -439,14 +488,13 @@ def test_update_product(self): # Setup Request product = {} - update_mask = {} - response = client.update_product(product, update_mask) + response = client.update_product(product) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.UpdateProductRequest( - product=product, update_mask=update_mask + product=product ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -461,10 +509,9 @@ def test_update_product_exception(self): # Setup request product = {} - update_mask = {} with pytest.raises(CustomException): - client.update_product(product, update_mask) + client.update_product(product) def test_delete_product(self): channel = ChannelStub() @@ -516,18 +563,13 @@ def test_create_reference_image(self): # Setup Request parent = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") reference_image = {} - reference_image_id = "referenceImageId1946713331" - response = client.create_reference_image( - parent, reference_image, reference_image_id - ) + response = client.create_reference_image(parent, reference_image) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.CreateReferenceImageRequest( - parent=parent, - reference_image=reference_image, - reference_image_id=reference_image_id, + parent=parent, reference_image=reference_image ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -543,10 +585,9 @@ def test_create_reference_image_exception(self): # Setup request parent = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") reference_image = {} - reference_image_id = "referenceImageId1946713331" with pytest.raises(CustomException): - client.create_reference_image(parent, reference_image, reference_image_id) + client.create_reference_image(parent, reference_image) def test_delete_reference_image(self): channel = ChannelStub() @@ -693,7 +734,7 @@ def test_add_product_to_product_set(self): # Setup Request name = client.product_set_path("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]") - product = "product-309474065" + product = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") client.add_product_to_product_set(name, product) @@ -714,7 +755,7 @@ def test_add_product_to_product_set_exception(self): # Setup request name = client.product_set_path("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]") - product = "product-309474065" + product = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") with pytest.raises(CustomException): client.add_product_to_product_set(name, product) @@ -728,7 +769,7 @@ def test_remove_product_from_product_set(self): # Setup Request name = client.product_set_path("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]") - product = "product-309474065" + product = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") client.remove_product_from_product_set(name, product) @@ -749,7 +790,7 @@ def test_remove_product_from_product_set_exception(self): # Setup request name = client.product_set_path("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]") - product = "product-309474065" + product = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") with pytest.raises(CustomException): client.remove_product_from_product_set(name, product) @@ -800,59 +841,3 @@ def test_list_products_in_product_set_exception(self): paged_list_response = client.list_products_in_product_set(name) with pytest.raises(CustomException): list(paged_list_response) - - def test_import_product_sets(self): - # Setup Expected Response - expected_response = {} - expected_response = product_search_service_pb2.ImportProductSetsResponse( - **expected_response - ) - operation = operations_pb2.Operation( - name="operations/test_import_product_sets", done=True - ) - operation.response.Pack(expected_response) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = vision_v1p3beta1.ProductSearchClient() - - # Setup Request - parent = client.location_path("[PROJECT]", "[LOCATION]") - input_config = {} - - response = client.import_product_sets(parent, input_config) - result = response.result() - assert expected_response == result - - assert len(channel.requests) == 1 - expected_request = product_search_service_pb2.ImportProductSetsRequest( - parent=parent, input_config=input_config - ) - actual_request = channel.requests[0][1] - assert expected_request == actual_request - - def test_import_product_sets_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_import_product_sets_exception", done=True - ) - operation.error.CopyFrom(error) - - # Mock the API response - channel = ChannelStub(responses=[operation]) - patch = mock.patch("google.api_core.grpc_helpers.create_channel") - with patch as create_channel: - create_channel.return_value = channel - client = vision_v1p3beta1.ProductSearchClient() - - # Setup Request - parent = client.location_path("[PROJECT]", "[LOCATION]") - input_config = {} - - response = client.import_product_sets(parent, input_config) - exception = response.exception() - assert exception.errors[0] == error diff --git a/tests/unit/gapic/v1p4beta1/test_image_annotator_client_v1p4beta1.py b/tests/unit/gapic/v1p4beta1/test_image_annotator_client_v1p4beta1.py index a1ec513a..880665d7 100644 --- a/tests/unit/gapic/v1p4beta1/test_image_annotator_client_v1p4beta1.py +++ b/tests/unit/gapic/v1p4beta1/test_image_annotator_client_v1p4beta1.py @@ -63,15 +63,19 @@ class CustomException(Exception): class TestImageAnnotatorClient(object): - def test_batch_annotate_images(self): + def test_async_batch_annotate_images(self): # Setup Expected Response expected_response = {} - expected_response = image_annotator_pb2.BatchAnnotateImagesResponse( + expected_response = image_annotator_pb2.AsyncBatchAnnotateImagesResponse( **expected_response ) + operation = operations_pb2.Operation( + name="operations/test_async_batch_annotate_images", done=True + ) + operation.response.Pack(expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel @@ -79,40 +83,55 @@ def test_batch_annotate_images(self): # Setup Request requests = [] + output_config = {} - response = client.batch_annotate_images(requests) - assert expected_response == response + response = client.async_batch_annotate_images(requests, output_config) + result = response.result() + assert expected_response == result assert len(channel.requests) == 1 - expected_request = image_annotator_pb2.BatchAnnotateImagesRequest( - requests=requests + expected_request = image_annotator_pb2.AsyncBatchAnnotateImagesRequest( + requests=requests, output_config=output_config ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_batch_annotate_images_exception(self): + def test_async_batch_annotate_images_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_async_batch_annotate_images_exception", done=True + ) + operation.error.CopyFrom(error) + # Mock the API response - channel = ChannelStub(responses=[CustomException()]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = vision_v1p4beta1.ImageAnnotatorClient() - # Setup request + # Setup Request requests = [] + output_config = {} - with pytest.raises(CustomException): - client.batch_annotate_images(requests) + response = client.async_batch_annotate_images(requests, output_config) + exception = response.exception() + assert exception.errors[0] == error - def test_batch_annotate_files(self): + def test_async_batch_annotate_files(self): # Setup Expected Response expected_response = {} - expected_response = image_annotator_pb2.BatchAnnotateFilesResponse( + expected_response = image_annotator_pb2.AsyncBatchAnnotateFilesResponse( **expected_response ) + operation = operations_pb2.Operation( + name="operations/test_async_batch_annotate_files", done=True + ) + operation.response.Pack(expected_response) # Mock the API response - channel = ChannelStub(responses=[expected_response]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel @@ -121,43 +140,48 @@ def test_batch_annotate_files(self): # Setup Request requests = [] - response = client.batch_annotate_files(requests) - assert expected_response == response + response = client.async_batch_annotate_files(requests) + result = response.result() + assert expected_response == result assert len(channel.requests) == 1 - expected_request = image_annotator_pb2.BatchAnnotateFilesRequest( + expected_request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest( requests=requests ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_batch_annotate_files_exception(self): + def test_async_batch_annotate_files_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_async_batch_annotate_files_exception", done=True + ) + operation.error.CopyFrom(error) + # Mock the API response - channel = ChannelStub(responses=[CustomException()]) + channel = ChannelStub(responses=[operation]) patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel client = vision_v1p4beta1.ImageAnnotatorClient() - # Setup request + # Setup Request requests = [] - with pytest.raises(CustomException): - client.batch_annotate_files(requests) + response = client.async_batch_annotate_files(requests) + exception = response.exception() + assert exception.errors[0] == error - def test_async_batch_annotate_images(self): + def test_batch_annotate_images(self): # Setup Expected Response expected_response = {} - expected_response = image_annotator_pb2.AsyncBatchAnnotateImagesResponse( + expected_response = image_annotator_pb2.BatchAnnotateImagesResponse( **expected_response ) - operation = operations_pb2.Operation( - name="operations/test_async_batch_annotate_images", done=True - ) - operation.response.Pack(expected_response) # Mock the API response - channel = ChannelStub(responses=[operation]) + 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 @@ -165,55 +189,40 @@ def test_async_batch_annotate_images(self): # Setup Request requests = [] - output_config = {} - response = client.async_batch_annotate_images(requests, output_config) - result = response.result() - assert expected_response == result + response = client.batch_annotate_images(requests) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = image_annotator_pb2.AsyncBatchAnnotateImagesRequest( - requests=requests, output_config=output_config + expected_request = image_annotator_pb2.BatchAnnotateImagesRequest( + requests=requests ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_async_batch_annotate_images_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_async_batch_annotate_images_exception", done=True - ) - operation.error.CopyFrom(error) - + def test_batch_annotate_images_exception(self): # Mock the API response - channel = ChannelStub(responses=[operation]) + 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.ImageAnnotatorClient() - # Setup Request + # Setup request requests = [] - output_config = {} - response = client.async_batch_annotate_images(requests, output_config) - exception = response.exception() - assert exception.errors[0] == error + with pytest.raises(CustomException): + client.batch_annotate_images(requests) - def test_async_batch_annotate_files(self): + def test_batch_annotate_files(self): # Setup Expected Response expected_response = {} - expected_response = image_annotator_pb2.AsyncBatchAnnotateFilesResponse( + expected_response = image_annotator_pb2.BatchAnnotateFilesResponse( **expected_response ) - operation = operations_pb2.Operation( - name="operations/test_async_batch_annotate_files", done=True - ) - operation.response.Pack(expected_response) # Mock the API response - channel = ChannelStub(responses=[operation]) + 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 @@ -222,35 +231,26 @@ def test_async_batch_annotate_files(self): # Setup Request requests = [] - response = client.async_batch_annotate_files(requests) - result = response.result() - assert expected_response == result + response = client.batch_annotate_files(requests) + assert expected_response == response assert len(channel.requests) == 1 - expected_request = image_annotator_pb2.AsyncBatchAnnotateFilesRequest( + expected_request = image_annotator_pb2.BatchAnnotateFilesRequest( requests=requests ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_async_batch_annotate_files_exception(self): - # Setup Response - error = status_pb2.Status() - operation = operations_pb2.Operation( - name="operations/test_async_batch_annotate_files_exception", done=True - ) - operation.error.CopyFrom(error) - + def test_batch_annotate_files_exception(self): # Mock the API response - channel = ChannelStub(responses=[operation]) + 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.ImageAnnotatorClient() - # Setup Request + # Setup request requests = [] - response = client.async_batch_annotate_files(requests) - exception = response.exception() - assert exception.errors[0] == error + with pytest.raises(CustomException): + client.batch_annotate_files(requests) 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..b7a2c4d5 100644 --- a/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py +++ b/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py @@ -25,7 +25,6 @@ from google.cloud.vision_v1p4beta1.proto import product_search_service_pb2 from google.longrunning import operations_pb2 from google.protobuf import empty_pb2 -from google.protobuf import field_mask_pb2 class MultiCallableStub(object): @@ -65,6 +64,62 @@ class CustomException(Exception): class TestProductSearchClient(object): + def test_import_product_sets(self): + # Setup Expected Response + expected_response = {} + expected_response = product_search_service_pb2.ImportProductSetsResponse( + **expected_response + ) + operation = operations_pb2.Operation( + name="operations/test_import_product_sets", done=True + ) + operation.response.Pack(expected_response) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1p4beta1.ProductSearchClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + input_config = {} + + response = client.import_product_sets(parent, input_config) + result = response.result() + assert expected_response == result + + assert len(channel.requests) == 1 + expected_request = product_search_service_pb2.ImportProductSetsRequest( + parent=parent, input_config=input_config + ) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_import_product_sets_exception(self): + # Setup Response + error = status_pb2.Status() + operation = operations_pb2.Operation( + name="operations/test_import_product_sets_exception", done=True + ) + operation.error.CopyFrom(error) + + # Mock the API response + channel = ChannelStub(responses=[operation]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = vision_v1p4beta1.ProductSearchClient() + + # Setup Request + parent = client.location_path("[PROJECT]", "[LOCATION]") + input_config = {} + + response = client.import_product_sets(parent, input_config) + exception = response.exception() + assert exception.errors[0] == error + def test_create_product_set(self): # Setup Expected Response name = "name3373707" @@ -82,14 +137,13 @@ def test_create_product_set(self): # Setup Request parent = client.location_path("[PROJECT]", "[LOCATION]") product_set = {} - product_set_id = "productSetId4216680" - response = client.create_product_set(parent, product_set, product_set_id) + response = client.create_product_set(parent, product_set) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.CreateProductSetRequest( - parent=parent, product_set=product_set, product_set_id=product_set_id + parent=parent, product_set=product_set ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -105,10 +159,9 @@ def test_create_product_set_exception(self): # Setup request parent = client.location_path("[PROJECT]", "[LOCATION]") product_set = {} - product_set_id = "productSetId4216680" with pytest.raises(CustomException): - client.create_product_set(parent, product_set, product_set_id) + client.create_product_set(parent, product_set) def test_list_product_sets(self): # Setup Expected Response @@ -215,14 +268,13 @@ def test_update_product_set(self): # Setup Request product_set = {} - update_mask = {} - response = client.update_product_set(product_set, update_mask) + response = client.update_product_set(product_set) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.UpdateProductSetRequest( - product_set=product_set, update_mask=update_mask + product_set=product_set ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -237,10 +289,9 @@ def test_update_product_set_exception(self): # Setup request product_set = {} - update_mask = {} with pytest.raises(CustomException): - client.update_product_set(product_set, update_mask) + client.update_product_set(product_set) def test_delete_product_set(self): channel = ChannelStub() @@ -297,14 +348,13 @@ def test_create_product(self): # Setup Request parent = client.location_path("[PROJECT]", "[LOCATION]") product = {} - product_id = "productId1753008747" - response = client.create_product(parent, product, product_id) + response = client.create_product(parent, product) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.CreateProductRequest( - parent=parent, product=product, product_id=product_id + parent=parent, product=product ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -320,10 +370,9 @@ def test_create_product_exception(self): # Setup request parent = client.location_path("[PROJECT]", "[LOCATION]") product = {} - product_id = "productId1753008747" with pytest.raises(CustomException): - client.create_product(parent, product, product_id) + client.create_product(parent, product) def test_list_products(self): # Setup Expected Response @@ -439,14 +488,13 @@ def test_update_product(self): # Setup Request product = {} - update_mask = {} - response = client.update_product(product, update_mask) + response = client.update_product(product) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.UpdateProductRequest( - product=product, update_mask=update_mask + product=product ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -461,10 +509,9 @@ def test_update_product_exception(self): # Setup request product = {} - update_mask = {} with pytest.raises(CustomException): - client.update_product(product, update_mask) + client.update_product(product) def test_delete_product(self): channel = ChannelStub() @@ -516,18 +563,13 @@ def test_create_reference_image(self): # Setup Request parent = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") reference_image = {} - reference_image_id = "referenceImageId1946713331" - response = client.create_reference_image( - parent, reference_image, reference_image_id - ) + response = client.create_reference_image(parent, reference_image) assert expected_response == response assert len(channel.requests) == 1 expected_request = product_search_service_pb2.CreateReferenceImageRequest( - parent=parent, - reference_image=reference_image, - reference_image_id=reference_image_id, + parent=parent, reference_image=reference_image ) actual_request = channel.requests[0][1] assert expected_request == actual_request @@ -543,10 +585,9 @@ def test_create_reference_image_exception(self): # Setup request parent = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") reference_image = {} - reference_image_id = "referenceImageId1946713331" with pytest.raises(CustomException): - client.create_reference_image(parent, reference_image, reference_image_id) + client.create_reference_image(parent, reference_image) def test_delete_reference_image(self): channel = ChannelStub() @@ -693,7 +734,7 @@ def test_add_product_to_product_set(self): # Setup Request name = client.product_set_path("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]") - product = "product-309474065" + product = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") client.add_product_to_product_set(name, product) @@ -714,7 +755,7 @@ def test_add_product_to_product_set_exception(self): # Setup request name = client.product_set_path("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]") - product = "product-309474065" + product = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") with pytest.raises(CustomException): client.add_product_to_product_set(name, product) @@ -728,7 +769,7 @@ def test_remove_product_from_product_set(self): # Setup Request name = client.product_set_path("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]") - product = "product-309474065" + product = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") client.remove_product_from_product_set(name, product) @@ -749,7 +790,7 @@ def test_remove_product_from_product_set_exception(self): # Setup request name = client.product_set_path("[PROJECT]", "[LOCATION]", "[PRODUCT_SET]") - product = "product-309474065" + product = client.product_path("[PROJECT]", "[LOCATION]", "[PRODUCT]") with pytest.raises(CustomException): client.remove_product_from_product_set(name, product) @@ -801,14 +842,12 @@ def test_list_products_in_product_set_exception(self): with pytest.raises(CustomException): list(paged_list_response) - def test_import_product_sets(self): + def test_purge_products(self): # Setup Expected Response expected_response = {} - expected_response = product_search_service_pb2.ImportProductSetsResponse( - **expected_response - ) + expected_response = empty_pb2.Empty(**expected_response) operation = operations_pb2.Operation( - name="operations/test_import_product_sets", done=True + name="operations/test_purge_products", done=True ) operation.response.Pack(expected_response) @@ -821,24 +860,23 @@ def test_import_product_sets(self): # Setup Request parent = client.location_path("[PROJECT]", "[LOCATION]") - input_config = {} - response = client.import_product_sets(parent, input_config) + response = client.purge_products(parent) result = response.result() assert expected_response == result assert len(channel.requests) == 1 - expected_request = product_search_service_pb2.ImportProductSetsRequest( - parent=parent, input_config=input_config + expected_request = product_search_service_pb2.PurgeProductsRequest( + parent=parent ) actual_request = channel.requests[0][1] assert expected_request == actual_request - def test_import_product_sets_exception(self): + def test_purge_products_exception(self): # Setup Response error = status_pb2.Status() operation = operations_pb2.Operation( - name="operations/test_import_product_sets_exception", done=True + name="operations/test_purge_products_exception", done=True ) operation.error.CopyFrom(error) @@ -851,41 +889,7 @@ def test_import_product_sets_exception(self): # Setup Request parent = client.location_path("[PROJECT]", "[LOCATION]") - input_config = {} - response = client.import_product_sets(parent, input_config) + response = client.purge_products(parent) 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()