diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..939e5341 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows [Google's Open Source Community +Guidelines](https://opensource.google.com/conduct/). diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..e3394d21 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,44 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/python-vision/issues + - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-python + - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+python + +If you are still having issues, please be sure to include as much information as possible: + +#### Environment details + + - OS type and version: + - Python version: `python --version` + - pip version: `pip --version` + - `google-cloud-vision` version: `pip show google-cloud-vision` + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```python +# example +``` + +#### Stack trace +``` +# example +``` + +Making sure to follow these steps will guarantee the quickest resolution possible. + +Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..6365857f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,18 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + + **Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + **Describe the solution you'd like** +A clear and concise description of what you want to happen. + **Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + **Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 00000000..99586903 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..28f4af7e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-vision/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # 🦕 diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000..4507ad05 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1 @@ +releaseType: python diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3fb06e09 --- /dev/null +++ b/.gitignore @@ -0,0 +1,58 @@ +*.py[cod] +*.sw[op] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +lib64 +__pycache__ + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.nox +.cache +.pytest_cache + + +# Mac +.DS_Store + +# JetBrains +.idea + +# VS Code +.vscode + +# emacs +*~ + +# Built documentation +docs/_build +bigquery/docs/generated + +# Virtual environment +env/ +coverage.xml + +# System test environment variables. +system_tests/local_test_setup + +# Make sure a generated file isn't accidentally committed. +pylintrc +pylintrc.test \ No newline at end of file diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 00000000..c46b1e63 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# Copyright 2018 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. + +set -eo pipefail + +cd github/python-vision + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Debug: show build environment +env | grep KOKORO + +# Setup service account credentials. +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json + +# Setup project id. +export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json") + +# Remove old nox +python3.6 -m pip uninstall --yes --quiet nox-automation + +# Install nox +python3.6 -m pip install --upgrade --quiet nox +python3.6 -m nox --version + +python3.6 -m nox diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 00000000..e386b181 --- /dev/null +++ b/.kokoro/continuous/common.cfg @@ -0,0 +1,27 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python" + +# Use the trampoline script to run in docker. +build_file: "python-vision/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-vision/.kokoro/build.sh" +} diff --git a/.kokoro/continuous/continuous.cfg b/.kokoro/continuous/continuous.cfg new file mode 100644 index 00000000..8f43917d --- /dev/null +++ b/.kokoro/continuous/continuous.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg new file mode 100644 index 00000000..b283fb1c --- /dev/null +++ b/.kokoro/docs/common.cfg @@ -0,0 +1,48 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# 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" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-vision/.kokoro/publish-docs.sh" +} + +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} \ No newline at end of file diff --git a/.kokoro/docs/docs.cfg b/.kokoro/docs/docs.cfg new file mode 100644 index 00000000..8f43917d --- /dev/null +++ b/.kokoro/docs/docs.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 00000000..e386b181 --- /dev/null +++ b/.kokoro/presubmit/common.cfg @@ -0,0 +1,27 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python" + +# Use the trampoline script to run in docker. +build_file: "python-vision/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-vision/.kokoro/build.sh" +} diff --git a/.kokoro/presubmit/presubmit.cfg b/.kokoro/presubmit/presubmit.cfg new file mode 100644 index 00000000..8f43917d --- /dev/null +++ b/.kokoro/presubmit/presubmit.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh new file mode 100755 index 00000000..c5ebca90 --- /dev/null +++ b/.kokoro/publish-docs.sh @@ -0,0 +1,57 @@ +#!/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. + +#!/bin/bash + +set -eo pipefail + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +cd github/python-vision + +# Remove old nox +python3.6 -m pip uninstall --yes --quiet nox-automation + +# Install nox +python3.6 -m pip install --upgrade --quiet nox +python3.6 -m nox --version + +# build docs +nox -s docs + +python3 -m pip install gcp-docuploader + +# install a json parser +sudo apt-get update +sudo apt-get -y install software-properties-common +sudo add-apt-repository universe +sudo apt-get update +sudo apt-get -y install jq + +# create metadata +python3 -m docuploader create-metadata \ + --name=$(jq --raw-output '.name // empty' .repo-metadata.json) \ + --version=$(python3 setup.py --version) \ + --language=$(jq --raw-output '.language // empty' .repo-metadata.json) \ + --distribution-name=$(python3 setup.py --name) \ + --product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \ + --github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \ + --issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json) + +cat docs.metadata + +# upload docs +python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket docs-staging diff --git a/.kokoro/release.sh b/.kokoro/release.sh new file mode 100755 index 00000000..6a730710 --- /dev/null +++ b/.kokoro/release.sh @@ -0,0 +1,34 @@ +#!/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. + +#!/bin/bash + +set -eo pipefail + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +# Ensure that we have the latest versions of Twine, Wheel, and Setuptools. +python3 -m pip install --upgrade twine wheel setuptools + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Move into the package, build the distribution and upload. +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password") +cd github/python-vision +python3 setup.py sdist bdist_wheel +twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/* diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 00000000..dfeb9397 --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,64 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# 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" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-vision/.kokoro/release.sh" +} + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google_cloud_pypi_password" + } + } +} + +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +} diff --git a/.kokoro/release/release.cfg b/.kokoro/release/release.cfg new file mode 100644 index 00000000..8f43917d --- /dev/null +++ b/.kokoro/release/release.cfg @@ -0,0 +1 @@ +# Format: //devtools/kokoro/config/proto/build.proto \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100755 index 00000000..e8c4251f --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright 2017 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. + +set -eo pipefail + +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" || ret_code=$? + +chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh +${KOKORO_GFILE_DIR}/trampoline_cleanup.sh || true + +exit ${ret_code} diff --git a/.repo-metadata.json b/.repo-metadata.json index 2916236c..045cb92a 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -6,7 +6,7 @@ "issue_tracker": "https://issuetracker.google.com/issues?q=status:open%20componentid:187174", "release_level": "beta", "language": "python", - "repo": "googleapis/google-cloud-python", + "repo": "googleapis/python-vision", "distribution_name": "google-cloud-vision", "api_id": "vision.googleapis.com", "requires_billing": false diff --git a/CHANGELOG.md b/CHANGELOG.md index 08d6109c..fd928360 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-vision/#history +## [0.42.0](https://www.github.com/googleapis/python-vision/compare/v0.41.0...v0.42.0) (2020-02-03) + + +### Features + +* **vision:** undeprecate resource name helpers, add 2.7 sunset warning (via synth) ([#10052](https://www.github.com/googleapis/python-vision/issues/10052)) ([2c86705](https://www.github.com/googleapis/python-vision/commit/2c86705154ce219f8fb6bbbcc80832ec2b63baeb)) + ## 0.41.0 12-05-2019 14:49 PST diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..b3d1f602 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,44 @@ + +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 00000000..c8bdf4b5 --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,279 @@ +.. Generated by synthtool. DO NOT EDIT! +############ +Contributing +############ + +#. **Please sign one of the contributor license agreements below.** +#. Fork the repo, develop and test your code changes, add docs. +#. Make sure that your commit messages clearly describe the changes. +#. Send a pull request. (Please Read: `Faster Pull Request Reviews`_) + +.. _Faster Pull Request Reviews: https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews + +.. contents:: Here are some guidelines for hacking on the Google Cloud Client libraries. + +*************** +Adding Features +*************** + +In order to add a feature: + +- The feature must be documented in both the API and narrative + documentation. + +- The feature must work fully on the following CPython versions: 2.7, + 3.5, 3.6, and 3.7 on both UNIX and Windows. + +- The feature must not add unnecessary dependencies (where + "unnecessary" is of course subjective, but new dependencies should + be discussed). + +**************************** +Using a Development Checkout +**************************** + +You'll have to create a development environment using a Git checkout: + +- While logged into your GitHub account, navigate to the + ``python-vision`` `repo`_ on GitHub. + +- Fork and clone the ``python-vision`` repository to your GitHub account by + clicking the "Fork" button. + +- Clone your fork of ``python-vision`` from your GitHub account to your local + computer, substituting your account username and specifying the destination + as ``hack-on-python-vision``. E.g.:: + + $ cd ${HOME} + $ git clone git@github.com:USERNAME/python-vision.git hack-on-python-vision + $ cd hack-on-python-vision + # Configure remotes such that you can pull changes from the googleapis/python-vision + # repository into your local repository. + $ git remote add upstream git@github.com:googleapis/python-vision.git + # fetch and merge changes from upstream into master + $ git fetch upstream + $ git merge upstream/master + +Now your local repo is set up such that you will push changes to your GitHub +repo, from which you can submit a pull request. + +To work on the codebase and run the tests, we recommend using ``nox``, +but you can also use a ``virtualenv`` of your own creation. + +.. _repo: https://github.com/googleapis/python-vision + +Using ``nox`` +============= + +We use `nox `__ to instrument our tests. + +- To test your changes, run unit tests with ``nox``:: + + $ nox -s unit-2.7 + $ nox -s unit-3.7 + $ ... + + .. note:: + + The unit tests and system tests are described in the + ``noxfile.py`` files in each directory. + +.. nox: https://pypi.org/project/nox/ + +Note on Editable Installs / Develop Mode +======================================== + +- As mentioned previously, using ``setuptools`` in `develop mode`_ + or a ``pip`` `editable install`_ is not possible with this + library. This is because this library uses `namespace packages`_. + For context see `Issue #2316`_ and the relevant `PyPA issue`_. + + Since ``editable`` / ``develop`` mode can't be used, packages + need to be installed directly. Hence your changes to the source + tree don't get incorporated into the **already installed** + package. + +.. _namespace packages: https://www.python.org/dev/peps/pep-0420/ +.. _Issue #2316: https://github.com/GoogleCloudPlatform/google-cloud-python/issues/2316 +.. _PyPA issue: https://github.com/pypa/packaging-problems/issues/12 +.. _develop mode: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode +.. _editable install: https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs + +***************************************** +I'm getting weird errors... Can you help? +***************************************** + +If the error mentions ``Python.h`` not being found, +install ``python-dev`` and try again. +On Debian/Ubuntu:: + + $ sudo apt-get install python-dev + +************ +Coding Style +************ + +- PEP8 compliance, with exceptions defined in the linter configuration. + If you have ``nox`` installed, you can test that you have not introduced + any non-compliant code via:: + + $ nox -s lint + +- In order to make ``nox -s lint`` run faster, you can set some environment + variables:: + + export GOOGLE_CLOUD_TESTING_REMOTE="upstream" + export GOOGLE_CLOUD_TESTING_BRANCH="master" + + By doing this, you are specifying the location of the most up-to-date + version of ``python-vision``. The the suggested remote name ``upstream`` + should point to the official ``googleapis`` checkout and the + the branch should be the main branch on that remote (``master``). + +Exceptions to PEP8: + +- Many unit tests use a helper method, ``_call_fut`` ("FUT" is short for + "Function-Under-Test"), which is PEP8-incompliant, but more readable. + Some also use a local variable, ``MUT`` (short for "Module-Under-Test"). + +******************** +Running System Tests +******************** + +- To run system tests, you can execute:: + + $ nox -s system-3.7 + $ nox -s system-2.7 + + .. note:: + + System tests are only configured to run under Python 2.7 and + Python 3.7. For expediency, we do not run them in older versions + of Python 3. + + This alone will not run the tests. You'll need to change some local + auth settings and change some configuration in your project to + run all the tests. + +- System tests will be run against an actual project and + so you'll need to provide some environment variables to facilitate + authentication to your project: + + - ``GOOGLE_APPLICATION_CREDENTIALS``: The path to a JSON key file; + Such a file can be downloaded directly from the developer's console by clicking + "Generate new JSON key". See private key + `docs `__ + for more details. + +- Once you have downloaded your json keys, set the environment variable + ``GOOGLE_APPLICATION_CREDENTIALS`` to the absolute path of the json file:: + + $ export GOOGLE_APPLICATION_CREDENTIALS="/Users//path/to/app_credentials.json" + + +************* +Test Coverage +************* + +- The codebase *must* have 100% test statement coverage after each commit. + You can test coverage via ``nox -s cover``. + +****************************************************** +Documentation Coverage and Building HTML Documentation +****************************************************** + +If you fix a bug, and the bug requires an API or behavior modification, all +documentation in this package which references that API or behavior must be +changed to reflect the bug fix, ideally in the same commit that fixes the bug +or adds the feature. + +Build the docs via: + + $ nox -s docs + +******************************************** +Note About ``README`` as it pertains to PyPI +******************************************** + +The `description on PyPI`_ for the project comes directly from the +``README``. Due to the reStructuredText (``rst``) parser used by +PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst`` +instead of +``https://github.com/googleapis/python-vision/blob/master/CONTRIBUTING.rst``) +may cause problems creating links or rendering the description. + +.. _description on PyPI: https://pypi.org/project/google-cloud-vision + + +************************* +Supported Python Versions +************************* + +We support: + +- `Python 3.5`_ +- `Python 3.6`_ +- `Python 3.7`_ + +.. _Python 3.5: https://docs.python.org/3.5/ +.. _Python 3.6: https://docs.python.org/3.6/ +.. _Python 3.7: https://docs.python.org/3.7/ + + +Supported versions can be found in our ``noxfile.py`` `config`_. + +.. _config: https://github.com/googleapis/python-vision/blob/master/noxfile.py + +We explicitly decided not to support `Python 2.5`_ due to `decreased usage`_ +and lack of continuous integration `support`_. + +.. _Python 2.5: https://docs.python.org/2.5/ +.. _decreased usage: https://caremad.io/2013/10/a-look-at-pypi-downloads/ +.. _support: https://blog.travis-ci.com/2013-11-18-upcoming-build-environment-updates/ + +We have `dropped 2.6`_ as a supported version as well since Python 2.6 is no +longer supported by the core development team. + +Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020. + +We also explicitly decided to support Python 3 beginning with version +3.5. Reasons for this include: + +- Encouraging use of newest versions of Python 3 +- Taking the lead of `prominent`_ open-source `projects`_ +- `Unicode literal support`_ which allows for a cleaner codebase that + works in both Python 2 and Python 3 + +.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django +.. _projects: http://flask.pocoo.org/docs/0.10/python3/ +.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ +.. _dropped 2.6: https://github.com/googleapis/google-cloud-python/issues/995 + +********** +Versioning +********** + +This library follows `Semantic Versioning`_. + +.. _Semantic Versioning: http://semver.org/ + +Some packages are currently in major version zero (``0.y.z``), which means that +anything may change at any time and the public API should not be considered +stable. + +****************************** +Contributor License Agreements +****************************** + +Before we can accept your pull requests you'll need to sign a Contributor +License Agreement (CLA): + +- **If you are an individual writing original source code** and **you own the + intellectual property**, then you'll need to sign an + `individual CLA `__. +- **If you work for a company that wants to allow you to contribute your work**, + then you'll need to sign a + `corporate CLA `__. + +You can sign these electronically (just scroll to the bottom). After that, +we'll be able to accept your pull requests. diff --git a/MANIFEST.in b/MANIFEST.in index 9cbf175a..cd011be2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ +# Generated by synthtool. DO NOT EDIT! include README.rst LICENSE recursive-include google *.json *.proto recursive-include tests * diff --git a/docs/changelog.md b/docs/changelog.md index 235fc031..04c99a55 120000 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1 +1 @@ -../../vision/CHANGELOG.md \ No newline at end of file +../CHANGELOG.md \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 2fab64a5..72420fde 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath("..")) -__version__ = "0.1.0" +__version__ = "" # -- General configuration ------------------------------------------------ @@ -66,7 +66,7 @@ # General information about the project. project = u"google-cloud-vision" -copyright = u"2017, Google" +copyright = u"2019, Google" author = u"Google APIs" # The version info for the project you're documenting, acts as replacement for @@ -133,9 +133,9 @@ # further. For a list of options available for each theme, see the # documentation. html_theme_options = { - "description": "Google Cloud Client Libraries for Python", + "description": "Google Cloud Client Libraries for google-cloud-vision", "github_user": "googleapis", - "github_repo": "google-cloud-python", + "github_repo": "python-vision", "github_banner": True, "font_family": "'Roboto', Georgia, sans", "head_font_family": "'Roboto', Georgia, serif", @@ -318,7 +318,7 @@ u"google-cloud-vision Documentation", author, "google-cloud-vision", - "GAPIC library for the {metadata.shortName} v1p4beta1 service", + "google-cloud-vision Library", "APIs", ) ] @@ -339,14 +339,9 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { "python": ("http://python.readthedocs.org/en/latest/", None), - "gax": ("https://gax-python.readthedocs.org/en/latest/", None), "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google-gax": ("https://gax-python.readthedocs.io/en/latest/", 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), - "requests": ("https://requests.kennethreitz.org/en/master/", None), - "fastavro": ("https://fastavro.readthedocs.io/en/stable/", None), - "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None), } diff --git a/google/cloud/vision_v1/__init__.py b/google/cloud/vision_v1/__init__.py index 039c4eeb..8c033490 100644 --- a/google/cloud/vision_v1/__init__.py +++ b/google/cloud/vision_v1/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -19,6 +19,8 @@ from google.cloud.vision_helpers.decorators import add_single_feature_methods from google.cloud.vision_helpers import VisionHelpers +import sys +import warnings from google.cloud.vision_v1 import types from google.cloud.vision_v1.gapic import enums @@ -26,6 +28,15 @@ from google.cloud.vision_v1.gapic import product_search_client +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" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + @add_single_feature_methods class ImageAnnotatorClient(VisionHelpers, iac.ImageAnnotatorClient): __doc__ = iac.ImageAnnotatorClient.__doc__ diff --git a/google/cloud/vision_v1/gapic/enums.py b/google/cloud/vision_v1/gapic/enums.py index 76e1ae0d..80aa4fce 100644 --- a/google/cloud/vision_v1/gapic/enums.py +++ b/google/cloud/vision_v1/gapic/enums.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1/gapic/image_annotator_client.py b/google/cloud/vision_v1/gapic/image_annotator_client.py index 2b726e74..1dcf9e8c 100644 --- a/google/cloud/vision_v1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1/gapic/image_annotator_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1/gapic/product_search_client.py b/google/cloud/vision_v1/gapic/product_search_client.py index 904c6922..eb21f25a 100644 --- a/google/cloud/vision_v1/gapic/product_search_client.py +++ b/google/cloud/vision_v1/gapic/product_search_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -96,12 +96,7 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def location_path(cls, project, location): - """DEPRECATED. Return a fully-qualified location string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified location string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}", project=project, @@ -110,12 +105,7 @@ def location_path(cls, project, location): @classmethod def product_path(cls, project, location, product): - """DEPRECATED. Return a fully-qualified product string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified product string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/products/{product}", project=project, @@ -125,12 +115,7 @@ def product_path(cls, project, location, product): @classmethod def product_set_path(cls, project, location, product_set): - """DEPRECATED. Return a fully-qualified product_set string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified product_set string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/productSets/{product_set}", project=project, @@ -140,12 +125,7 @@ def product_set_path(cls, project, location, product_set): @classmethod def reference_image_path(cls, project, location, product, reference_image): - """DEPRECATED. Return a fully-qualified reference_image string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified reference_image string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}", project=project, 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 5bd4cfc0..5c6f0de4 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 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 4f042e41..61324c3c 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 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1/proto/geometry_pb2.py b/google/cloud/vision_v1/proto/geometry_pb2.py index 5a3416e3..e2b73d05 100644 --- a/google/cloud/vision_v1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1/proto/geometry_pb2.py @@ -347,9 +347,10 @@ dict( DESCRIPTOR=_POSITION, __module__="google.cloud.vision_v1.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. + __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: diff --git a/google/cloud/vision_v1/proto/image_annotator_pb2.py b/google/cloud/vision_v1/proto/image_annotator_pb2.py index 0cc11b9e..3e0f088f 100644 --- a/google/cloud/vision_v1/proto/image_annotator_pb2.py +++ b/google/cloud/vision_v1/proto/image_annotator_pb2.py @@ -3782,9 +3782,9 @@ dict( DESCRIPTOR=_FEATURE, __module__="google.cloud.vision_v1.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. + __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: @@ -3809,12 +3809,13 @@ dict( DESCRIPTOR=_IMAGESOURCE, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage or web URL image location). + __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 + \ **Use ``image_uri`` instead.** The Google Cloud Storage URI of the form ``gs://bucket_name/object_name``. Object versioning is not supported. See `Google Cloud Storage Request URIs `__ @@ -3846,7 +3847,8 @@ dict( DESCRIPTOR=_IMAGE, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + __doc__="""Client image to perform Google Cloud Vision API tasks + over. Attributes: @@ -3889,7 +3891,8 @@ ), DESCRIPTOR=_FACEANNOTATION, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + __doc__="""A face annotation object contains the results of face + detection. Attributes: @@ -3971,7 +3974,8 @@ dict( DESCRIPTOR=_PROPERTY, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + __doc__="""A ``Property`` consists of a user-supplied name/value + pair. Attributes: @@ -4010,7 +4014,7 @@ score: Overall score of the result. Range [0, 1]. confidence: - **Deprecated. Use ``score`` instead.** The accuracy of the + \ **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 represents the confidence that there is a tower in the query @@ -4077,9 +4081,9 @@ dict( DESCRIPTOR=_SAFESEARCHANNOTATION, __module__="google.cloud.vision_v1.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). + __doc__="""Set of features pertaining to the image, computed by + computer vision methods over safe-search verticals (for example, adult, + spoof, medical, violence). Attributes: @@ -4150,8 +4154,8 @@ dict( DESCRIPTOR=_COLORINFO, __module__="google.cloud.vision_v1.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. + __doc__="""Color information consists of RGB channels, score, and the + fraction of the image that the color occupies in the image. Attributes: @@ -4210,8 +4214,8 @@ dict( DESCRIPTOR=_CROPHINT, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Single crop hint that is used to generate a new crop when serving an - image. + __doc__="""Single crop hint that is used to generate a new crop when + serving an image. Attributes: @@ -4235,8 +4239,8 @@ dict( DESCRIPTOR=_CROPHINTSANNOTATION, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Set of crop hints that are used to generate new crops when serving - images. + __doc__="""Set of crop hints that are used to generate new crops when + serving images. Attributes: @@ -4331,8 +4335,8 @@ dict( 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 + __doc__="""Request for performing Google Cloud Vision API tasks over + a user-provided image, with user-requested features, and with context information. @@ -4355,8 +4359,8 @@ 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 - information about the source of that image. + __doc__="""If an image was produced from a file (e.g. a PDF), this + message gives information about the source of that image. Attributes: @@ -4428,8 +4432,8 @@ dict( DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service - call. + __doc__="""Multiple image annotation requests are batched into a + single service call. Attributes: @@ -4473,7 +4477,8 @@ 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. + __doc__="""A request to annotate one single file, e.g. a PDF, TIFF or + GIF file. Attributes: @@ -4506,8 +4511,8 @@ 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 or - more images, which individually have their own responses. + __doc__="""Response to a single file annotation request. A file may + contain one or more images, which individually have their own responses. Attributes: @@ -4534,7 +4539,8 @@ dict( DESCRIPTOR=_BATCHANNOTATEFILESREQUEST, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""A list of requests to annotate files using the BatchAnnotateFiles API. + __doc__="""A list of requests to annotate files using the + BatchAnnotateFiles API. Attributes: @@ -4673,8 +4679,8 @@ dict( DESCRIPTOR=_ASYNCBATCHANNOTATEFILESREQUEST, __module__="google.cloud.vision_v1.proto.image_annotator_pb2", - __doc__="""Multiple async file annotation requests are batched into a single - service call. + __doc__="""Multiple async file annotation requests are batched into a + single service call. Attributes: @@ -4776,7 +4782,8 @@ 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. + __doc__="""The Google Cloud Storage location where the input will be + read from. Attributes: @@ -4796,7 +4803,8 @@ 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. + __doc__="""The Google Cloud Storage location where the output will be + written to. Attributes: diff --git a/google/cloud/vision_v1/proto/product_search_pb2.py b/google/cloud/vision_v1/proto/product_search_pb2.py index 8797197d..c5c6d940 100644 --- a/google/cloud/vision_v1/proto/product_search_pb2.py +++ b/google/cloud/vision_v1/proto/product_search_pb2.py @@ -594,8 +594,8 @@ dict( DESCRIPTOR=_PRODUCTSEARCHRESULTS_GROUPEDRESULT, __module__="google.cloud.vision_v1.proto.product_search_pb2", - __doc__="""Information about the products similar to a single product in a query - image. + __doc__="""Information about the products similar to a single product + in a query image. Attributes: diff --git a/google/cloud/vision_v1/proto/product_search_service_pb2.py b/google/cloud/vision_v1/proto/product_search_service_pb2.py index befd0cbc..5ca9e1ce 100644 --- a/google/cloud/vision_v1/proto/product_search_service_pb2.py +++ b/google/cloud/vision_v1/proto/product_search_service_pb2.py @@ -2306,9 +2306,9 @@ dict( DESCRIPTOR=_PRODUCTSET, __module__="google.cloud.vision_v1.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. + __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: @@ -2341,8 +2341,8 @@ dict( DESCRIPTOR=_REFERENCEIMAGE, __module__="google.cloud.vision_v1.proto.product_search_service_pb2", - __doc__="""A ``ReferenceImage`` represents a product image and its associated - metadata, such as bounding boxes. + __doc__="""A ``ReferenceImage`` represents a product image and its + associated metadata, such as bounding boxes. Attributes: @@ -2791,7 +2791,8 @@ dict( DESCRIPTOR=_REMOVEPRODUCTFROMPRODUCTSETREQUEST, __module__="google.cloud.vision_v1.proto.product_search_service_pb2", - __doc__="""Request message for the ``RemoveProductFromProductSet`` method. + __doc__="""Request message for the ``RemoveProductFromProductSet`` + method. Attributes: @@ -2815,7 +2816,8 @@ dict( DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETREQUEST, __module__="google.cloud.vision_v1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProductsInProductSet`` method. + __doc__="""Request message for the ``ListProductsInProductSet`` + method. Attributes: @@ -2841,7 +2843,8 @@ dict( DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETRESPONSE, __module__="google.cloud.vision_v1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProductsInProductSet`` method. + __doc__="""Response message for the ``ListProductsInProductSet`` + method. Attributes: @@ -2862,8 +2865,8 @@ dict( DESCRIPTOR=_IMPORTPRODUCTSETSGCSSOURCE, __module__="google.cloud.vision_v1.proto.product_search_service_pb2", - __doc__="""The Google Cloud Storage location for a csv file which preserves a list - of ImportProductSetRequests in each line. + __doc__="""The Google Cloud Storage location for a csv file which + preserves a list of ImportProductSetRequests in each line. Attributes: @@ -2998,7 +3001,8 @@ dict( DESCRIPTOR=_BATCHOPERATIONMETADATA, __module__="google.cloud.vision_v1.proto.product_search_service_pb2", - __doc__="""Metadata for the batch operations such as the current state. + __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`` @@ -3026,7 +3030,8 @@ dict( DESCRIPTOR=_PRODUCTSETPURGECONFIG, __module__="google.cloud.vision_v1.proto.product_search_service_pb2", - __doc__="""Config to control which ProductSet contains the Products to be deleted. + __doc__="""Config to control which ProductSet contains the Products + to be deleted. Attributes: diff --git a/google/cloud/vision_v1/proto/text_annotation_pb2.py b/google/cloud/vision_v1/proto/text_annotation_pb2.py index 57627455..1b42d963 100644 --- a/google/cloud/vision_v1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1/proto/text_annotation_pb2.py @@ -933,7 +933,8 @@ dict( DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, __module__="google.cloud.vision_v1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + __doc__="""Additional information detected on the structural + component. Attributes: @@ -947,12 +948,12 @@ ), DESCRIPTOR=_TEXTANNOTATION, __module__="google.cloud.vision_v1.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 - properties. Properties describe detected languages, breaks etc.. Please - refer to the + __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 properties. Properties describe detected languages, breaks etc.. + Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more detail. @@ -1041,7 +1042,8 @@ dict( DESCRIPTOR=_PARAGRAPH, __module__="google.cloud.vision_v1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain order. + __doc__="""Structural unit of text representing a number of words in + certain order. Attributes: diff --git a/google/cloud/vision_v1/types.py b/google/cloud/vision_v1/types.py index 0eb8c577..6310a9dc 100644 --- a/google/cloud/vision_v1/types.py +++ b/google/cloud/vision_v1/types.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p1beta1/__init__.py b/google/cloud/vision_v1p1beta1/__init__.py index 560b03a8..2e05478f 100644 --- a/google/cloud/vision_v1p1beta1/__init__.py +++ b/google/cloud/vision_v1p1beta1/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -19,12 +19,23 @@ from google.cloud.vision_helpers.decorators import add_single_feature_methods from google.cloud.vision_helpers import VisionHelpers +import sys +import warnings from google.cloud.vision_v1p1beta1 import types from google.cloud.vision_v1p1beta1.gapic import enums from google.cloud.vision_v1p1beta1.gapic import image_annotator_client as iac +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" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + @add_single_feature_methods class ImageAnnotatorClient(VisionHelpers, iac.ImageAnnotatorClient): __doc__ = iac.ImageAnnotatorClient.__doc__ diff --git a/google/cloud/vision_v1p1beta1/gapic/enums.py b/google/cloud/vision_v1p1beta1/gapic/enums.py index caf4d634..f41f6b50 100644 --- a/google/cloud/vision_v1p1beta1/gapic/enums.py +++ b/google/cloud/vision_v1p1beta1/gapic/enums.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p1beta1/gapic/image_annotator_client.py b/google/cloud/vision_v1p1beta1/gapic/image_annotator_client.py index 2032a089..1e73ab43 100644 --- a/google/cloud/vision_v1p1beta1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1p1beta1/gapic/image_annotator_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -207,7 +207,7 @@ def batch_annotate_images( >>> response = client.batch_annotate_images(requests) Args: - requests (list[Union[dict, ~google.cloud.vision_v1p1beta1.types.AnnotateImageRequest]]): Individual image annotation requests for this batch. + requests (list[Union[dict, ~google.cloud.vision_v1p1beta1.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_v1p1beta1.types.AnnotateImageRequest` diff --git a/google/cloud/vision_v1p1beta1/gapic/transports/image_annotator_grpc_transport.py b/google/cloud/vision_v1p1beta1/gapic/transports/image_annotator_grpc_transport.py index f5100d6f..54c9b4f4 100644 --- a/google/cloud/vision_v1p1beta1/gapic/transports/image_annotator_grpc_transport.py +++ b/google/cloud/vision_v1p1beta1/gapic/transports/image_annotator_grpc_transport.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p1beta1/proto/geometry_pb2.py b/google/cloud/vision_v1p1beta1/proto/geometry_pb2.py index 1539aac0..5ddad26c 100644 --- a/google/cloud/vision_v1p1beta1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1p1beta1/proto/geometry_pb2.py @@ -246,9 +246,10 @@ dict( DESCRIPTOR=_POSITION, __module__="google.cloud.vision_v1p1beta1.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. + __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: diff --git a/google/cloud/vision_v1p1beta1/proto/image_annotator.proto b/google/cloud/vision_v1p1beta1/proto/image_annotator.proto index 4869a331..e9665c20 100644 --- a/google/cloud/vision_v1p1beta1/proto/image_annotator.proto +++ b/google/cloud/vision_v1p1beta1/proto/image_annotator.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p1beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/vision/v1p1beta1/geometry.proto"; import "google/cloud/vision/v1p1beta1/text_annotation.proto"; import "google/cloud/vision/v1p1beta1/web_detection.proto"; @@ -34,6 +37,11 @@ option java_package = "com.google.cloud.vision.v1p1beta1"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { @@ -41,6 +49,7 @@ service ImageAnnotator { post: "/v1p1beta1/images:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } } @@ -559,8 +568,8 @@ message AnnotateImageResponse { // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to a batch image annotation request. diff --git a/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py b/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py index cf3f4d75..df7db4c7 100644 --- a/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py +++ b/google/cloud/vision_v1p1beta1/proto/image_annotator_pb2.py @@ -17,6 +17,8 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.cloud.vision_v1p1beta1.proto import ( geometry_pb2 as google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_geometry__pb2, ) @@ -39,10 +41,12 @@ "\n!com.google.cloud.vision.v1p1beta1B\023ImageAnnotatorProtoP\001ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\370\001\001" ), serialized_pb=_b( - '\n9google/cloud/vision_v1p1beta1/proto/image_annotator.proto\x12\x1dgoogle.cloud.vision.v1p1beta1\x1a\x1cgoogle/api/annotations.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"c\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x45\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p1beta1.AnnotateImageRequest"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\xc6\x01\n\x0eImageAnnotator\x12\xb3\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse"%\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p1beta1/images:annotate:\x01*B\x82\x01\n!com.google.cloud.vision.v1p1beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p1beta1;vision\xf8\x01\x01\x62\x06proto3' + '\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, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_text__annotation__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p1beta1_dot_proto_dot_web__detection__pb2.DESCRIPTOR, @@ -79,8 +83,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=5631, - serialized_end=5732, + serialized_start=5694, + serialized_end=5795, ) _sym_db.RegisterEnumDescriptor(_LIKELIHOOD) @@ -163,8 +167,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=474, - serialized_end=720, + serialized_start=532, + serialized_end=778, ) _sym_db.RegisterEnumDescriptor(_FEATURE_TYPE) @@ -390,8 +394,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1865, - serialized_end=2685, + serialized_start=1923, + serialized_end=2743, ) _sym_db.RegisterEnumDescriptor(_FACEANNOTATION_LANDMARK_TYPE) @@ -466,8 +470,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=367, - serialized_end=720, + serialized_start=425, + serialized_end=778, ) @@ -523,8 +527,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=722, - serialized_end=777, + serialized_start=780, + serialized_end=835, ) @@ -580,8 +584,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=779, - serialized_end=863, + serialized_start=837, + serialized_end=921, ) @@ -637,8 +641,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1718, - serialized_end=2685, + serialized_start=1776, + serialized_end=2743, ) _FACEANNOTATION = _descriptor.Descriptor( @@ -927,8 +931,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=866, - serialized_end=2685, + serialized_start=924, + serialized_end=2743, ) @@ -966,8 +970,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2687, - serialized_end=2739, + serialized_start=2745, + serialized_end=2797, ) @@ -1041,8 +1045,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2741, - serialized_end=2802, + serialized_start=2799, + serialized_end=2860, ) @@ -1224,8 +1228,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2805, - serialized_end=3121, + serialized_start=2863, + serialized_end=3179, ) @@ -1335,8 +1339,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3124, - serialized_end=3440, + serialized_start=3182, + serialized_end=3498, ) @@ -1392,8 +1396,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3442, - serialized_end=3539, + serialized_start=3500, + serialized_end=3597, ) @@ -1467,8 +1471,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3541, - serialized_end=3626, + serialized_start=3599, + serialized_end=3684, ) @@ -1506,8 +1510,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3628, - serialized_end=3712, + serialized_start=3686, + serialized_end=3770, ) @@ -1545,8 +1549,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3714, - serialized_end=3813, + serialized_start=3772, + serialized_end=3871, ) @@ -1620,8 +1624,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3815, - serialized_end=3942, + serialized_start=3873, + serialized_end=4000, ) @@ -1659,8 +1663,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3944, - serialized_end=4026, + serialized_start=4002, + serialized_end=4084, ) @@ -1698,8 +1702,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4028, - serialized_end=4068, + serialized_start=4086, + serialized_end=4126, ) @@ -1737,8 +1741,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4070, - serialized_end=4119, + serialized_start=4128, + serialized_end=4177, ) @@ -1830,8 +1834,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4122, - serialized_end=4383, + serialized_start=4180, + serialized_end=4441, ) @@ -1905,8 +1909,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4386, - serialized_end=4587, + serialized_start=4444, + serialized_end=4645, ) @@ -2124,8 +2128,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4590, - serialized_end=5424, + serialized_start=4648, + serialized_end=5482, ) @@ -2151,7 +2155,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -2163,8 +2167,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5426, - serialized_end=5525, + serialized_start=5484, + serialized_end=5588, ) @@ -2202,8 +2206,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5527, - serialized_end=5629, + serialized_start=5590, + serialized_end=5692, ) _FEATURE.fields_by_name["type"].enum_type = _FEATURE_TYPE @@ -2350,10 +2354,11 @@ 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 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. + __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: @@ -2376,7 +2381,8 @@ dict( DESCRIPTOR=_IMAGESOURCE, __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage image location). + __doc__="""External image source (Google Cloud Storage image + location). Attributes: @@ -2410,7 +2416,8 @@ dict( DESCRIPTOR=_IMAGE, __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + __doc__="""Client image to perform Google Cloud Vision API tasks + over. Attributes: @@ -2453,7 +2460,8 @@ ), DESCRIPTOR=_FACEANNOTATION, __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + __doc__="""A face annotation object contains the results of face + detection. Attributes: @@ -2536,7 +2544,8 @@ dict( DESCRIPTOR=_PROPERTY, __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + __doc__="""A ``Property`` consists of a user-supplied name/value + pair. Attributes: @@ -2612,9 +2621,9 @@ dict( 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). + __doc__="""Set of features pertaining to the image, computed by + computer vision methods over safe-search verticals (for example, adult, + spoof, medical, violence). Attributes: @@ -2667,8 +2676,8 @@ dict( 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. + __doc__="""Color information consists of RGB channels, score, and the + fraction of the image that the color occupies in the image. Attributes: @@ -2727,8 +2736,8 @@ 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 - image. + __doc__="""Single crop hint that is used to generate a new crop when + serving an image. Attributes: @@ -2753,8 +2762,8 @@ 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 - images. + __doc__="""Set of crop hints that are used to generate new crops when + serving images. Attributes: @@ -2847,8 +2856,8 @@ dict( 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. + __doc__="""Request for performing Google Cloud Vision API tasks over + a user-provided image, with user-requested features. Attributes: @@ -2912,13 +2921,13 @@ dict( DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, __module__="google.cloud.vision_v1p1beta1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service - call. + __doc__="""Multiple image annotation requests are batched into a + single service call. Attributes: requests: - Individual image annotation requests for this batch. + Required. Individual image annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) ), @@ -2946,15 +2955,18 @@ DESCRIPTOR._options = None +_BATCHANNOTATEIMAGESREQUEST.fields_by_name["requests"]._options = None _IMAGEANNOTATOR = _descriptor.ServiceDescriptor( name="ImageAnnotator", full_name="google.cloud.vision.v1p1beta1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=5735, - serialized_end=5933, + serialized_options=_b( + "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" + ), + serialized_start=5798, + serialized_end=6127, methods=[ _descriptor.MethodDescriptor( name="BatchAnnotateImages", @@ -2964,7 +2976,7 @@ input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, serialized_options=_b( - '\202\323\344\223\002\037"\032/v1p1beta1/images:annotate:\001*' + '\202\323\344\223\002\037"\032/v1p1beta1/images:annotate:\001*\332A\010requests' ), ) ], diff --git a/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2.py b/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2.py index 79a8e2cc..f01efb06 100644 --- a/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1p1beta1/proto/text_annotation_pb2.py @@ -933,7 +933,8 @@ dict( DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + __doc__="""Additional information detected on the structural + component. Attributes: @@ -947,12 +948,12 @@ ), 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 - properties. Properties describe detected languages, breaks etc.. Please - refer to the + __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 properties. Properties describe detected languages, breaks etc.. + Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty] message definition below for more detail. @@ -1038,7 +1039,8 @@ dict( DESCRIPTOR=_PARAGRAPH, __module__="google.cloud.vision_v1p1beta1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain order. + __doc__="""Structural unit of text representing a number of words in + certain order. Attributes: diff --git a/google/cloud/vision_v1p1beta1/types.py b/google/cloud/vision_v1p1beta1/types.py index b66ea7ef..08c79370 100644 --- a/google/cloud/vision_v1p1beta1/types.py +++ b/google/cloud/vision_v1p1beta1/types.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p2beta1/__init__.py b/google/cloud/vision_v1p2beta1/__init__.py index 894e2874..19f8c4e5 100644 --- a/google/cloud/vision_v1p2beta1/__init__.py +++ b/google/cloud/vision_v1p2beta1/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -19,12 +19,23 @@ from google.cloud.vision_helpers.decorators import add_single_feature_methods from google.cloud.vision_helpers import VisionHelpers +import sys +import warnings from google.cloud.vision_v1p2beta1 import types from google.cloud.vision_v1p2beta1.gapic import enums from google.cloud.vision_v1p2beta1.gapic import image_annotator_client as iac +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" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + @add_single_feature_methods class ImageAnnotatorClient(VisionHelpers, iac.ImageAnnotatorClient): __doc__ = iac.ImageAnnotatorClient.__doc__ diff --git a/google/cloud/vision_v1p2beta1/gapic/enums.py b/google/cloud/vision_v1p2beta1/gapic/enums.py index bb6c189a..cda4f64c 100644 --- a/google/cloud/vision_v1p2beta1/gapic/enums.py +++ b/google/cloud/vision_v1p2beta1/gapic/enums.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.py b/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.py index 742ce5ff..28f7ce16 100644 --- a/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -210,7 +210,7 @@ def batch_annotate_images( >>> response = client.batch_annotate_images(requests) Args: - requests (list[Union[dict, ~google.cloud.vision_v1p2beta1.types.AnnotateImageRequest]]): Individual image 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.AnnotateImageRequest` @@ -284,7 +284,7 @@ def async_batch_annotate_files( >>> metadata = response.metadata() Args: - requests (list[Union[dict, ~google.cloud.vision_v1p2beta1.types.AsyncAnnotateFileRequest]]): Individual async file 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.AsyncAnnotateFileRequest` 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 2b469eed..40345e17 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 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p2beta1/proto/geometry_pb2.py b/google/cloud/vision_v1p2beta1/proto/geometry_pb2.py index 969d95d1..2089062f 100644 --- a/google/cloud/vision_v1p2beta1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1p2beta1/proto/geometry_pb2.py @@ -343,9 +343,10 @@ dict( 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. + __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: diff --git a/google/cloud/vision_v1p2beta1/proto/image_annotator.proto b/google/cloud/vision_v1p2beta1/proto/image_annotator.proto index c5fce50f..8b0756d2 100644 --- a/google/cloud/vision_v1p2beta1/proto/image_annotator.proto +++ b/google/cloud/vision_v1p2beta1/proto/image_annotator.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p2beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/vision/v1p2beta1/geometry.proto"; import "google/cloud/vision/v1p2beta1/text_annotation.proto"; import "google/cloud/vision/v1p2beta1/web_detection.proto"; @@ -36,13 +39,18 @@ option java_package = "com.google.cloud.vision.v1p2beta1"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) - returns (BatchAnnotateImagesResponse) { + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { option (google.api.http) = { post: "/v1p2beta1/images:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } // Run async image detection and annotation for a list of generic files (e.g. @@ -51,12 +59,16 @@ service ImageAnnotator { // `google.longrunning.Operations` interface. // `Operation.metadata` contains `OperationMetadata` (metadata). // `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results). - rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) - returns (google.longrunning.Operation) { + rpc AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1p2beta1/files:asyncBatchAnnotate" body: "*" }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; } } @@ -612,8 +624,8 @@ message AnnotateFileResponse { // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to a batch image annotation request. @@ -646,8 +658,8 @@ message AsyncAnnotateFileResponse { // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { - // Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1; + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to an async batch file annotation request. diff --git a/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py b/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py index 234e46f0..1b4eec12 100644 --- a/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py +++ b/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py @@ -17,6 +17,8 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.cloud.vision_v1p2beta1.proto import ( geometry_pb2 as google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_geometry__pb2, ) @@ -43,10 +45,12 @@ "\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\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"c\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x45\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p2beta1.AnnotateImageRequest"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"k\n\x1e\x41syncBatchAnnotateFilesRequest\x12I\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest"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\xf0\x02\n\x0eImageAnnotator\x12\xb3\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse"%\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p2beta1/images:annotate:\x01*\x12\xa7\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation".\x82\xd3\xe4\x93\x02("#/v1p2beta1/files:asyncBatchAnnotate:\x01*B\x82\x01\n!com.google.cloud.vision.v1p2beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p2beta1;vision\xf8\x01\x01\x62\x06proto3' + '\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, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_text__annotation__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p2beta1_dot_proto_dot_web__detection__pb2.DESCRIPTOR, @@ -85,8 +89,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=7139, - serialized_end=7240, + serialized_start=7207, + serialized_end=7308, ) _sym_db.RegisterEnumDescriptor(_LIKELIHOOD) @@ -169,8 +173,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=544, - serialized_end=790, + serialized_start=602, + serialized_end=848, ) _sym_db.RegisterEnumDescriptor(_FEATURE_TYPE) @@ -396,8 +400,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1935, - serialized_end=2755, + serialized_start=1993, + serialized_end=2813, ) _sym_db.RegisterEnumDescriptor(_FACEANNOTATION_LANDMARK_TYPE) @@ -429,8 +433,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=7056, - serialized_end=7137, + serialized_start=7124, + serialized_end=7205, ) _sym_db.RegisterEnumDescriptor(_OPERATIONMETADATA_STATE) @@ -505,8 +509,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=437, - serialized_end=790, + serialized_start=495, + serialized_end=848, ) @@ -562,8 +566,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=792, - serialized_end=847, + serialized_start=850, + serialized_end=905, ) @@ -619,8 +623,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=849, - serialized_end=933, + serialized_start=907, + serialized_end=991, ) @@ -676,8 +680,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1788, - serialized_end=2755, + serialized_start=1846, + serialized_end=2813, ) _FACEANNOTATION = _descriptor.Descriptor( @@ -966,8 +970,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=936, - serialized_end=2755, + serialized_start=994, + serialized_end=2813, ) @@ -1005,8 +1009,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2757, - serialized_end=2809, + serialized_start=2815, + serialized_end=2867, ) @@ -1080,8 +1084,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2811, - serialized_end=2872, + serialized_start=2869, + serialized_end=2930, ) @@ -1263,8 +1267,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2875, - serialized_end=3191, + serialized_start=2933, + serialized_end=3249, ) @@ -1374,8 +1378,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3194, - serialized_end=3510, + serialized_start=3252, + serialized_end=3568, ) @@ -1431,8 +1435,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3512, - serialized_end=3609, + serialized_start=3570, + serialized_end=3667, ) @@ -1506,8 +1510,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3611, - serialized_end=3696, + serialized_start=3669, + serialized_end=3754, ) @@ -1545,8 +1549,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3698, - serialized_end=3782, + serialized_start=3756, + serialized_end=3840, ) @@ -1584,8 +1588,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3784, - serialized_end=3883, + serialized_start=3842, + serialized_end=3941, ) @@ -1659,8 +1663,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3885, - serialized_end=4012, + serialized_start=3943, + serialized_end=4070, ) @@ -1698,8 +1702,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4014, - serialized_end=4096, + serialized_start=4072, + serialized_end=4154, ) @@ -1737,8 +1741,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4098, - serialized_end=4138, + serialized_start=4156, + serialized_end=4196, ) @@ -1776,8 +1780,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4140, - serialized_end=4189, + serialized_start=4198, + serialized_end=4247, ) @@ -1869,8 +1873,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4192, - serialized_end=4453, + serialized_start=4250, + serialized_end=4511, ) @@ -1944,8 +1948,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4456, - serialized_end=4657, + serialized_start=4514, + serialized_end=4715, ) @@ -2001,8 +2005,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4659, - serialized_end=4717, + serialized_start=4717, + serialized_end=4775, ) @@ -2238,8 +2242,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4720, - serialized_end=5626, + serialized_start=4778, + serialized_end=5684, ) @@ -2295,8 +2299,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5629, - serialized_end=5790, + serialized_start=5687, + serialized_end=5848, ) @@ -2322,7 +2326,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -2334,8 +2338,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5792, - serialized_end=5891, + serialized_start=5850, + serialized_end=5954, ) @@ -2373,8 +2377,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5893, - serialized_end=5995, + serialized_start=5956, + serialized_end=6058, ) @@ -2466,8 +2470,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5998, - serialized_end=6284, + serialized_start=6061, + serialized_end=6347, ) @@ -2505,8 +2509,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6286, - serialized_end=6381, + serialized_start=6349, + serialized_end=6444, ) @@ -2532,7 +2536,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -2544,8 +2548,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6383, - serialized_end=6490, + serialized_start=6446, + serialized_end=6558, ) @@ -2583,8 +2587,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6492, - serialized_end=6602, + serialized_start=6560, + serialized_end=6670, ) @@ -2640,8 +2644,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6604, - serialized_end=6698, + serialized_start=6672, + serialized_end=6766, ) @@ -2697,8 +2701,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6700, - serialized_end=6806, + serialized_start=6768, + serialized_end=6874, ) @@ -2736,8 +2740,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6808, - serialized_end=6832, + serialized_start=6876, + serialized_end=6900, ) @@ -2775,8 +2779,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6834, - serialized_end=6863, + serialized_start=6902, + serialized_end=6931, ) @@ -2850,8 +2854,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6866, - serialized_end=7137, + serialized_start=6934, + serialized_end=7205, ) _FEATURE.fields_by_name["type"].enum_type = _FEATURE_TYPE @@ -3039,9 +3043,9 @@ 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 - maximum number of results to return for that type. Multiple ``Feature`` - objects can be specified in the ``features`` list. + __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: @@ -3066,12 +3070,13 @@ dict( DESCRIPTOR=_IMAGESOURCE, __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage or web URL image location). + __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 + \ **Use ``image_uri`` instead.** The Google Cloud Storage URI of the form ``gs://bucket_name/object_name``. Object versioning is not supported. See `Google Cloud Storage Request URIs `__ @@ -3103,7 +3108,8 @@ dict( DESCRIPTOR=_IMAGE, __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + __doc__="""Client image to perform Google Cloud Vision API tasks + over. Attributes: @@ -3146,7 +3152,8 @@ ), DESCRIPTOR=_FACEANNOTATION, __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + __doc__="""A face annotation object contains the results of face + detection. Attributes: @@ -3229,7 +3236,8 @@ dict( DESCRIPTOR=_PROPERTY, __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + __doc__="""A ``Property`` consists of a user-supplied name/value + pair. Attributes: @@ -3268,7 +3276,7 @@ score: Overall score of the result. Range [0, 1]. confidence: - **Deprecated. Use ``score`` instead.** The accuracy of the + \ **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 represents the confidence that there is a tower in the query @@ -3361,8 +3369,8 @@ dict( 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. + __doc__="""Color information consists of RGB channels, score, and the + fraction of the image that the color occupies in the image. Attributes: @@ -3421,8 +3429,8 @@ 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 - image. + __doc__="""Single crop hint that is used to generate a new crop when + serving an image. Attributes: @@ -3447,8 +3455,8 @@ 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 - images. + __doc__="""Set of crop hints that are used to generate new crops when + serving images. Attributes: @@ -3541,8 +3549,8 @@ dict( 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. + __doc__="""Request for performing Google Cloud Vision API tasks over + a user-provided image, with user-requested features. Attributes: @@ -3564,8 +3572,8 @@ 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 - information about the source of that image. + __doc__="""If an image was produced from a file (e.g. a PDF), this + message gives information about the source of that image. Attributes: @@ -3631,8 +3639,8 @@ 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 or - more images, which individually have their own responses. + __doc__="""Response to a single file annotation request. A file may + contain one or more images, which individually have their own responses. Attributes: @@ -3653,13 +3661,13 @@ dict( DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service - call. + __doc__="""Multiple image annotation requests are batched into a + single service call. Attributes: requests: - Individual image annotation requests for this batch. + Required. Individual image annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) ), @@ -3736,13 +3744,14 @@ dict( DESCRIPTOR=_ASYNCBATCHANNOTATEFILESREQUEST, __module__="google.cloud.vision_v1p2beta1.proto.image_annotator_pb2", - __doc__="""Multiple async file annotation requests are batched into a single - service call. + __doc__="""Multiple async file annotation requests are batched into a + single service call. Attributes: requests: - Individual async file annotation requests for this batch. + Required. Individual async file annotation requests for this + batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) ), @@ -3823,7 +3832,8 @@ 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. + __doc__="""The Google Cloud Storage location where the input will be + read from. Attributes: @@ -3842,7 +3852,8 @@ 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. + __doc__="""The Google Cloud Storage location where the output will be + written to. Attributes: @@ -3888,15 +3899,19 @@ DESCRIPTOR._options = None +_BATCHANNOTATEIMAGESREQUEST.fields_by_name["requests"]._options = None +_ASYNCBATCHANNOTATEFILESREQUEST.fields_by_name["requests"]._options = None _IMAGEANNOTATOR = _descriptor.ServiceDescriptor( name="ImageAnnotator", full_name="google.cloud.vision.v1p2beta1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=7243, - serialized_end=7611, + serialized_options=_b( + "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" + ), + serialized_start=7311, + serialized_end=7876, methods=[ _descriptor.MethodDescriptor( name="BatchAnnotateImages", @@ -3906,7 +3921,7 @@ input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, serialized_options=_b( - '\202\323\344\223\002\037"\032/v1p2beta1/images:annotate:\001*' + '\202\323\344\223\002\037"\032/v1p2beta1/images:annotate:\001*\332A\010requests' ), ), _descriptor.MethodDescriptor( @@ -3917,7 +3932,7 @@ input_type=_ASYNCBATCHANNOTATEFILESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002("#/v1p2beta1/files:asyncBatchAnnotate:\001*' + '\202\323\344\223\002("#/v1p2beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata' ), ), ], diff --git a/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.py b/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.py index fe004b83..4d63c57f 100644 --- a/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.py @@ -933,7 +933,8 @@ dict( DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + __doc__="""Additional information detected on the structural + component. Attributes: @@ -947,12 +948,12 @@ ), 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 - properties. Properties describe detected languages, breaks etc.. Please - refer to the + __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 properties. Properties describe detected languages, breaks etc.. + Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty] message definition below for more detail. @@ -1041,7 +1042,8 @@ dict( DESCRIPTOR=_PARAGRAPH, __module__="google.cloud.vision_v1p2beta1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain order. + __doc__="""Structural unit of text representing a number of words in + certain order. Attributes: diff --git a/google/cloud/vision_v1p2beta1/types.py b/google/cloud/vision_v1p2beta1/types.py index 250cb6f5..74d539aa 100644 --- a/google/cloud/vision_v1p2beta1/types.py +++ b/google/cloud/vision_v1p2beta1/types.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p3beta1/__init__.py b/google/cloud/vision_v1p3beta1/__init__.py index 6217dd7d..65b99da6 100644 --- a/google/cloud/vision_v1p3beta1/__init__.py +++ b/google/cloud/vision_v1p3beta1/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -19,6 +19,8 @@ from google.cloud.vision_helpers.decorators import add_single_feature_methods from google.cloud.vision_helpers import VisionHelpers +import sys +import warnings from google.cloud.vision_v1p3beta1 import types from google.cloud.vision_v1p3beta1.gapic import enums @@ -26,6 +28,15 @@ from google.cloud.vision_v1p3beta1.gapic import product_search_client +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" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class ProductSearchClient(product_search_client.ProductSearchClient): __doc__ = product_search_client.ProductSearchClient.__doc__ enums = enums diff --git a/google/cloud/vision_v1p3beta1/gapic/enums.py b/google/cloud/vision_v1p3beta1/gapic/enums.py index e48d6ff4..8755caa9 100644 --- a/google/cloud/vision_v1p3beta1/gapic/enums.py +++ b/google/cloud/vision_v1p3beta1/gapic/enums.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p3beta1/gapic/image_annotator_client.py b/google/cloud/vision_v1p3beta1/gapic/image_annotator_client.py index 945213e8..88155cbb 100644 --- a/google/cloud/vision_v1p3beta1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1p3beta1/gapic/image_annotator_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -288,7 +288,7 @@ def async_batch_annotate_files( >>> metadata = response.metadata() Args: - requests (list[Union[dict, ~google.cloud.vision_v1p3beta1.types.AsyncAnnotateFileRequest]]): Individual async file annotation requests for this batch. + requests (list[Union[dict, ~google.cloud.vision_v1p3beta1.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_v1p3beta1.types.AsyncAnnotateFileRequest` diff --git a/google/cloud/vision_v1p3beta1/gapic/product_search_client.py b/google/cloud/vision_v1p3beta1/gapic/product_search_client.py index d7f99dce..3a9551e0 100644 --- a/google/cloud/vision_v1p3beta1/gapic/product_search_client.py +++ b/google/cloud/vision_v1p3beta1/gapic/product_search_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -93,12 +93,7 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def location_path(cls, project, location): - """DEPRECATED. Return a fully-qualified location string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified location string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}", project=project, @@ -107,12 +102,7 @@ def location_path(cls, project, location): @classmethod def product_path(cls, project, location, product): - """DEPRECATED. Return a fully-qualified product string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified product string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/products/{product}", project=project, @@ -122,12 +112,7 @@ def product_path(cls, project, location, product): @classmethod def product_set_path(cls, project, location, product_set): - """DEPRECATED. Return a fully-qualified product_set string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified product_set string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/productSets/{product_set}", project=project, @@ -137,12 +122,7 @@ def product_set_path(cls, project, location, product_set): @classmethod def reference_image_path(cls, project, location, product, reference_image): - """DEPRECATED. Return a fully-qualified reference_image string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified reference_image string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}", project=project, @@ -297,10 +277,10 @@ def create_product_set( >>> response = client.create_product_set(parent, product_set, product_set_id) Args: - parent (str): The project in which the ProductSet should be created. + parent (str): Required. The project in which the ProductSet should be created. Format is ``projects/PROJECT_ID/locations/LOC_ID``. - product_set (Union[dict, ~google.cloud.vision_v1p3beta1.types.ProductSet]): The ProductSet to create. + product_set (Union[dict, ~google.cloud.vision_v1p3beta1.types.ProductSet]): Required. The ProductSet to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p3beta1.types.ProductSet` @@ -396,7 +376,7 @@ def list_product_sets( ... pass Args: - parent (str): The project from which ProductSets should be listed. + parent (str): Required. The project from which ProductSets should be listed. Format is ``projects/PROJECT_ID/locations/LOC_ID``. page_size (int): The maximum number of resources contained in the @@ -492,10 +472,10 @@ def get_product_set( >>> response = client.get_product_set(name) Args: - name (str): Resource name of the ProductSet to get. + name (str): Required. Resource name of the ProductSet to get. Format is: - ``projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`` + ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` 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. @@ -576,7 +556,7 @@ def update_product_set( >>> response = client.update_product_set(product_set, update_mask) Args: - product_set (Union[dict, ~google.cloud.vision_v1p3beta1.types.ProductSet]): The ProductSet resource which replaces the one on the server. + 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` @@ -663,7 +643,7 @@ def delete_product_set( >>> client.delete_product_set(name) Args: - name (str): Resource name of the ProductSet to delete. + name (str): Required. Resource name of the ProductSet to delete. Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` @@ -748,10 +728,10 @@ def create_product( >>> response = client.create_product(parent, product, product_id) Args: - parent (str): The project in which the Product should be created. + parent (str): Required. The project in which the Product should be created. Format is ``projects/PROJECT_ID/locations/LOC_ID``. - product (Union[dict, ~google.cloud.vision_v1p3beta1.types.Product]): The product to create. + product (Union[dict, ~google.cloud.vision_v1p3beta1.types.Product]): Required. The product to create. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p3beta1.types.Product` @@ -847,7 +827,8 @@ def list_products( ... pass Args: - parent (str): The project OR ProductSet from which Products should be listed. + parent (str): Required. The project OR ProductSet from which Products should be + listed. Format: ``projects/PROJECT_ID/locations/LOC_ID`` page_size (int): The maximum number of resources contained in the @@ -943,7 +924,7 @@ def get_product( >>> response = client.get_product(name) Args: - name (str): Resource name of the Product to get. + name (str): Required. Resource name of the Product to get. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1033,14 +1014,14 @@ def update_product( >>> response = client.update_product(product, update_mask) Args: - product (Union[dict, ~google.cloud.vision_v1p3beta1.types.Product]): The Product resource which replaces the one on the server. + product (Union[dict, ~google.cloud.vision_v1p3beta1.types.Product]): Required. The Product resource which replaces the one on the server. product.name is immutable. If a dict is provided, it must be of the same form as the protobuf 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``. + 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` @@ -1122,7 +1103,7 @@ def delete_product( >>> client.delete_product(name) Args: - name (str): Resource name of product to delete. + name (str): Required. Resource name of product to delete. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1218,10 +1199,11 @@ def create_reference_image( >>> response = client.create_reference_image(parent, reference_image, reference_image_id) Args: - parent (str): Resource name of the product in which to create the reference image. + parent (str): Required. Resource name of the product in which to create the reference + image. Format is ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID``. - reference_image (Union[dict, ~google.cloud.vision_v1p3beta1.types.ReferenceImage]): The reference image to create. + reference_image (Union[dict, ~google.cloud.vision_v1p3beta1.types.ReferenceImage]): Required. The reference image to create. If an image ID is specified, it is ignored. If a dict is provided, it must be of the same form as the protobuf @@ -1312,7 +1294,7 @@ def delete_reference_image( >>> client.delete_reference_image(name) Args: - name (str): The resource name of the reference image to delete. + name (str): Required. The resource name of the reference image to delete. Format is: @@ -1401,7 +1383,7 @@ def list_reference_images( ... pass Args: - parent (str): Resource name of the product containing the reference images. + parent (str): Required. Resource name of the product containing the reference images. Format is ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID``. page_size (int): The maximum number of resources contained in the @@ -1497,7 +1479,7 @@ def get_reference_image( >>> response = client.get_reference_image(name) Args: - name (str): The resource name of the ReferenceImage to get. + name (str): Required. The resource name of the ReferenceImage to get. Format is: @@ -1581,11 +1563,12 @@ def add_product_to_product_set( >>> client.add_product_to_product_set(name, product) Args: - name (str): The resource name for the ProductSet to modify. + name (str): Required. The resource name for the ProductSet to modify. Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` - product (str): The resource name for the Product to be added to this ProductSet. + product (str): Required. The resource name for the Product to be added to this + ProductSet. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1663,11 +1646,12 @@ def remove_product_from_product_set( >>> client.remove_product_from_product_set(name, product) Args: - name (str): The resource name for the ProductSet to modify. + name (str): Required. The resource name for the ProductSet to modify. Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` - product (str): The resource name for the Product to be removed from this ProductSet. + product (str): Required. The resource name for the Product to be removed from this + ProductSet. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` retry (Optional[google.api_core.retry.Retry]): A retry object used @@ -1759,7 +1743,7 @@ def list_products_in_product_set( ... pass Args: - name (str): The ProductSet resource for which to retrieve Products. + name (str): Required. The ProductSet resource for which to retrieve Products. Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` @@ -1877,10 +1861,10 @@ def import_product_sets( >>> metadata = response.metadata() Args: - parent (str): The project in which the ProductSets should be imported. + parent (str): Required. The project in which the ProductSets should be imported. Format is ``projects/PROJECT_ID/locations/LOC_ID``. - input_config (Union[dict, ~google.cloud.vision_v1p3beta1.types.ImportProductSetsInputConfig]): The input content for the list of requests. + 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` 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 538ff7dc..926c3a5c 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 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 b2654635..302033b2 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 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p3beta1/proto/geometry_pb2.py b/google/cloud/vision_v1p3beta1/proto/geometry_pb2.py index f2ba6734..2dea7b69 100644 --- a/google/cloud/vision_v1p3beta1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/geometry_pb2.py @@ -388,7 +388,8 @@ dict( DESCRIPTOR=_NORMALIZEDBOUNDINGPOLY, __module__="google.cloud.vision_v1p3beta1.proto.geometry_pb2", - __doc__="""A normalized bounding polygon around a portion of an image. + __doc__="""A normalized bounding polygon around a portion of an + image. Attributes: @@ -406,9 +407,10 @@ dict( 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. + __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: diff --git a/google/cloud/vision_v1p3beta1/proto/image_annotator.proto b/google/cloud/vision_v1p3beta1/proto/image_annotator.proto index 2ac3ddb8..b1c5ee41 100644 --- a/google/cloud/vision_v1p3beta1/proto/image_annotator.proto +++ b/google/cloud/vision_v1p3beta1/proto/image_annotator.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p3beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; import "google/cloud/vision/v1p3beta1/geometry.proto"; import "google/cloud/vision/v1p3beta1/product_search.proto"; import "google/cloud/vision/v1p3beta1/text_annotation.proto"; @@ -37,13 +40,18 @@ option java_package = "com.google.cloud.vision.v1p3beta1"; // images, such as face, landmark, logo, label, and text detection. The // ImageAnnotator service returns detected entities from the images. service ImageAnnotator { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Run image detection and annotation for a batch of images. - rpc BatchAnnotateImages(BatchAnnotateImagesRequest) - returns (BatchAnnotateImagesResponse) { + rpc BatchAnnotateImages(BatchAnnotateImagesRequest) returns (BatchAnnotateImagesResponse) { option (google.api.http) = { post: "/v1p3beta1/images:annotate" body: "*" }; + option (google.api.method_signature) = "requests"; } // Run asynchronous image detection and annotation for a list of generic @@ -58,6 +66,11 @@ service ImageAnnotator { post: "/v1p3beta1/files:asyncBatchAnnotate" body: "*" }; + option (google.api.method_signature) = "requests"; + option (google.longrunning.operation_info) = { + response_type: "AsyncBatchAnnotateFilesResponse" + metadata_type: "OperationMetadata" + }; } } @@ -684,8 +697,8 @@ message AsyncAnnotateFileResponse { // Multiple async file annotation requests are batched into a single service // call. message AsyncBatchAnnotateFilesRequest { - // Individual async file annotation requests for this batch. - repeated AsyncAnnotateFileRequest requests = 1; + // Required. Individual async file annotation requests for this batch. + repeated AsyncAnnotateFileRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to an async batch file annotation request. diff --git a/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2.py b/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2.py index 93adcbe6..5b44a085 100644 --- a/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/image_annotator_pb2.py @@ -17,6 +17,8 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.cloud.vision_v1p3beta1.proto import ( geometry_pb2 as google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_geometry__pb2, ) @@ -46,10 +48,12 @@ "\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\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"k\n\x1e\x41syncBatchAnnotateFilesRequest\x12I\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest"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\xf0\x02\n\x0eImageAnnotator\x12\xb3\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse"%\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p3beta1/images:annotate:\x01*\x12\xa7\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation".\x82\xd3\xe4\x93\x02("#/v1p3beta1/files:asyncBatchAnnotate:\x01*B\x82\x01\n!com.google.cloud.vision.v1p3beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3' + '\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, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_text__annotation__pb2.DESCRIPTOR, @@ -89,8 +93,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=7669, - serialized_end=7770, + serialized_start=7732, + serialized_end=7833, ) _sym_db.RegisterEnumDescriptor(_LIKELIHOOD) @@ -187,8 +191,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=602, - serialized_end=893, + serialized_start=660, + serialized_end=951, ) _sym_db.RegisterEnumDescriptor(_FEATURE_TYPE) @@ -414,8 +418,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=2038, - serialized_end=2858, + serialized_start=2096, + serialized_end=2916, ) _sym_db.RegisterEnumDescriptor(_FACEANNOTATION_LANDMARK_TYPE) @@ -447,8 +451,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=7586, - serialized_end=7667, + serialized_start=7649, + serialized_end=7730, ) _sym_db.RegisterEnumDescriptor(_OPERATIONMETADATA_STATE) @@ -523,8 +527,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=495, - serialized_end=893, + serialized_start=553, + serialized_end=951, ) @@ -580,8 +584,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=895, - serialized_end=950, + serialized_start=953, + serialized_end=1008, ) @@ -637,8 +641,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=952, - serialized_end=1036, + serialized_start=1010, + serialized_end=1094, ) @@ -694,8 +698,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1891, - serialized_end=2858, + serialized_start=1949, + serialized_end=2916, ) _FACEANNOTATION = _descriptor.Descriptor( @@ -984,8 +988,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1039, - serialized_end=2858, + serialized_start=1097, + serialized_end=2916, ) @@ -1023,8 +1027,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2860, - serialized_end=2912, + serialized_start=2918, + serialized_end=2970, ) @@ -1098,8 +1102,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2914, - serialized_end=2975, + serialized_start=2972, + serialized_end=3033, ) @@ -1281,8 +1285,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2978, - serialized_end=3294, + serialized_start=3036, + serialized_end=3352, ) @@ -1392,8 +1396,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3297, - serialized_end=3457, + serialized_start=3355, + serialized_end=3515, ) @@ -1503,8 +1507,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3460, - serialized_end=3776, + serialized_start=3518, + serialized_end=3834, ) @@ -1560,8 +1564,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3778, - serialized_end=3875, + serialized_start=3836, + serialized_end=3933, ) @@ -1635,8 +1639,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3877, - serialized_end=3962, + serialized_start=3935, + serialized_end=4020, ) @@ -1674,8 +1678,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3964, - serialized_end=4048, + serialized_start=4022, + serialized_end=4106, ) @@ -1713,8 +1717,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4050, - serialized_end=4149, + serialized_start=4108, + serialized_end=4207, ) @@ -1788,8 +1792,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4151, - serialized_end=4278, + serialized_start=4209, + serialized_end=4336, ) @@ -1827,8 +1831,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4280, - serialized_end=4362, + serialized_start=4338, + serialized_end=4420, ) @@ -1866,8 +1870,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4364, - serialized_end=4404, + serialized_start=4422, + serialized_end=4462, ) @@ -1905,8 +1909,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4406, - serialized_end=4455, + serialized_start=4464, + serialized_end=4513, ) @@ -2016,8 +2020,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4458, - serialized_end=4802, + serialized_start=4516, + serialized_end=4860, ) @@ -2091,8 +2095,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4805, - serialized_end=5006, + serialized_start=4863, + serialized_end=5064, ) @@ -2148,8 +2152,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5008, - serialized_end=5066, + serialized_start=5066, + serialized_end=5124, ) @@ -2421,8 +2425,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5069, - serialized_end=6156, + serialized_start=5127, + serialized_end=6214, ) @@ -2478,8 +2482,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6159, - serialized_end=6320, + serialized_start=6217, + serialized_end=6378, ) @@ -2517,8 +2521,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6322, - serialized_end=6421, + serialized_start=6380, + serialized_end=6479, ) @@ -2556,8 +2560,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6423, - serialized_end=6525, + serialized_start=6481, + serialized_end=6583, ) @@ -2649,8 +2653,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6528, - serialized_end=6814, + serialized_start=6586, + serialized_end=6872, ) @@ -2688,8 +2692,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6816, - serialized_end=6911, + serialized_start=6874, + serialized_end=6969, ) @@ -2715,7 +2719,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -2727,8 +2731,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6913, - serialized_end=7020, + serialized_start=6971, + serialized_end=7083, ) @@ -2766,8 +2770,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7022, - serialized_end=7132, + serialized_start=7085, + serialized_end=7195, ) @@ -2823,8 +2827,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7134, - serialized_end=7228, + serialized_start=7197, + serialized_end=7291, ) @@ -2880,8 +2884,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7230, - serialized_end=7336, + serialized_start=7293, + serialized_end=7399, ) @@ -2919,8 +2923,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7338, - serialized_end=7362, + serialized_start=7401, + serialized_end=7425, ) @@ -2958,8 +2962,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7364, - serialized_end=7393, + serialized_start=7427, + serialized_end=7456, ) @@ -3033,8 +3037,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7396, - serialized_end=7667, + serialized_start=7459, + serialized_end=7730, ) _FEATURE.fields_by_name["type"].enum_type = _FEATURE_TYPE @@ -3243,9 +3247,9 @@ 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 - maximum number of results to return for that type. Multiple ``Feature`` - objects can be specified in the ``features`` list. + __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: @@ -3270,12 +3274,13 @@ dict( DESCRIPTOR=_IMAGESOURCE, __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage or web URL image location). + __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 + \ **Use ``image_uri`` instead.** The Google Cloud Storage URI of the form ``gs://bucket_name/object_name``. Object versioning is not supported. See `Google Cloud Storage Request URIs `__ @@ -3307,7 +3312,8 @@ dict( DESCRIPTOR=_IMAGE, __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + __doc__="""Client image to perform Google Cloud Vision API tasks + over. Attributes: @@ -3350,7 +3356,8 @@ ), DESCRIPTOR=_FACEANNOTATION, __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + __doc__="""A face annotation object contains the results of face + detection. Attributes: @@ -3433,7 +3440,8 @@ dict( DESCRIPTOR=_PROPERTY, __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + __doc__="""A ``Property`` consists of a user-supplied name/value + pair. Attributes: @@ -3472,7 +3480,7 @@ score: Overall score of the result. Range [0, 1]. confidence: - **Deprecated. Use ``score`` instead.** The accuracy of the + \ **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 represents the confidence that there is a tower in the query @@ -3539,9 +3547,9 @@ dict( 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). + __doc__="""Set of features pertaining to the image, computed by + computer vision methods over safe-search verticals (for example, adult, + spoof, medical, violence). Attributes: @@ -3594,8 +3602,8 @@ dict( 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. + __doc__="""Color information consists of RGB channels, score, and the + fraction of the image that the color occupies in the image. Attributes: @@ -3654,8 +3662,8 @@ 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 - image. + __doc__="""Single crop hint that is used to generate a new crop when + serving an image. Attributes: @@ -3680,8 +3688,8 @@ 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 - images. + __doc__="""Set of crop hints that are used to generate new crops when + serving images. Attributes: @@ -3776,8 +3784,8 @@ dict( 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. + __doc__="""Request for performing Google Cloud Vision API tasks over + a user-provided image, with user-requested features. Attributes: @@ -3799,8 +3807,8 @@ 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 - information about the source of that image. + __doc__="""If an image was produced from a file (e.g. a PDF), this + message gives information about the source of that image. Attributes: @@ -3872,8 +3880,8 @@ 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 or - more images, which individually have their own responses. + __doc__="""Response to a single file annotation request. A file may + contain one or more images, which individually have their own responses. Attributes: @@ -3894,8 +3902,8 @@ dict( DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service - call. + __doc__="""Multiple image annotation requests are batched into a + single service call. Attributes: @@ -3977,13 +3985,14 @@ dict( DESCRIPTOR=_ASYNCBATCHANNOTATEFILESREQUEST, __module__="google.cloud.vision_v1p3beta1.proto.image_annotator_pb2", - __doc__="""Multiple async file annotation requests are batched into a single - service call. + __doc__="""Multiple async file annotation requests are batched into a + single service call. Attributes: requests: - Individual async file annotation requests for this batch. + Required. Individual async file annotation requests for this + batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) ), @@ -4064,7 +4073,8 @@ 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. + __doc__="""The Google Cloud Storage location where the input will be + read from. Attributes: @@ -4084,7 +4094,8 @@ 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. + __doc__="""The Google Cloud Storage location where the output will be + written to. Attributes: @@ -4130,15 +4141,18 @@ DESCRIPTOR._options = None +_ASYNCBATCHANNOTATEFILESREQUEST.fields_by_name["requests"]._options = None _IMAGEANNOTATOR = _descriptor.ServiceDescriptor( name="ImageAnnotator", full_name="google.cloud.vision.v1p3beta1.ImageAnnotator", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=7773, - serialized_end=8141, + serialized_options=_b( + "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" + ), + serialized_start=7836, + serialized_end=8401, methods=[ _descriptor.MethodDescriptor( name="BatchAnnotateImages", @@ -4148,7 +4162,7 @@ input_type=_BATCHANNOTATEIMAGESREQUEST, output_type=_BATCHANNOTATEIMAGESRESPONSE, serialized_options=_b( - '\202\323\344\223\002\037"\032/v1p3beta1/images:annotate:\001*' + '\202\323\344\223\002\037"\032/v1p3beta1/images:annotate:\001*\332A\010requests' ), ), _descriptor.MethodDescriptor( @@ -4159,7 +4173,7 @@ input_type=_ASYNCBATCHANNOTATEFILESREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002("#/v1p3beta1/files:asyncBatchAnnotate:\001*' + '\202\323\344\223\002("#/v1p3beta1/files:asyncBatchAnnotate:\001*\332A\010requests\312A4\n\037AsyncBatchAnnotateFilesResponse\022\021OperationMetadata' ), ), ], diff --git a/google/cloud/vision_v1p3beta1/proto/product_search.proto b/google/cloud/vision_v1p3beta1/proto/product_search.proto index 6a30c087..6dde477c 100644 --- a/google/cloud/vision_v1p3beta1/proto/product_search.proto +++ b/google/cloud/vision_v1p3beta1/proto/product_search.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p3beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1p3beta1/geometry.proto"; import "google/cloud/vision/v1p3beta1/product_search_service.proto"; import "google/protobuf/timestamp.proto"; @@ -64,7 +66,9 @@ message ProductSearchParams { // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. - string product_set = 6; + string product_set = 6 [(google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + }]; // The list of product categories to search in. Currently, we only consider // the first category, and either "homegoods" or "apparel" should be diff --git a/google/cloud/vision_v1p3beta1/proto/product_search_pb2.py b/google/cloud/vision_v1p3beta1/proto/product_search_pb2.py index 4053ea65..b78eeb9b 100644 --- a/google/cloud/vision_v1p3beta1/proto/product_search_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/product_search_pb2.py @@ -17,6 +17,7 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.vision_v1p3beta1.proto import ( geometry_pb2 as google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_geometry__pb2, ) @@ -34,10 +35,11 @@ "\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\x32google/cloud/vision_v1p3beta1/proto/geometry.proto\x1a@google/cloud/vision_v1p3beta1/proto/product_search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xb2\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\x13\n\x0bproduct_set\x18\x06 \x01(\t\x12\x1a\n\x12product_categories\x18\x07 \x03(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t"\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' + '\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, google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_product__search__service__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, @@ -66,8 +68,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1206, - serialized_end=1291, + serialized_start=1272, + serialized_end=1357, ) _sym_db.RegisterEnumDescriptor(_PRODUCTSEARCHCATEGORY) @@ -87,8 +89,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1293, - serialized_end=1340, + serialized_start=1359, + serialized_end=1406, ) _sym_db.RegisterEnumDescriptor(_PRODUCTSEARCHRESULTSVIEW) @@ -230,7 +232,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -278,8 +280,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=273, - serialized_end=707, + serialized_start=300, + serialized_end=773, ) @@ -353,8 +355,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1040, - serialized_end=1107, + serialized_start=1106, + serialized_end=1173, ) _PRODUCTSEARCHRESULTS_RESULT = _descriptor.Descriptor( @@ -427,8 +429,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1109, - serialized_end=1204, + serialized_start=1175, + serialized_end=1270, ) _PRODUCTSEARCHRESULTS = _descriptor.Descriptor( @@ -537,8 +539,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=710, - serialized_end=1204, + serialized_start=776, + serialized_end=1270, ) _PRODUCTSEARCHPARAMS.fields_by_name["category"].enum_type = _PRODUCTSEARCHCATEGORY @@ -710,4 +712,5 @@ DESCRIPTOR._options = None +_PRODUCTSEARCHPARAMS.fields_by_name["product_set"]._options = None # @@protoc_insertion_point(module_scope) diff --git a/google/cloud/vision_v1p3beta1/proto/product_search_service.proto b/google/cloud/vision_v1p3beta1/proto/product_search_service.proto index 23919ee7..daf1d0dd 100644 --- a/google/cloud/vision_v1p3beta1/proto/product_search_service.proto +++ b/google/cloud/vision_v1p3beta1/proto/product_search_service.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.vision.v1p3beta1; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/vision/v1p3beta1/geometry.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -33,22 +37,23 @@ option java_package = "com.google.cloud.vision.v1p3beta1"; // 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 +// - 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 +// - 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 +// - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named // `projects/*/locations/*/products/*/referenceImages/*` service ProductSearch { + option (google.api.default_host) = "vision.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-vision"; + // Creates and returns a new ProductSet resource. // // Possible errors: @@ -60,6 +65,7 @@ service ProductSearch { post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" body: "product_set" }; + option (google.api.method_signature) = "parent,product_set,product_set_id"; } // Lists ProductSets in an unspecified order. @@ -68,11 +74,11 @@ service ProductSearch { // // * Returns INVALID_ARGUMENT if page_size is greater than 100, or less // than 1. - rpc ListProductSets(ListProductSetsRequest) - returns (ListProductSetsResponse) { + rpc ListProductSets(ListProductSetsRequest) returns (ListProductSetsResponse) { option (google.api.http) = { get: "/v1p3beta1/{parent=projects/*/locations/*}/productSets" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ProductSet. @@ -84,6 +90,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a ProductSet resource. @@ -99,6 +106,7 @@ service ProductSearch { patch: "/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}" body: "product_set" }; + option (google.api.method_signature) = "product_set,update_mask"; } // Permanently deletes a ProductSet. All Products and ReferenceImages in the @@ -114,6 +122,7 @@ service ProductSearch { option (google.api.http) = { delete: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new product resource. @@ -129,6 +138,7 @@ service ProductSearch { post: "/v1p3beta1/{parent=projects/*/locations/*}/products" body: "product" }; + option (google.api.method_signature) = "parent,product,product_id"; } // Lists products in an unspecified order. @@ -140,6 +150,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{parent=projects/*/locations/*}/products" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a Product. @@ -151,6 +162,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Makes changes to a Product resource. @@ -172,6 +184,7 @@ service ProductSearch { patch: "/v1p3beta1/{product.name=projects/*/locations/*/products/*}" body: "product" }; + option (google.api.method_signature) = "product,update_mask"; } // Permanently deletes a product and its reference images. @@ -187,6 +200,7 @@ service ProductSearch { option (google.api.http) = { delete: "/v1p3beta1/{name=projects/*/locations/*/products/*}" }; + option (google.api.method_signature) = "name"; } // Creates and returns a new ReferenceImage resource. @@ -214,6 +228,7 @@ service ProductSearch { post: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" body: "reference_image" }; + option (google.api.method_signature) = "parent,reference_image,reference_image_id"; } // Permanently deletes a reference image. @@ -232,6 +247,7 @@ service ProductSearch { option (google.api.http) = { delete: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Lists reference images. @@ -246,6 +262,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" }; + option (google.api.method_signature) = "parent"; } // Gets information associated with a ReferenceImage. @@ -257,6 +274,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" }; + option (google.api.method_signature) = "name"; } // Adds a Product to the specified ProductSet. If the Product is already @@ -273,6 +291,7 @@ service ProductSearch { post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Removes a Product from the specified ProductSet. @@ -286,6 +305,7 @@ service ProductSearch { post: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct" body: "*" }; + option (google.api.method_signature) = "name,product"; } // Lists the Products in a ProductSet, in an unspecified order. If the @@ -300,6 +320,7 @@ service ProductSearch { option (google.api.http) = { get: "/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products" }; + option (google.api.method_signature) = "name"; } // Asynchronous API that imports a list of reference images to specified @@ -319,11 +340,21 @@ service ProductSearch { post: "/v1p3beta1/{parent=projects/*/locations/*}/productSets:import" body: "*" }; + option (google.api.method_signature) = "parent,input_config"; + option (google.longrunning.operation_info) = { + response_type: "ImportProductSetsResponse" + metadata_type: "BatchOperationMetadata" + }; } } // A Product contains ReferenceImages. message Product { + option (google.api.resource) = { + type: "vision.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + }; + // A product label represented as a key-value pair. message KeyValue { // The key of the label attached to the product. Cannot be empty and cannot @@ -351,11 +382,11 @@ message Product { // characters long. string description = 3; - // The category for the product identified by the reference image. This should - // be either "homegoods" or "apparel". - // - // This field is immutable. - string product_category = 4; + // Immutable. The category for the product identified by the reference image. This should + // be either "homegoods-v2", "apparel-v2", or "toys-v2". The legacy categories + // "homegoods", "apparel", and "toys" are still supported, but these should + // not be used for new products. + string product_category = 4 [(google.api.field_behavior) = IMMUTABLE]; // Key-value pairs that can be attached to a product. At query time, // constraints can be specified based on the product_labels. @@ -373,6 +404,11 @@ message Product { // million reference images. If the limit is exceeded, periodic indexing will // fail. message ProductSet { + option (google.api.resource) = { + type: "vision.googleapis.com/ProductSet" + pattern: "projects/{project}/locations/{location}/productSets/{product_set}" + }; + // The resource name of the ProductSet. // // Format is: @@ -390,18 +426,23 @@ message ProductSet { // never been indexed, this field is 0. // // This field is ignored when creating a ProductSet. - google.protobuf.Timestamp index_time = 3; + google.protobuf.Timestamp index_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. If there was an error with indexing the product set, the field // is populated. // // This field is ignored when creating a ProductSet. - google.rpc.Status index_error = 4; + google.rpc.Status index_error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A `ReferenceImage` represents a product image and its associated metadata, // such as bounding boxes. message ReferenceImage { + option (google.api.resource) = { + type: "vision.googleapis.com/ReferenceImage" + pattern: "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + }; + // The resource name of the reference image. // // Format is: @@ -411,34 +452,37 @@ message ReferenceImage { // This field is ignored when creating a reference image. string name = 1; - // The Google Cloud Storage URI of the reference image. + // Required. The Google Cloud Storage URI of the reference image. // // The URI must start with `gs://`. - // - // Required. - string uri = 2; + string uri = 2 [(google.api.field_behavior) = REQUIRED]; - // Bounding polygons around the areas of interest in the reference image. - // Optional. If this field is empty, the system will try to detect regions of + // Optional. Bounding polygons around the areas of interest in the reference image. + // If this field is empty, the system will try to detect regions of // interest. At most 10 bounding polygons will be used. // // The provided shape is converted into a non-rotated rectangle. Once // converted, the small edge of the rectangle must be greater than or equal // to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 // is not). - repeated BoundingPoly bounding_polys = 3; + repeated BoundingPoly bounding_polys = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for the `CreateProduct` method. message CreateProductRequest { - // The project in which the Product should be created. + // Required. The project in which the Product should be created. // // Format is // `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The product to create. - Product product = 2; + // Required. The product to create. + Product product = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this Product. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -449,11 +493,16 @@ message CreateProductRequest { // Request message for the `ListProducts` method. message ListProductsRequest { - // The project OR ProductSet from which Products should be listed. + // Required. The project OR ProductSet from which Products should be listed. // // Format: // `projects/PROJECT_ID/locations/LOC_ID` - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -474,45 +523,60 @@ message ListProductsResponse { // Request message for the `GetProduct` method. message GetProductRequest { - // Resource name of the Product to get. + // Required. Resource name of the Product to get. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `UpdateProduct` method. message UpdateProductRequest { - // The Product resource which replaces the one on the server. + // Required. The Product resource which replaces the one on the server. // product.name is immutable. - Product product = 1; + Product product = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields // to update. // If update_mask isn't specified, all mutable fields are to be updated. - // Valid mask paths include `product_labels`, `display_name` and + // Valid mask paths include `product_labels`, `display_name`, and // `description`. google.protobuf.FieldMask update_mask = 2; } // Request message for the `DeleteProduct` method. message DeleteProductRequest { - // Resource name of product to delete. + // Required. Resource name of product to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `CreateProductSet` method. message CreateProductSetRequest { - // The project in which the ProductSet should be created. + // Required. The project in which the ProductSet should be created. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // The ProductSet to create. - ProductSet product_set = 2; + // Required. The ProductSet to create. + ProductSet product_set = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for this ProductSet. If set, the server will // attempt to use this value as the resource id. If it is already in use, an @@ -523,10 +587,15 @@ message CreateProductSetRequest { // Request message for the `ListProductSets` method. message ListProductSetsRequest { - // The project from which ProductSets should be listed. + // Required. The project from which ProductSets should be listed. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -547,17 +616,22 @@ message ListProductSetsResponse { // Request message for the `GetProductSet` method. message GetProductSetRequest { - // Resource name of the ProductSet to get. + // Required. Resource name of the ProductSet to get. // // Format is: - // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` - string name = 1; + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `UpdateProductSet` method. message UpdateProductSetRequest { - // The ProductSet resource which replaces the one on the server. - ProductSet product_set = 1; + // Required. The ProductSet resource which replaces the one on the server. + ProductSet product_set = 1 [(google.api.field_behavior) = REQUIRED]; // The [FieldMask][google.protobuf.FieldMask] that specifies which fields to // update. @@ -568,24 +642,34 @@ message UpdateProductSetRequest { // Request message for the `DeleteProductSet` method. message DeleteProductSetRequest { - // Resource name of the ProductSet to delete. + // Required. Resource name of the ProductSet to delete. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; } // Request message for the `CreateReferenceImage` method. message CreateReferenceImageRequest { - // Resource name of the product in which to create the reference image. + // Required. Resource name of the product in which to create the reference image. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; - - // The reference image to create. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; + + // Required. The reference image to create. // If an image ID is specified, it is ignored. - ReferenceImage reference_image = 2; + ReferenceImage reference_image = 2 [(google.api.field_behavior) = REQUIRED]; // A user-supplied resource id for the ReferenceImage to be added. If set, // the server will attempt to use this value as the resource id. If it is @@ -596,11 +680,16 @@ message CreateReferenceImageRequest { // Request message for the `ListReferenceImages` method. message ListReferenceImagesRequest { - // Resource name of the product containing the reference images. + // Required. Resource name of the product containing the reference images. // // Format is // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. - string parent = 1; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -626,61 +715,96 @@ message ListReferenceImagesResponse { // Request message for the `GetReferenceImage` method. message GetReferenceImageRequest { - // The resource name of the ReferenceImage to get. + // Required. The resource name of the ReferenceImage to get. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `DeleteReferenceImage` method. message DeleteReferenceImageRequest { - // The resource name of the reference image to delete. + // Required. The resource name of the reference image to delete. // // Format is: // // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ReferenceImage" + } + ]; } // Request message for the `AddProductToProductSet` method. message AddProductToProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be added to this ProductSet. + // Required. The resource name for the Product to be added to this ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `RemoveProductFromProductSet` method. message RemoveProductFromProductSetRequest { - // The resource name for the ProductSet to modify. + // Required. The resource name for the ProductSet to modify. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; - // The resource name for the Product to be removed from this ProductSet. + // Required. The resource name for the Product to be removed from this ProductSet. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID` - string product = 2; + string product = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/Product" + } + ]; } // Request message for the `ListProductsInProductSet` method. message ListProductsInProductSetRequest { - // The ProductSet resource for which to retrieve Products. + // Required. The ProductSet resource for which to retrieve Products. // // Format is: // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` - string name = 1; + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "vision.googleapis.com/ProductSet" + } + ]; // The maximum number of items to return. Default 10, maximum 100. int32 page_size = 2; @@ -704,7 +828,7 @@ message ListProductsInProductSetResponse { message ImportProductSetsGcsSource { // The Google Cloud Storage URI of the input csv file. // - // The URI must start with gs:// + // 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. @@ -774,13 +898,18 @@ message ImportProductSetsInputConfig { // Request message for the `ImportProductSets` method. message ImportProductSetsRequest { - // The project in which the ProductSets should be imported. + // Required. The project in which the ProductSets should be imported. // // Format is `projects/PROJECT_ID/locations/LOC_ID`. - string parent = 1; - - // The input content for the list of requests. - ImportProductSetsInputConfig input_config = 2; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The input content for the list of requests. + ImportProductSetsInputConfig input_config = 2 [(google.api.field_behavior) = REQUIRED]; } // Response message for the `ImportProductSets` method. 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 74ec13d1..664b79d7 100644 --- a/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/product_search_service_pb2.py @@ -16,6 +16,9 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 from google.cloud.vision_v1p3beta1.proto import ( geometry_pb2 as google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_geometry__pb2, ) @@ -36,10 +39,13 @@ "\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\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"\xcd\x01\n\x07Product\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x18\n\x10product_category\x18\x04 \x01(\t\x12G\n\x0eproduct_labels\x18\x05 \x03(\x0b\x32/.google.cloud.vision.v1p3beta1.Product.KeyValue\x1a&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t"\x89\x01\n\nProductSet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12.\n\nindex_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x0bindex_error\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status"p\n\x0eReferenceImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\x43\n\x0e\x62ounding_polys\x18\x03 \x03(\x0b\x32+.google.cloud.vision.v1p3beta1.BoundingPoly"s\n\x14\x43reateProductRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x37\n\x07product\x18\x02 \x01(\x0b\x32&.google.cloud.vision.v1p3beta1.Product\x12\x12\n\nproduct_id\x18\x03 \x01(\t"L\n\x13ListProductsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"i\n\x14ListProductsResponse\x12\x38\n\x08products\x18\x01 \x03(\x0b\x32&.google.cloud.vision.v1p3beta1.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"!\n\x11GetProductRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x80\x01\n\x14UpdateProductRequest\x12\x37\n\x07product\x18\x01 \x01(\x0b\x32&.google.cloud.vision.v1p3beta1.Product\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"$\n\x14\x44\x65leteProductRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x81\x01\n\x17\x43reateProductSetRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12>\n\x0bproduct_set\x18\x02 \x01(\x0b\x32).google.cloud.vision.v1p3beta1.ProductSet\x12\x16\n\x0eproduct_set_id\x18\x03 \x01(\t"O\n\x16ListProductSetsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"s\n\x17ListProductSetsResponse\x12?\n\x0cproduct_sets\x18\x01 \x03(\x0b\x32).google.cloud.vision.v1p3beta1.ProductSet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"$\n\x14GetProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x8a\x01\n\x17UpdateProductSetRequest\x12>\n\x0bproduct_set\x18\x01 \x01(\x0b\x32).google.cloud.vision.v1p3beta1.ProductSet\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask"\'\n\x17\x44\x65leteProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"\x91\x01\n\x1b\x43reateReferenceImageRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x46\n\x0freference_image\x18\x02 \x01(\x0b\x32-.google.cloud.vision.v1p3beta1.ReferenceImage\x12\x1a\n\x12reference_image_id\x18\x03 \x01(\t"S\n\x1aListReferenceImagesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"\x92\x01\n\x1bListReferenceImagesResponse\x12G\n\x10reference_images\x18\x01 \x03(\x0b\x32-.google.cloud.vision.v1p3beta1.ReferenceImage\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t"(\n\x18GetReferenceImageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"+\n\x1b\x44\x65leteReferenceImageRequest\x12\x0c\n\x04name\x18\x01 \x01(\t">\n\x1d\x41\x64\x64ProductToProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07product\x18\x02 \x01(\t"C\n"RemoveProductFromProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07product\x18\x02 \x01(\t"V\n\x1fListProductsInProductSetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"u\n ListProductsInProductSetResponse\x12\x38\n\x08products\x18\x01 \x03(\x0b\x32&.google.cloud.vision.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"}\n\x18ImportProductSetsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12Q\n\x0cinput_config\x18\x02 \x01(\x0b\x32;.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig"\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\x9f\x1b\n\rProductSearch\x12\xc2\x01\n\x10\x43reateProductSet\x12\x36.google.cloud.vision.v1p3beta1.CreateProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet"K\x82\xd3\xe4\x93\x02\x45"6/v1p3beta1/{parent=projects/*/locations/*}/productSets:\x0bproduct_set\x12\xc0\x01\n\x0fListProductSets\x12\x35.google.cloud.vision.v1p3beta1.ListProductSetsRequest\x1a\x36.google.cloud.vision.v1p3beta1.ListProductSetsResponse">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p3beta1/{parent=projects/*/locations/*}/productSets\x12\xaf\x01\n\rGetProductSet\x12\x33.google.cloud.vision.v1p3beta1.GetProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1p3beta1/{name=projects/*/locations/*/productSets/*}\x12\xce\x01\n\x10UpdateProductSet\x12\x36.google.cloud.vision.v1p3beta1.UpdateProductSetRequest\x1a).google.cloud.vision.v1p3beta1.ProductSet"W\x82\xd3\xe4\x93\x02Q2B/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}:\x0bproduct_set\x12\xa2\x01\n\x10\x44\x65leteProductSet\x12\x36.google.cloud.vision.v1p3beta1.DeleteProductSetRequest\x1a\x16.google.protobuf.Empty">\x82\xd3\xe4\x93\x02\x38*6/v1p3beta1/{name=projects/*/locations/*/productSets/*}\x12\xb2\x01\n\rCreateProduct\x12\x33.google.cloud.vision.v1p3beta1.CreateProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product"D\x82\xd3\xe4\x93\x02>"3/v1p3beta1/{parent=projects/*/locations/*}/products:\x07product\x12\xb4\x01\n\x0cListProducts\x12\x32.google.cloud.vision.v1p3beta1.ListProductsRequest\x1a\x33.google.cloud.vision.v1p3beta1.ListProductsResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p3beta1/{parent=projects/*/locations/*}/products\x12\xa3\x01\n\nGetProduct\x12\x30.google.cloud.vision.v1p3beta1.GetProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product";\x82\xd3\xe4\x93\x02\x35\x12\x33/v1p3beta1/{name=projects/*/locations/*/products/*}\x12\xba\x01\n\rUpdateProduct\x12\x33.google.cloud.vision.v1p3beta1.UpdateProductRequest\x1a&.google.cloud.vision.v1p3beta1.Product"L\x82\xd3\xe4\x93\x02\x46\x32;/v1p3beta1/{product.name=projects/*/locations/*/products/*}:\x07product\x12\x99\x01\n\rDeleteProduct\x12\x33.google.cloud.vision.v1p3beta1.DeleteProductRequest\x1a\x16.google.protobuf.Empty";\x82\xd3\xe4\x93\x02\x35*3/v1p3beta1/{name=projects/*/locations/*/products/*}\x12\xe1\x01\n\x14\x43reateReferenceImage\x12:.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest\x1a-.google.cloud.vision.v1p3beta1.ReferenceImage"^\x82\xd3\xe4\x93\x02X"E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\x0freference_image\x12\xb9\x01\n\x14\x44\x65leteReferenceImage\x12:.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest\x1a\x16.google.protobuf.Empty"M\x82\xd3\xe4\x93\x02G*E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\x12\xdb\x01\n\x13ListReferenceImages\x12\x39.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest\x1a:.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse"M\x82\xd3\xe4\x93\x02G\x12\x45/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages\x12\xca\x01\n\x11GetReferenceImage\x12\x37.google.cloud.vision.v1p3beta1.GetReferenceImageRequest\x1a-.google.cloud.vision.v1p3beta1.ReferenceImage"M\x82\xd3\xe4\x93\x02G\x12\x45/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\x12\xbc\x01\n\x16\x41\x64\x64ProductToProductSet\x12<.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest\x1a\x16.google.protobuf.Empty"L\x82\xd3\xe4\x93\x02\x46"A/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\x01*\x12\xc9\x01\n\x1bRemoveProductFromProductSet\x12\x41.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest\x1a\x16.google.protobuf.Empty"O\x82\xd3\xe4\x93\x02I"D/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\x01*\x12\xe4\x01\n\x18ListProductsInProductSet\x12>.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest\x1a?.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse"G\x82\xd3\xe4\x93\x02\x41\x12?/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products\x12\xb5\x01\n\x11ImportProductSets\x12\x37.google.cloud.vision.v1p3beta1.ImportProductSetsRequest\x1a\x1d.google.longrunning.Operation"H\x82\xd3\xe4\x93\x02\x42"=/v1p3beta1/{parent=projects/*/locations/*}/productSets:import:\x01*B\x88\x01\n!com.google.cloud.vision.v1p3beta1B\x19ProductSearchServiceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p3beta1;vision\xf8\x01\x01\x62\x06proto3' + '\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, + google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, + google_dot_api_dot_resource__pb2.DESCRIPTOR, google_dot_cloud_dot_vision__v1p3beta1_dot_proto_dot_geometry__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, @@ -78,8 +84,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3307, - serialized_end=3396, + serialized_start=4545, + serialized_end=4634, ) _sym_db.RegisterEnumDescriptor(_BATCHOPERATIONMETADATA_STATE) @@ -136,8 +142,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=507, - serialized_end=545, + serialized_start=597, + serialized_end=635, ) _PRODUCT = _descriptor.Descriptor( @@ -216,7 +222,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\005"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -241,13 +247,15 @@ extensions=[], nested_types=[_PRODUCT_KEYVALUE], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A[\n\035vision.googleapis.com/Product\022:projects/{project}/locations/{location}/products/{product}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=340, - serialized_end=545, + serialized_start=425, + serialized_end=731, ) @@ -309,7 +317,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\003"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -327,20 +335,22 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\003"), file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352Ae\n vision.googleapis.com/ProductSet\022Aprojects/{project}/locations/{location}/productSets/{product_set}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=548, - serialized_end=685, + serialized_start=734, + serialized_end=987, ) @@ -384,7 +394,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -402,20 +412,22 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\001"), file=DESCRIPTOR, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=None, + serialized_options=_b( + "\352A\204\001\n$vision.googleapis.com/ReferenceImage\022\\projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}" + ), is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=687, - serialized_end=799, + serialized_start=990, + serialized_end=1251, ) @@ -441,7 +453,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -459,7 +473,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -489,8 +503,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=801, - serialized_end=916, + serialized_start=1254, + serialized_end=1417, ) @@ -516,7 +530,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -564,8 +580,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=918, - serialized_end=994, + serialized_start=1419, + serialized_end=1538, ) @@ -621,8 +637,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=996, - serialized_end=1101, + serialized_start=1540, + serialized_end=1645, ) @@ -648,7 +664,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ) ], @@ -660,8 +678,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1103, - serialized_end=1136, + serialized_start=1647, + serialized_end=1719, ) @@ -687,7 +705,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -717,8 +735,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1139, - serialized_end=1267, + serialized_start=1722, + serialized_end=1855, ) @@ -744,7 +762,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ) ], @@ -756,8 +776,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1269, - serialized_end=1305, + serialized_start=1857, + serialized_end=1932, ) @@ -783,7 +803,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -801,7 +823,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -831,8 +853,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1308, - serialized_end=1437, + serialized_start=1935, + serialized_end=2112, ) @@ -858,7 +880,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -906,8 +930,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1439, - serialized_end=1518, + serialized_start=2114, + serialized_end=2236, ) @@ -963,8 +987,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1520, - serialized_end=1635, + serialized_start=2238, + serialized_end=2353, ) @@ -990,7 +1014,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ) ], @@ -1002,8 +1026,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1637, - serialized_end=1673, + serialized_start=2355, + serialized_end=2433, ) @@ -1029,7 +1053,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1059,8 +1083,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1676, - serialized_end=1814, + serialized_start=2436, + serialized_end=2579, ) @@ -1086,7 +1110,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ) ], @@ -1098,8 +1122,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1816, - serialized_end=1855, + serialized_start=2581, + serialized_end=2662, ) @@ -1125,7 +1149,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1143,7 +1169,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1173,8 +1199,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1858, - serialized_end=2003, + serialized_start=2665, + serialized_end=2854, ) @@ -1200,7 +1226,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1248,8 +1276,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2005, - serialized_end=2088, + serialized_start=2856, + serialized_end=2978, ) @@ -1323,8 +1351,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2091, - serialized_end=2237, + serialized_start=2981, + serialized_end=3127, ) @@ -1350,7 +1378,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A&\n$vision.googleapis.com/ReferenceImage" + ), file=DESCRIPTOR, ) ], @@ -1362,8 +1392,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2239, - serialized_end=2279, + serialized_start=3129, + serialized_end=3215, ) @@ -1389,7 +1419,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A&\n$vision.googleapis.com/ReferenceImage" + ), file=DESCRIPTOR, ) ], @@ -1401,8 +1433,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2281, - serialized_end=2324, + serialized_start=3217, + serialized_end=3306, ) @@ -1428,7 +1460,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1446,7 +1478,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ), ], @@ -1458,8 +1492,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2326, - serialized_end=2388, + serialized_start=3309, + serialized_end=3452, ) @@ -1485,7 +1519,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1503,7 +1537,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\037\n\035vision.googleapis.com/Product" + ), file=DESCRIPTOR, ), ], @@ -1515,8 +1551,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2390, - serialized_end=2457, + serialized_start=3455, + serialized_end=3603, ) @@ -1542,7 +1578,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b('\340A\002\372A"\n vision.googleapis.com/ProductSet'), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1590,8 +1626,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2459, - serialized_end=2545, + serialized_start=3606, + serialized_end=3734, ) @@ -1647,8 +1683,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2547, - serialized_end=2664, + serialized_start=3736, + serialized_end=3853, ) @@ -1686,8 +1722,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2666, - serialized_end=2716, + serialized_start=3855, + serialized_end=3905, ) @@ -1733,8 +1769,8 @@ fields=[], ) ], - serialized_start=2718, - serialized_end=2839, + serialized_start=3907, + serialized_end=4028, ) @@ -1760,7 +1796,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A#\n!locations.googleapis.com/Location" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -1778,7 +1816,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ), ], @@ -1790,8 +1828,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2841, - serialized_end=2966, + serialized_start=4031, + serialized_end=4204, ) @@ -1847,8 +1885,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2969, - serialized_end=3107, + serialized_start=4207, + serialized_end=4345, ) @@ -1922,8 +1960,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3110, - serialized_end=3396, + serialized_start=4348, + serialized_end=4634, ) _PRODUCT_KEYVALUE.containing_type = _PRODUCT @@ -2080,9 +2118,11 @@ User-provided metadata to be stored with this product. Must be at most 4096 characters long. product_category: - The category for the product identified by the reference - image. This should be either "homegoods" or "apparel". This - field is immutable. + Immutable. The category for the product identified by the + reference image. This should be either "homegoods-v2", + "apparel-v2", or "toys-v2". The legacy categories "homegoods", + "apparel", and "toys" are still supported, but these should + not be used for new products. product_labels: Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the @@ -2104,9 +2144,9 @@ 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 1 - million reference images. If the limit is exceeded, periodic indexing - will fail. + __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: @@ -2138,8 +2178,8 @@ dict( 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. + __doc__="""A ``ReferenceImage`` represents a product image and its + associated metadata, such as bounding boxes. Attributes: @@ -2149,12 +2189,12 @@ mages/IMAGE_ID``. This field is ignored when creating a reference image. uri: - The Google Cloud Storage URI of the reference image. The URI - must start with ``gs://``. Required. + Required. The Google Cloud Storage URI of the reference image. + The URI must start with ``gs://``. bounding_polys: - Bounding polygons around the areas of interest in the - reference image. Optional. If this field is empty, the system - will try to detect regions of interest. At most 10 bounding + Optional. Bounding polygons around the areas of interest in + the reference image. If this field is empty, the system will + try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The @@ -2176,10 +2216,10 @@ Attributes: parent: - The project in which the Product should be created. Format is - ``projects/PROJECT_ID/locations/LOC_ID``. + Required. The project in which the Product should be created. + Format is ``projects/PROJECT_ID/locations/LOC_ID``. product: - The product to create. + Required. The product to create. product_id: A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If @@ -2203,8 +2243,8 @@ Attributes: parent: - The project OR ProductSet from which Products should be - listed. Format: ``projects/PROJECT_ID/locations/LOC_ID`` + Required. The project OR ProductSet from which Products should + be listed. Format: ``projects/PROJECT_ID/locations/LOC_ID`` page_size: The maximum number of items to return. Default 10, maximum 100. @@ -2249,7 +2289,7 @@ Attributes: name: - Resource name of the Product to get. Format is: + Required. Resource name of the Product to get. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetProductRequest) @@ -2268,13 +2308,13 @@ Attributes: product: - The Product resource which replaces the one on the server. - product.name is immutable. + Required. The Product resource which replaces the one on the + server. product.name is immutable. update_mask: The [FieldMask][google.protobuf.FieldMask] that specifies which fields to update. If update\_mask isn't specified, all mutable fields are to be updated. Valid mask paths include - ``product_labels``, ``display_name`` and ``description``. + ``product_labels``, ``display_name``, and ``description``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.UpdateProductRequest) ), @@ -2292,7 +2332,7 @@ Attributes: name: - Resource name of product to delete. Format is: + Required. Resource name of product to delete. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteProductRequest) @@ -2311,10 +2351,10 @@ Attributes: parent: - The project in which the ProductSet should be created. Format - is ``projects/PROJECT_ID/locations/LOC_ID``. + Required. The project in which the ProductSet should be + created. Format is ``projects/PROJECT_ID/locations/LOC_ID``. product_set: - The ProductSet to create. + Required. The ProductSet to create. product_set_id: A user-supplied resource id for this ProductSet. If set, the server will attempt to use this value as the resource id. If @@ -2338,8 +2378,8 @@ Attributes: parent: - The project from which ProductSets should be listed. Format - is ``projects/PROJECT_ID/locations/LOC_ID``. + Required. The project from which ProductSets should be listed. + Format is ``projects/PROJECT_ID/locations/LOC_ID``. page_size: The maximum number of items to return. Default 10, maximum 100. @@ -2384,8 +2424,9 @@ Attributes: name: - Resource name of the ProductSet to get. Format is: ``projects - /PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`` + Required. Resource name of the ProductSet to get. Format is: + ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET + _ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetProductSetRequest) ), @@ -2403,7 +2444,8 @@ Attributes: product_set: - The ProductSet resource which replaces the one on the server. + Required. The ProductSet resource which replaces the one on + the server. update_mask: The [FieldMask][google.protobuf.FieldMask] that specifies which fields to update. If update\_mask isn't specified, all @@ -2426,8 +2468,9 @@ Attributes: name: - Resource name of the ProductSet to delete. Format is: ``proje - cts/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` + Required. Resource name of the ProductSet to delete. Format + is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT + _SET_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteProductSetRequest) ), @@ -2445,12 +2488,12 @@ Attributes: parent: - Resource name of the product in which to create the reference - image. Format is + Required. Resource name of the product in which to create the + reference image. Format is ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID``. reference_image: - The reference image to create. If an image ID is specified, it - is ignored. + Required. The reference image to create. If an image ID is + specified, it is ignored. reference_image_id: A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as @@ -2474,8 +2517,8 @@ Attributes: parent: - Resource name of the product containing the reference images. - Format is + Required. Resource name of the product containing the + reference images. Format is ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID``. page_size: The maximum number of items to return. Default 10, maximum @@ -2526,9 +2569,9 @@ Attributes: name: - The resource name of the ReferenceImage to get. Format is: ` - `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/refe - renceImages/IMAGE_ID``. + Required. The resource name of the ReferenceImage to get. + Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PR + ODUCT_ID/referenceImages/IMAGE_ID``. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.GetReferenceImageRequest) ), @@ -2546,9 +2589,9 @@ Attributes: name: - The resource name of the reference image to delete. Format - is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_I - D/referenceImages/IMAGE_ID`` + Required. The resource name of the reference image to delete. + Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PR + ODUCT_ID/referenceImages/IMAGE_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) ), @@ -2566,12 +2609,12 @@ Attributes: name: - The resource name for the ProductSet to modify. Format is: `` - projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_I - D`` + Required. The resource name for the ProductSet to modify. + Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/ + PRODUCT_SET_ID`` product: - The resource name for the Product to be added to this - ProductSet. Format is: + Required. The resource name for the Product to be added to + this ProductSet. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) @@ -2585,17 +2628,18 @@ dict( DESCRIPTOR=_REMOVEPRODUCTFROMPRODUCTSETREQUEST, __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``RemoveProductFromProductSet`` method. + __doc__="""Request message for the ``RemoveProductFromProductSet`` + method. Attributes: name: - The resource name for the ProductSet to modify. Format is: `` - projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_I - D`` + Required. The resource name for the ProductSet to modify. + Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/ + PRODUCT_SET_ID`` product: - The resource name for the Product to be removed from this - ProductSet. Format is: + Required. The resource name for the Product to be removed from + this ProductSet. Format is: ``projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) @@ -2609,14 +2653,15 @@ dict( DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETREQUEST, __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProductsInProductSet`` method. + __doc__="""Request message for the ``ListProductsInProductSet`` + method. Attributes: name: - The ProductSet resource for which to retrieve Products. - Format is: ``projects/PROJECT_ID/locations/LOC_ID/productSets/ - PRODUCT_SET_ID`` + Required. The ProductSet resource for which to retrieve + Products. Format is: ``projects/PROJECT_ID/locations/LOC_ID/p + roductSets/PRODUCT_SET_ID`` page_size: The maximum number of items to return. Default 10, maximum 100. @@ -2635,7 +2680,8 @@ dict( DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETRESPONSE, __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProductsInProductSet`` method. + __doc__="""Response message for the ``ListProductsInProductSet`` + method. Attributes: @@ -2656,20 +2702,20 @@ 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 list - of ImportProductSetRequests in each line. + __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, other - columns are optional. A new ProductSet/Product with the same - id will be created on the fly if the ProductSet/Product + 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, + 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. If it is empty, we will automatically assign an unique id to @@ -2740,10 +2786,10 @@ Attributes: parent: - The project in which the ProductSets should be imported. - Format is ``projects/PROJECT_ID/locations/LOC_ID``. + Required. The project in which the ProductSets should be + imported. Format is ``projects/PROJECT_ID/locations/LOC_ID``. input_config: - The input content for the list of requests. + Required. The input content for the list of requests. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.ImportProductSetsRequest) ), @@ -2786,7 +2832,8 @@ dict( DESCRIPTOR=_BATCHOPERATIONMETADATA, __module__="google.cloud.vision_v1p3beta1.proto.product_search_service_pb2", - __doc__="""Metadata for the batch operations such as the current state. + __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`` @@ -2810,15 +2857,49 @@ DESCRIPTOR._options = None +_PRODUCT.fields_by_name["product_category"]._options = None +_PRODUCT._options = None +_PRODUCTSET.fields_by_name["index_time"]._options = None +_PRODUCTSET.fields_by_name["index_error"]._options = None +_PRODUCTSET._options = None +_REFERENCEIMAGE.fields_by_name["uri"]._options = None +_REFERENCEIMAGE.fields_by_name["bounding_polys"]._options = None +_REFERENCEIMAGE._options = None +_CREATEPRODUCTREQUEST.fields_by_name["parent"]._options = None +_CREATEPRODUCTREQUEST.fields_by_name["product"]._options = None +_LISTPRODUCTSREQUEST.fields_by_name["parent"]._options = None +_GETPRODUCTREQUEST.fields_by_name["name"]._options = None +_UPDATEPRODUCTREQUEST.fields_by_name["product"]._options = None +_DELETEPRODUCTREQUEST.fields_by_name["name"]._options = None +_CREATEPRODUCTSETREQUEST.fields_by_name["parent"]._options = None +_CREATEPRODUCTSETREQUEST.fields_by_name["product_set"]._options = None +_LISTPRODUCTSETSREQUEST.fields_by_name["parent"]._options = None +_GETPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_UPDATEPRODUCTSETREQUEST.fields_by_name["product_set"]._options = None +_DELETEPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_CREATEREFERENCEIMAGEREQUEST.fields_by_name["parent"]._options = None +_CREATEREFERENCEIMAGEREQUEST.fields_by_name["reference_image"]._options = None +_LISTREFERENCEIMAGESREQUEST.fields_by_name["parent"]._options = None +_GETREFERENCEIMAGEREQUEST.fields_by_name["name"]._options = None +_DELETEREFERENCEIMAGEREQUEST.fields_by_name["name"]._options = None +_ADDPRODUCTTOPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_ADDPRODUCTTOPRODUCTSETREQUEST.fields_by_name["product"]._options = None +_REMOVEPRODUCTFROMPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_REMOVEPRODUCTFROMPRODUCTSETREQUEST.fields_by_name["product"]._options = None +_LISTPRODUCTSINPRODUCTSETREQUEST.fields_by_name["name"]._options = None +_IMPORTPRODUCTSETSREQUEST.fields_by_name["parent"]._options = None +_IMPORTPRODUCTSETSREQUEST.fields_by_name["input_config"]._options = None _PRODUCTSEARCH = _descriptor.ServiceDescriptor( name="ProductSearch", full_name="google.cloud.vision.v1p3beta1.ProductSearch", file=DESCRIPTOR, index=0, - serialized_options=None, - serialized_start=3399, - serialized_end=6886, + serialized_options=_b( + "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" + ), + serialized_start=4637, + serialized_end=8584, methods=[ _descriptor.MethodDescriptor( name="CreateProductSet", @@ -2828,7 +2909,7 @@ input_type=_CREATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, serialized_options=_b( - '\202\323\344\223\002E"6/v1p3beta1/{parent=projects/*/locations/*}/productSets:\013product_set' + '\202\323\344\223\002E"6/v1p3beta1/{parent=projects/*/locations/*}/productSets:\013product_set\332A!parent,product_set,product_set_id' ), ), _descriptor.MethodDescriptor( @@ -2839,7 +2920,7 @@ input_type=_LISTPRODUCTSETSREQUEST, output_type=_LISTPRODUCTSETSRESPONSE, serialized_options=_b( - "\202\323\344\223\0028\0226/v1p3beta1/{parent=projects/*/locations/*}/productSets" + "\202\323\344\223\0028\0226/v1p3beta1/{parent=projects/*/locations/*}/productSets\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -2850,7 +2931,7 @@ input_type=_GETPRODUCTSETREQUEST, output_type=_PRODUCTSET, serialized_options=_b( - "\202\323\344\223\0028\0226/v1p3beta1/{name=projects/*/locations/*/productSets/*}" + "\202\323\344\223\0028\0226/v1p3beta1/{name=projects/*/locations/*/productSets/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2861,7 +2942,7 @@ input_type=_UPDATEPRODUCTSETREQUEST, output_type=_PRODUCTSET, serialized_options=_b( - "\202\323\344\223\002Q2B/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set" + "\202\323\344\223\002Q2B/v1p3beta1/{product_set.name=projects/*/locations/*/productSets/*}:\013product_set\332A\027product_set,update_mask" ), ), _descriptor.MethodDescriptor( @@ -2872,7 +2953,7 @@ 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/*}" + "\202\323\344\223\0028*6/v1p3beta1/{name=projects/*/locations/*/productSets/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2883,7 +2964,7 @@ input_type=_CREATEPRODUCTREQUEST, output_type=_PRODUCT, serialized_options=_b( - '\202\323\344\223\002>"3/v1p3beta1/{parent=projects/*/locations/*}/products:\007product' + '\202\323\344\223\002>"3/v1p3beta1/{parent=projects/*/locations/*}/products:\007product\332A\031parent,product,product_id' ), ), _descriptor.MethodDescriptor( @@ -2894,7 +2975,7 @@ input_type=_LISTPRODUCTSREQUEST, output_type=_LISTPRODUCTSRESPONSE, serialized_options=_b( - "\202\323\344\223\0025\0223/v1p3beta1/{parent=projects/*/locations/*}/products" + "\202\323\344\223\0025\0223/v1p3beta1/{parent=projects/*/locations/*}/products\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -2905,7 +2986,7 @@ input_type=_GETPRODUCTREQUEST, output_type=_PRODUCT, serialized_options=_b( - "\202\323\344\223\0025\0223/v1p3beta1/{name=projects/*/locations/*/products/*}" + "\202\323\344\223\0025\0223/v1p3beta1/{name=projects/*/locations/*/products/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2916,7 +2997,7 @@ input_type=_UPDATEPRODUCTREQUEST, output_type=_PRODUCT, serialized_options=_b( - "\202\323\344\223\002F2;/v1p3beta1/{product.name=projects/*/locations/*/products/*}:\007product" + "\202\323\344\223\002F2;/v1p3beta1/{product.name=projects/*/locations/*/products/*}:\007product\332A\023product,update_mask" ), ), _descriptor.MethodDescriptor( @@ -2927,7 +3008,7 @@ 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/*}" + "\202\323\344\223\0025*3/v1p3beta1/{name=projects/*/locations/*/products/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2938,7 +3019,7 @@ input_type=_CREATEREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, serialized_options=_b( - '\202\323\344\223\002X"E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image' + '\202\323\344\223\002X"E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages:\017reference_image\332A)parent,reference_image,reference_image_id' ), ), _descriptor.MethodDescriptor( @@ -2949,7 +3030,7 @@ 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/*}" + "\202\323\344\223\002G*E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2960,7 +3041,7 @@ input_type=_LISTREFERENCEIMAGESREQUEST, output_type=_LISTREFERENCEIMAGESRESPONSE, serialized_options=_b( - "\202\323\344\223\002G\022E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages" + "\202\323\344\223\002G\022E/v1p3beta1/{parent=projects/*/locations/*/products/*}/referenceImages\332A\006parent" ), ), _descriptor.MethodDescriptor( @@ -2971,7 +3052,7 @@ input_type=_GETREFERENCEIMAGEREQUEST, output_type=_REFERENCEIMAGE, serialized_options=_b( - "\202\323\344\223\002G\022E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}" + "\202\323\344\223\002G\022E/v1p3beta1/{name=projects/*/locations/*/products/*/referenceImages/*}\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -2982,7 +3063,7 @@ 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*' + '\202\323\344\223\002F"A/v1p3beta1/{name=projects/*/locations/*/productSets/*}:addProduct:\001*\332A\014name,product' ), ), _descriptor.MethodDescriptor( @@ -2993,7 +3074,7 @@ 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*' + '\202\323\344\223\002I"D/v1p3beta1/{name=projects/*/locations/*/productSets/*}:removeProduct:\001*\332A\014name,product' ), ), _descriptor.MethodDescriptor( @@ -3004,7 +3085,7 @@ input_type=_LISTPRODUCTSINPRODUCTSETREQUEST, output_type=_LISTPRODUCTSINPRODUCTSETRESPONSE, serialized_options=_b( - "\202\323\344\223\002A\022?/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products" + "\202\323\344\223\002A\022?/v1p3beta1/{name=projects/*/locations/*/productSets/*}/products\332A\004name" ), ), _descriptor.MethodDescriptor( @@ -3015,7 +3096,7 @@ 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*' + '\202\323\344\223\002B"=/v1p3beta1/{parent=projects/*/locations/*}/productSets:import:\001*\332A\023parent,input_config\312A3\n\031ImportProductSetsResponse\022\026BatchOperationMetadata' ), ), ], 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 95c62612..2fae7057 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 @@ -14,20 +14,16 @@ class ProductSearchStub(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 + - 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 + - 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 + - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named `projects/*/locations/*/products/*/referenceImages/*` """ @@ -133,20 +129,16 @@ class ProductSearchServicer(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 + - 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 + - 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 + - Each [Product][google.cloud.vision.v1p3beta1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1p3beta1.ReferenceImage] resources, named `projects/*/locations/*/products/*/referenceImages/*` """ diff --git a/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2.py b/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2.py index af714dd0..380b7318 100644 --- a/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1p3beta1/proto/text_annotation_pb2.py @@ -933,7 +933,8 @@ dict( DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + __doc__="""Additional information detected on the structural + component. Attributes: @@ -947,12 +948,12 @@ ), 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 - properties. Properties describe detected languages, breaks etc.. Please - refer to the + __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 properties. Properties describe detected languages, breaks etc.. + Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty] message definition below for more detail. @@ -1041,7 +1042,8 @@ dict( DESCRIPTOR=_PARAGRAPH, __module__="google.cloud.vision_v1p3beta1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain order. + __doc__="""Structural unit of text representing a number of words in + certain order. Attributes: diff --git a/google/cloud/vision_v1p3beta1/types.py b/google/cloud/vision_v1p3beta1/types.py index c075adb0..9d146598 100644 --- a/google/cloud/vision_v1p3beta1/types.py +++ b/google/cloud/vision_v1p3beta1/types.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p4beta1/__init__.py b/google/cloud/vision_v1p4beta1/__init__.py index 4c838743..cedf170e 100644 --- a/google/cloud/vision_v1p4beta1/__init__.py +++ b/google/cloud/vision_v1p4beta1/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -19,6 +19,8 @@ from google.cloud.vision_helpers.decorators import add_single_feature_methods from google.cloud.vision_helpers import VisionHelpers +import sys +import warnings from google.cloud.vision_v1p4beta1 import types from google.cloud.vision_v1p4beta1.gapic import enums @@ -26,6 +28,15 @@ from google.cloud.vision_v1p4beta1.gapic import product_search_client +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" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class ProductSearchClient(product_search_client.ProductSearchClient): __doc__ = product_search_client.ProductSearchClient.__doc__ enums = enums diff --git a/google/cloud/vision_v1p4beta1/gapic/enums.py b/google/cloud/vision_v1p4beta1/gapic/enums.py index 76e1ae0d..80aa4fce 100644 --- a/google/cloud/vision_v1p4beta1/gapic/enums.py +++ b/google/cloud/vision_v1p4beta1/gapic/enums.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py b/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py index 960432b7..9ebb7733 100644 --- a/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py +++ b/google/cloud/vision_v1p4beta1/gapic/image_annotator_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -214,7 +214,7 @@ def batch_annotate_images( >>> response = client.batch_annotate_images(requests) Args: - requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AnnotateImageRequest]]): Individual image annotation requests for this batch. + requests (list[Union[dict, ~google.cloud.vision_v1p4beta1.types.AnnotateImageRequest]]): Required. Individual image annotation requests for this batch. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.vision_v1p4beta1.types.AnnotateImageRequest` diff --git a/google/cloud/vision_v1p4beta1/gapic/product_search_client.py b/google/cloud/vision_v1p4beta1/gapic/product_search_client.py index 78132f4b..96663d8a 100644 --- a/google/cloud/vision_v1p4beta1/gapic/product_search_client.py +++ b/google/cloud/vision_v1p4beta1/gapic/product_search_client.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. @@ -94,12 +94,7 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def location_path(cls, project, location): - """DEPRECATED. Return a fully-qualified location string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified location string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}", project=project, @@ -108,12 +103,7 @@ def location_path(cls, project, location): @classmethod def product_path(cls, project, location, product): - """DEPRECATED. Return a fully-qualified product string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified product string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/products/{product}", project=project, @@ -123,12 +113,7 @@ def product_path(cls, project, location, product): @classmethod def product_set_path(cls, project, location, product_set): - """DEPRECATED. Return a fully-qualified product_set string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified product_set string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/productSets/{product_set}", project=project, @@ -138,12 +123,7 @@ def product_set_path(cls, project, location, product_set): @classmethod def reference_image_path(cls, project, location, product, reference_image): - """DEPRECATED. Return a fully-qualified reference_image string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified reference_image string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/products/{product}/referenceImages/{reference_image}", project=project, @@ -496,7 +476,7 @@ def get_product_set( name (str): Required. Resource name of the ProductSet to get. Format is: - ``projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID`` + ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`` 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. 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 7d832e49..35eea305 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 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 9cc5824d..00bf1156 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 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/google/cloud/vision_v1p4beta1/proto/geometry_pb2.py b/google/cloud/vision_v1p4beta1/proto/geometry_pb2.py index ca52470e..d90740ef 100644 --- a/google/cloud/vision_v1p4beta1/proto/geometry_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/geometry_pb2.py @@ -347,9 +347,10 @@ dict( 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. + __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: diff --git a/google/cloud/vision_v1p4beta1/proto/image_annotator.proto b/google/cloud/vision_v1p4beta1/proto/image_annotator.proto index e3553b0d..623dfe0a 100644 --- a/google/cloud/vision_v1p4beta1/proto/image_annotator.proto +++ b/google/cloud/vision_v1p4beta1/proto/image_annotator.proto @@ -726,8 +726,8 @@ message AnnotateImageResponse { // Multiple image annotation requests are batched into a single service call. message BatchAnnotateImagesRequest { - // Individual image annotation requests for this batch. - repeated AnnotateImageRequest requests = 1; + // Required. Individual image annotation requests for this batch. + repeated AnnotateImageRequest requests = 1 [(google.api.field_behavior) = REQUIRED]; } // Response to a batch image annotation request. diff --git a/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py b/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py index 5d0bb3d9..dc79c81c 100644 --- a/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/image_annotator_pb2.py @@ -52,7 +52,7 @@ "\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"c\n\x1a\x42\x61tchAnnotateImagesRequest\x12\x45\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateImageRequest"f\n\x1b\x42\x61tchAnnotateImagesResponse\x12G\n\tresponses\x18\x01 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.AnnotateImageResponse"\xe4\x01\n\x13\x41nnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.ImageContext\x12\r\n\x05pages\x18\x04 \x03(\x05"\xd9\x01\n\x14\x41nnotateFileResponse\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12G\n\tresponses\x18\x02 \x03(\x0b\x32\x34.google.cloud.vision.v1p4beta1.AnnotateImageResponse\x12\x13\n\x0btotal_pages\x18\x03 \x01(\x05\x12!\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status"f\n\x19\x42\x61tchAnnotateFilesRequest\x12I\n\x08requests\x18\x01 \x03(\x0b\x32\x32.google.cloud.vision.v1p4beta1.AnnotateFileRequestB\x03\xe0\x41\x02"d\n\x1a\x42\x61tchAnnotateFilesResponse\x12\x46\n\tresponses\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateFileResponse"\x9e\x02\n\x18\x41syncAnnotateFileRequest\x12@\n\x0cinput_config\x18\x01 \x01(\x0b\x32*.google.cloud.vision.v1p4beta1.InputConfig\x12\x38\n\x08\x66\x65\x61tures\x18\x02 \x03(\x0b\x32&.google.cloud.vision.v1p4beta1.Feature\x12\x42\n\rimage_context\x18\x03 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.ImageContext\x12\x42\n\routput_config\x18\x04 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"_\n\x19\x41syncAnnotateFileResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"\xb6\x01\n\x1f\x41syncBatchAnnotateImagesRequest\x12J\n\x08requests\x18\x01 \x03(\x0b\x32\x33.google.cloud.vision.v1p4beta1.AnnotateImageRequestB\x03\xe0\x41\x02\x12G\n\routput_config\x18\x02 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfigB\x03\xe0\x41\x02"f\n AsyncBatchAnnotateImagesResponse\x12\x42\n\routput_config\x18\x01 \x01(\x0b\x32+.google.cloud.vision.v1p4beta1.OutputConfig"p\n\x1e\x41syncBatchAnnotateFilesRequest\x12N\n\x08requests\x18\x01 \x03(\x0b\x32\x37.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestB\x03\xe0\x41\x02"n\n\x1f\x41syncBatchAnnotateFilesResponse\x12K\n\tresponses\x18\x01 \x03(\x0b\x32\x38.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse"o\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32(.google.cloud.vision.v1p4beta1.GcsSource\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\x0c\x12\x11\n\tmime_type\x18\x02 \x01(\t"j\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32-.google.cloud.vision.v1p4beta1.GcsDestination\x12\x12\n\nbatch_size\x18\x02 \x01(\x05"\x18\n\tGcsSource\x12\x0b\n\x03uri\x18\x01 \x01(\t"\x1d\n\x0eGcsDestination\x12\x0b\n\x03uri\x18\x01 \x01(\t"\x8f\x02\n\x11OperationMetadata\x12\x45\n\x05state\x18\x01 \x01(\x0e\x32\x36.google.cloud.vision.v1p4beta1.OperationMetadata.State\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43REATED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\r\n\tCANCELLED\x10\x04*e\n\nLikelihood\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x11\n\rVERY_UNLIKELY\x10\x01\x12\x0c\n\x08UNLIKELY\x10\x02\x12\x0c\n\x08POSSIBLE\x10\x03\x12\n\n\x06LIKELY\x10\x04\x12\x0f\n\x0bVERY_LIKELY\x10\x05\x32\xf1\x07\n\x0eImageAnnotator\x12\xbe\x01\n\x13\x42\x61tchAnnotateImages\x12\x39.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest\x1a:.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse"0\x82\xd3\xe4\x93\x02\x1f"\x1a/v1p4beta1/images:annotate:\x01*\xda\x41\x08requests\x12\xba\x01\n\x12\x42\x61tchAnnotateFiles\x12\x38.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest\x1a\x39.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse"/\x82\xd3\xe4\x93\x02\x1e"\x19/v1p4beta1/files:annotate:\x01*\xda\x41\x08requests\x12\xfc\x01\n\x18\x41syncBatchAnnotateImages\x12>.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest\x1a\x1d.google.longrunning.Operation"\x80\x01\x82\xd3\xe4\x93\x02)"$/v1p4beta1/images:asyncBatchAnnotate:\x01*\xda\x41\x16requests,output_config\xca\x41\x35\n AsyncBatchAnnotateImagesResponse\x12\x11OperationMetadata\x12\xe9\x01\n\x17\x41syncBatchAnnotateFiles\x12=.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02("#/v1p4beta1/files:asyncBatchAnnotate:\x01*\xda\x41\x08requests\xca\x41\x34\n\x1f\x41syncBatchAnnotateFilesResponse\x12\x11OperationMetadata\x1av\xca\x41\x15vision.googleapis.com\xd2\x41[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-visionB\x89\x01\n!com.google.cloud.vision.v1p4beta1B\x13ImageAnnotatorProtoP\x01ZCgoogle.golang.org/genproto/googleapis/cloud/vision/v1p4beta1;vision\xf8\x01\x01\xa2\x02\x04GCVNb\x06proto3' + '\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, @@ -99,8 +99,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=8786, - serialized_end=8887, + serialized_start=8791, + serialized_end=8892, ) _sym_db.RegisterEnumDescriptor(_LIKELIHOOD) @@ -457,8 +457,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=8703, - serialized_end=8784, + serialized_start=8708, + serialized_end=8789, ) _sym_db.RegisterEnumDescriptor(_OPERATIONMETADATA_STATE) @@ -2494,7 +2494,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\340A\002"), file=DESCRIPTOR, ) ], @@ -2507,7 +2507,7 @@ extension_ranges=[], oneofs=[], serialized_start=6471, - serialized_end=6570, + serialized_end=6575, ) @@ -2545,8 +2545,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6572, - serialized_end=6674, + serialized_start=6577, + serialized_end=6679, ) @@ -2638,8 +2638,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6677, - serialized_end=6905, + serialized_start=6682, + serialized_end=6910, ) @@ -2731,8 +2731,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=6908, - serialized_end=7125, + serialized_start=6913, + serialized_end=7130, ) @@ -2770,8 +2770,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7127, - serialized_end=7229, + serialized_start=7132, + serialized_end=7234, ) @@ -2809,8 +2809,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7231, - serialized_end=7331, + serialized_start=7236, + serialized_end=7336, ) @@ -2902,8 +2902,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7334, - serialized_end=7620, + serialized_start=7339, + serialized_end=7625, ) @@ -2941,8 +2941,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7622, - serialized_end=7717, + serialized_start=7627, + serialized_end=7722, ) @@ -2998,8 +2998,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7720, - serialized_end=7902, + serialized_start=7725, + serialized_end=7907, ) @@ -3037,8 +3037,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=7904, - serialized_end=8006, + serialized_start=7909, + serialized_end=8011, ) @@ -3076,8 +3076,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8008, - serialized_end=8120, + serialized_start=8013, + serialized_end=8125, ) @@ -3115,8 +3115,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8122, - serialized_end=8232, + serialized_start=8127, + serialized_end=8237, ) @@ -3190,8 +3190,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8234, - serialized_end=8345, + serialized_start=8239, + serialized_end=8350, ) @@ -3247,8 +3247,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8347, - serialized_end=8453, + serialized_start=8352, + serialized_end=8458, ) @@ -3286,8 +3286,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8455, - serialized_end=8479, + serialized_start=8460, + serialized_end=8484, ) @@ -3325,8 +3325,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8481, - serialized_end=8510, + serialized_start=8486, + serialized_end=8515, ) @@ -3400,8 +3400,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=8513, - serialized_end=8784, + serialized_start=8518, + serialized_end=8789, ) _FEATURE.fields_by_name["type"].enum_type = _FEATURE_TYPE @@ -3654,9 +3654,9 @@ 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 - maximum number of results to return for that type. Multiple ``Feature`` - objects can be specified in the ``features`` list. + __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: @@ -3681,12 +3681,13 @@ dict( DESCRIPTOR=_IMAGESOURCE, __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""External image source (Google Cloud Storage or web URL image location). + __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 + \ **Use ``image_uri`` instead.** The Google Cloud Storage URI of the form ``gs://bucket_name/object_name``. Object versioning is not supported. See `Google Cloud Storage Request URIs `__ @@ -3718,7 +3719,8 @@ dict( DESCRIPTOR=_IMAGE, __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Client image to perform Google Cloud Vision API tasks over. + __doc__="""Client image to perform Google Cloud Vision API tasks + over. Attributes: @@ -3761,7 +3763,8 @@ ), DESCRIPTOR=_FACEANNOTATION, __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A face annotation object contains the results of face detection. + __doc__="""A face annotation object contains the results of face + detection. Attributes: @@ -3851,7 +3854,8 @@ dict( DESCRIPTOR=_PROPERTY, __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A ``Property`` consists of a user-supplied name/value pair. + __doc__="""A ``Property`` consists of a user-supplied name/value + pair. Attributes: @@ -3890,7 +3894,7 @@ score: Overall score of the result. Range [0, 1]. confidence: - **Deprecated. Use ``score`` instead.** The accuracy of the + \ **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 represents the confidence that there is a tower in the query @@ -3957,9 +3961,9 @@ dict( 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). + __doc__="""Set of features pertaining to the image, computed by + computer vision methods over safe-search verticals (for example, adult, + spoof, medical, violence). Attributes: @@ -4012,8 +4016,8 @@ dict( 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. + __doc__="""Color information consists of RGB channels, score, and the + fraction of the image that the color occupies in the image. Attributes: @@ -4072,8 +4076,8 @@ 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 - image. + __doc__="""Single crop hint that is used to generate a new crop when + serving an image. Attributes: @@ -4097,8 +4101,8 @@ 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 - images. + __doc__="""Set of crop hints that are used to generate new crops when + serving images. Attributes: @@ -4195,8 +4199,8 @@ dict( 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 + __doc__="""Request for performing Google Cloud Vision API tasks over + a user-provided image, with user-requested features, and with context information. @@ -4219,8 +4223,8 @@ 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 - information about the source of that image. + __doc__="""If an image was produced from a file (e.g. a PDF), this + message gives information about the source of that image. Attributes: @@ -4292,13 +4296,13 @@ dict( DESCRIPTOR=_BATCHANNOTATEIMAGESREQUEST, __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Multiple image annotation requests are batched into a single service - call. + __doc__="""Multiple image annotation requests are batched into a + single service call. Attributes: requests: - Individual image annotation requests for this batch. + Required. Individual image annotation requests for this batch. """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) ), @@ -4330,7 +4334,8 @@ 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. + __doc__="""A request to annotate one single file, e.g. a PDF, TIFF or + GIF file. Attributes: @@ -4363,8 +4368,8 @@ dict( DESCRIPTOR=_ANNOTATEFILERESPONSE, __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Response to a single file annotation request. A file may contain one or - more images, which individually have their own responses. + __doc__="""Response to a single file annotation request. A file may + contain one or more images, which individually have their own responses. Attributes: @@ -4391,7 +4396,8 @@ dict( DESCRIPTOR=_BATCHANNOTATEFILESREQUEST, __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""A list of requests to annotate files using the BatchAnnotateFiles API. + __doc__="""A list of requests to annotate files using the + BatchAnnotateFiles API. Attributes: @@ -4516,8 +4522,8 @@ dict( DESCRIPTOR=_ASYNCBATCHANNOTATEFILESREQUEST, __module__="google.cloud.vision_v1p4beta1.proto.image_annotator_pb2", - __doc__="""Multiple async file annotation requests are batched into a single - service call. + __doc__="""Multiple async file annotation requests are batched into a + single service call. Attributes: @@ -4612,7 +4618,8 @@ 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. + __doc__="""The Google Cloud Storage location where the input will be + read from. Attributes: @@ -4632,7 +4639,8 @@ 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. + __doc__="""The Google Cloud Storage location where the output will be + written to. Attributes: @@ -4687,6 +4695,7 @@ DESCRIPTOR._options = None _ENTITYANNOTATION.fields_by_name["confidence"]._options = None +_BATCHANNOTATEIMAGESREQUEST.fields_by_name["requests"]._options = None _BATCHANNOTATEFILESREQUEST.fields_by_name["requests"]._options = None _ASYNCBATCHANNOTATEIMAGESREQUEST.fields_by_name["requests"]._options = None _ASYNCBATCHANNOTATEIMAGESREQUEST.fields_by_name["output_config"]._options = None @@ -4700,8 +4709,8 @@ serialized_options=_b( "\312A\025vision.googleapis.com\322A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-vision" ), - serialized_start=8890, - serialized_end=9899, + serialized_start=8895, + serialized_end=9904, methods=[ _descriptor.MethodDescriptor( name="BatchAnnotateImages", diff --git a/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py b/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py index a631a444..ccaec75e 100644 --- a/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/product_search_pb2.py @@ -593,8 +593,8 @@ 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 - image. + __doc__="""Information about the products similar to a single product + in a query image. Attributes: diff --git a/google/cloud/vision_v1p4beta1/proto/product_search_service.proto b/google/cloud/vision_v1p4beta1/proto/product_search_service.proto index 1a165c70..df7bc7a3 100644 --- a/google/cloud/vision_v1p4beta1/proto/product_search_service.proto +++ b/google/cloud/vision_v1p4beta1/proto/product_search_service.proto @@ -651,7 +651,7 @@ message GetProductSetRequest { // Required. Resource name of the ProductSet to get. // // Format is: - // `projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET_ID` + // `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { 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 34f1d9d0..47fa5309 100644 --- a/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/product_search_service_pb2.py @@ -2306,9 +2306,9 @@ 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 1 - million reference images. If the limit is exceeded, periodic indexing - will fail. + __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: @@ -2341,8 +2341,8 @@ dict( 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. + __doc__="""A ``ReferenceImage`` represents a product image and its + associated metadata, such as bounding boxes. Attributes: @@ -2588,7 +2588,7 @@ Attributes: name: Required. Resource name of the ProductSet to get. Format is: - ``projects/PROJECT_ID/locations/LOG_ID/productSets/PRODUCT_SET + ``projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET _ID`` """, # @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.GetProductSetRequest) @@ -2791,7 +2791,8 @@ dict( DESCRIPTOR=_REMOVEPRODUCTFROMPRODUCTSETREQUEST, __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``RemoveProductFromProductSet`` method. + __doc__="""Request message for the ``RemoveProductFromProductSet`` + method. Attributes: @@ -2815,7 +2816,8 @@ dict( DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETREQUEST, __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Request message for the ``ListProductsInProductSet`` method. + __doc__="""Request message for the ``ListProductsInProductSet`` + method. Attributes: @@ -2841,7 +2843,8 @@ dict( DESCRIPTOR=_LISTPRODUCTSINPRODUCTSETRESPONSE, __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Response message for the ``ListProductsInProductSet`` method. + __doc__="""Response message for the ``ListProductsInProductSet`` + method. Attributes: @@ -2862,8 +2865,8 @@ 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 list - of ImportProductSetRequests in each line. + __doc__="""The Google Cloud Storage location for a csv file which + preserves a list of ImportProductSetRequests in each line. Attributes: @@ -2998,7 +3001,8 @@ dict( DESCRIPTOR=_BATCHOPERATIONMETADATA, __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Metadata for the batch operations such as the current state. + __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`` @@ -3026,7 +3030,8 @@ dict( DESCRIPTOR=_PRODUCTSETPURGECONFIG, __module__="google.cloud.vision_v1p4beta1.proto.product_search_service_pb2", - __doc__="""Config to control which ProductSet contains the Products to be deleted. + __doc__="""Config to control which ProductSet contains the Products + to be deleted. Attributes: diff --git a/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py b/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py index 435e1cfa..afabc3ee 100644 --- a/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py +++ b/google/cloud/vision_v1p4beta1/proto/text_annotation_pb2.py @@ -933,7 +933,8 @@ dict( DESCRIPTOR=_TEXTANNOTATION_TEXTPROPERTY, __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""Additional information detected on the structural component. + __doc__="""Additional information detected on the structural + component. Attributes: @@ -947,12 +948,12 @@ ), 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 - properties. Properties describe detected languages, breaks etc.. Please - refer to the + __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 properties. Properties describe detected languages, breaks etc.. + Please refer to the [TextAnnotation.TextProperty][google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty] message definition below for more detail. @@ -1041,7 +1042,8 @@ dict( DESCRIPTOR=_PARAGRAPH, __module__="google.cloud.vision_v1p4beta1.proto.text_annotation_pb2", - __doc__="""Structural unit of text representing a number of words in certain order. + __doc__="""Structural unit of text representing a number of words in + certain order. Attributes: diff --git a/google/cloud/vision_v1p4beta1/types.py b/google/cloud/vision_v1p4beta1/types.py index c5d4ef42..25a10a3d 100644 --- a/google/cloud/vision_v1p4beta1/types.py +++ b/google/cloud/vision_v1p4beta1/types.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/noxfile.py b/noxfile.py index 8a65ddbc..f70e358c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,7 +23,6 @@ import nox -LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core")) BLACK_VERSION = "black==19.3b0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] @@ -38,7 +37,7 @@ def lint(session): Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", BLACK_VERSION, *LOCAL_DEPS) + session.install("flake8", BLACK_VERSION) session.run("black", "--check", *BLACK_PATHS) session.run("flake8", "google", "tests") @@ -67,8 +66,6 @@ def lint_setup_py(session): def default(session): # Install all test dependencies, then install this package in-place. session.install("mock", "pytest", "pytest-cov") - for local_dep in LOCAL_DEPS: - session.install("-e", local_dep) session.install("-e", ".") # Run py.test against the unit tests. @@ -86,7 +83,7 @@ def default(session): ) -@nox.session(python=["2.7", "3.5", "3.6", "3.7"]) +@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"]) def unit(session): """Run the unit test suite.""" default(session) @@ -113,10 +110,9 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. session.install("mock", "pytest") - for local_dep in LOCAL_DEPS: - session.install("-e", local_dep) - session.install("-e", "../test_utils/") - session.install("-e", "../storage") + + session.install("google-cloud-storage") + session.install("-e", "test_utils") session.install("-e", ".") # Run py.test against the system tests. @@ -134,7 +130,7 @@ def cover(session): test runs (not system test runs), and then erases coverage data. """ session.install("coverage", "pytest-cov") - session.run("coverage", "report", "--show-missing", "--fail-under=100") + session.run("coverage", "report", "--show-missing", "--fail-under=99") session.run("coverage", "erase") diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..4fa94931 --- /dev/null +++ b/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base", ":preserveSemverRanges" + ] +} diff --git a/setup.py b/setup.py index e4434866..3f6fcdc8 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ name = "google-cloud-vision" description = "Cloud Vision API API client library" -version = "0.41.0" +version = "0.42.0" release_status = "Development Status :: 4 - Beta" dependencies = [ "google-api-core[grpc] >= 1.14.0, < 2.0.0dev", @@ -48,7 +48,7 @@ author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", - url="https://github.com/GoogleCloudPlatform/google-cloud-python", + url="https://github.com/googleapis/python-vision", classifiers=[ release_status, "Intended Audience :: Developers", diff --git a/synth.metadata b/synth.metadata index c155b910..1fab2481 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,24 +1,25 @@ { - "updateTime": "2019-11-20T13:38:24.545550Z", + "updateTime": "2020-02-01T03:30:16.112488Z", "sources": [ { "generator": { "name": "artman", - "version": "0.42.1", - "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" + "version": "0.44.4", + "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "16543773103e2619d2b5f52456264de5bb9be104", - "internalRef": "281423227" + "sha": "b5cbe4a4ba64ab19e6627573ff52057a1657773d", + "internalRef": "292647187", + "log": "b5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\n" } }, { "template": { - "name": "python_library", + "name": "python_split_library", "origin": "synthtool.gcp", "version": "2019.10.17" } diff --git a/test_utils/credentials.json.enc b/test_utils/credentials.json.enc new file mode 100644 index 00000000..f073c7e4 --- /dev/null +++ b/test_utils/credentials.json.enc @@ -0,0 +1,49 @@ +U2FsdGVkX1/vVm/dOEg1DCACYbdOcL+ey6+64A+DZGZVgF8Z/3skK6rpPocu6GOA +UZAqASsBH9QifDf8cKVXQXVYpYq6HSv2O0w7vOmVorZO9GYPo98s9/8XO+4ty/AU +aB6TD68frBAYv4cT/l5m7aYdzfzMTy0EOXoleZT09JYP3B5FV3KCO114FzMXGwrj +HXsR6E5SyUUlUnWPC3eD3aqmovay0gxOKYO3ZwjFK1nlbN/8q6/8nwBCf/Bg6SHV +V93pNxdolRlJev9kgKz4RN1z4jGCy5PAndhSLE82NFIs9LoAiEOU5YeMlN+Ulqus +J92nh+ptUe9a4pJGbAuveUWO7zdS1QyXvTMUcmmSfXCNm/eIQjNuu5+rHtIjWKh8 +Ilwj2w1aTfSptQEhk/kwRgFz/d11vfwJzvwTmCxO6zyOeL0VUWLqdCBGgG5As9He +/RenF8PZ1O0WbTt7fns5oTlTk/MUo+0xJ1xqvu/y45LaqqcBAnEdrWKmtM3dJHWv +ufQku+kD+83F/VwBnQdvgMHu6KZEs6LRrNo58r4QuK6fS7VCACdzxID1RM2cL7kT +6BFRlyGj1aigmjne9g9M9Jx4R+mZDpPU1WDzzG71J4qCUwaX8Dfwutuv4uiFvzwq +NUF0wLJJPtKWmtW+hnZ/fhHQGCRsOpZzFnqp6Zv7J7k6esqxMgIjfal7Djk5Acy8 +j3iVvm6CYmKMVqzL62JHYS9Ye83tzBCaR8hpnJQKgH3FSOFY8HSwrtQSIsl/hSeF +41sgnz0Y+/gkzNeU18qFk+eCZmvljyu+JK0nPYUgpOCJYVBNQpNHz5PUyiAEKhtM +IOSdjPRW1Y+Xf4RroJnLPoF24Ijwrow5LCm9hBRY6TPPMMmnIXCd23xcLJ1rMj6g +x4ZikElans+cwuc9wtbb7w01DcpTwQ1+eIV1qV+KIgpnLjRGLhZD4etobBsrwYu/ +vnIwy2QHCKENPb8sbdgp7x2mF7VSX0/7tf+9+i70EBiMzpOKBkiZhtLzm6hOBkEy +ODaWrx4lTTwbSw8Rmtf58APhPFMsjHoNsjiUoK249Y8Y2Ff4fMfqYsXu6VC1n/At +CuWYHc3EfBwFcLJS+RQB9kFk/4FygFBWq4Kj0MqoRruLbKmoGeJKH9q35W0f0NCD +j+iHt3014kMGiuyJe1UDQ6fvEihFFdHuDivFpPAXDt4PTY/WtpDhaGMx23kb54pK +jkAuxpznAB1lK3u9bGRXDasGeHIrNtIlPvgkrWHXvoBVqM7zry8TGtoxp3E3I42Z +cUfDWfB9GqVdrOwvrTzyZsl2uShRkAJaZFZj5aMyYxiptp4gM8CwWiNtOd2EwtRO +LxZX4M02PQFIqXV3FSDA0q6EwglUrTZdAlYeOEkopaKCtG31dEPOSQG3NGJAEYso +Cxm99H7970dp0OAgpNSgRbcWDbhVbQXnRzvFGqLeH6a9dQ/a8uD3s8Qm9Du/kB6d +XxTRe2OGxzcD0AgI8GClE4rIZHCLbcwuJRp0EYcN+pgY80O4U98fZ5RYpU6OYbU/ +MEiaBYFKtZtGkV6AQD568V7hHJWqc5DDfVHUQ/aeQwnKi2vnU66u+nnV2rZxXxLP ++dqeLRpul+wKa5b/Z5SfQ14Ff8s7aVyxaogGpyggyPL1vyq4KWZ6Or/wEE5hgNO4 +kBh6ht0QT1Hti8XY2JK1M+Jgbjgcg4jkHBGVqegrG1Rvcc2A4TYKwx+QMSBhyxrU +5qhROjS4lTcC42hQslMUkUwc4U/Y91XdFbOOnaAkwzI36NRYL0pmgZnYxGJZeRvr +E5foOhnOEVSFGdOkLfFh+FkWZQf56Lmn8Gg2wHE3dZTxLHibiUYfkgOr1uEosq29 +D1NstvlJURPQ0Q+8QQNWcl9nEZHMAjOmnL1hbx+QfuC6seucp+sXGzdZByMLZbvT +tG8KNL293CmyQowgf9MXToWYnwRkcvqfTaKyor2Ggze3JtoFW4t0j4DI1XPciZFX +XmfApHrzdB/bZadzxyaZ2NE0CuH9zDelwI6rz38xsN5liYnp5qmNKVCZVOHccXa6 +J8x365m5/VaaA2RrtdPqKxn8VaKy7+T690QgMXVGM4PbzQzQxHuSleklocqlP+sB +jSMXCZY+ng/i4UmRO9noiyW3UThYh0hIdMYs12EmmI9cnF/OuYZpl30fmqwV+VNM +td5B2fYvAvvsjiX60SFCn3DATP1GrPMBlZSmhhP3GYS+xrWt3Xxta9qIX2BEF1Gg +twnZZRjoULSRFUYPfJPEOfEH2UQwm84wxx/GezVE+S/RpBlatPOgCiLnNNaLfdTC +mTG9qY9elJv3GGQO8Lqgf4i8blExs05lSPk1BDhzTB6H9TLz+Ge0/l1QxKf3gPXU +aImK1azieXMXHECkdKxrzmehwu1dZ/oYOLc/OFQCETwSRoLPFOFpYUpizwmVVHR6 +uLSfRptte4ZOU3zHfpd/0+J4tkwHwEkGzsmMdqudlm7qME6upuIplyVBH8JiXzUK +n1RIH/OPmVEluAnexWRLZNdk7MrakIO4XACVbICENiYQgAIErP568An6twWEGDbZ +bEN64E3cVDTDRPRAunIhhsEaapcxpFEPWlHorxv36nMUt0R0h0bJlCu5QdzckfcX +ZrRuu1kl76ZfbSE8T0G4/rBb9gsU4Gn3WyvLIO3MgFBuxR68ZwcR8LpEUd8qp38H +NG4cxPmN1nGKo663Z+xI2Gt5up4gpl+fOt4mXqxY386rB7yHaOfElMG5TUYdrS9w +1xbbCVgeJ6zxX+NFlndG33cSAPprhw+C18eUu6ZU63WZcYFo3GfK6rs3lvYtofvE +8DxztdTidQedNVNE+63YCjhxd/cZUI5n/UpgYkr9owp7hNGJiR3tdoNLR2gcoGqL +qWhH928k2aSgF2j97LZ2OqoPCp0tUB7ho4jD2u4Ik3GLVNlCc3dCvWRvpHtDTQDv +tujESMfHUc9I2r4S/PD3bku/ABGwa977Yp1PjzJGr9RajA5is5n6GVpyynwjtKG4 +iyyITpdwpCgr8pueTBLwZnas3slmiMOog/E4PmPgctHzvC+vhQijhUtw5zSsmv0l +bZlw/mVhp5Ta7dTcLBKR8DA3m3vTbaEGkz0xpfQr7GfiSMRbJyvIw88pDK0gyTMD diff --git a/test_utils/scripts/circleci/get_tagged_package.py b/test_utils/scripts/circleci/get_tagged_package.py new file mode 100644 index 00000000..c148b9dc --- /dev/null +++ b/test_utils/scripts/circleci/get_tagged_package.py @@ -0,0 +1,64 @@ +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Helper to determine package from tag. +Get the current package directory corresponding to the Circle Tag. +""" + +from __future__ import print_function + +import os +import re +import sys + + +TAG_RE = re.compile(r""" + ^ + (?P + (([a-z]+)[_-])*) # pkg-name-with-hyphens-or-underscores (empty allowed) + ([0-9]+)\.([0-9]+)\.([0-9]+) # Version x.y.z (x, y, z all ints) + $ +""", re.VERBOSE) +TAG_ENV = 'CIRCLE_TAG' +ERROR_MSG = '%s env. var. not set' % (TAG_ENV,) +BAD_TAG_MSG = 'Invalid tag name: %s. Expected pkg-name-x.y.z' +CIRCLE_CI_SCRIPTS_DIR = os.path.dirname(__file__) +ROOT_DIR = os.path.realpath( + os.path.join(CIRCLE_CI_SCRIPTS_DIR, '..', '..', '..')) + + +def main(): + """Get the current package directory. + Prints the package directory out so callers can consume it. + """ + if TAG_ENV not in os.environ: + print(ERROR_MSG, file=sys.stderr) + sys.exit(1) + + tag_name = os.environ[TAG_ENV] + match = TAG_RE.match(tag_name) + if match is None: + print(BAD_TAG_MSG % (tag_name,), file=sys.stderr) + sys.exit(1) + + pkg_name = match.group('pkg') + if pkg_name is None: + print(ROOT_DIR) + else: + pkg_dir = pkg_name.rstrip('-').replace('-', '_') + print(os.path.join(ROOT_DIR, pkg_dir)) + + +if __name__ == '__main__': + main() diff --git a/test_utils/scripts/circleci/twine_upload.sh b/test_utils/scripts/circleci/twine_upload.sh new file mode 100755 index 00000000..23a4738e --- /dev/null +++ b/test_utils/scripts/circleci/twine_upload.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ev + +# If this is not a CircleCI tag, no-op. +if [[ -z "$CIRCLE_TAG" ]]; then + echo "This is not a release tag. Doing nothing." + exit 0 +fi + +# H/T: http://stackoverflow.com/a/246128/1068170 +SCRIPT="$(dirname "${BASH_SOURCE[0]}")/get_tagged_package.py" +# Determine the package directory being deploying on this tag. +PKG_DIR="$(python ${SCRIPT})" + +# Ensure that we have the latest versions of Twine, Wheel, and Setuptools. +python3 -m pip install --upgrade twine wheel setuptools + +# Move into the package, build the distribution and upload. +cd ${PKG_DIR} +python3 setup.py sdist bdist_wheel +twine upload dist/* diff --git a/test_utils/scripts/get_target_packages.py b/test_utils/scripts/get_target_packages.py new file mode 100644 index 00000000..1d51830c --- /dev/null +++ b/test_utils/scripts/get_target_packages.py @@ -0,0 +1,268 @@ +# Copyright 2017 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Print a list of packages which require testing.""" + +import os +import re +import subprocess +import warnings + + +CURRENT_DIR = os.path.realpath(os.path.dirname(__file__)) +BASE_DIR = os.path.realpath(os.path.join(CURRENT_DIR, '..', '..')) +GITHUB_REPO = os.environ.get('GITHUB_REPO', 'google-cloud-python') +CI = os.environ.get('CI', '') +CI_BRANCH = os.environ.get('CIRCLE_BRANCH') +CI_PR = os.environ.get('CIRCLE_PR_NUMBER') +CIRCLE_TAG = os.environ.get('CIRCLE_TAG') +head_hash, head_name = subprocess.check_output(['git', 'show-ref', 'HEAD'] +).strip().decode('ascii').split() +rev_parse = subprocess.check_output( + ['git', 'rev-parse', '--abbrev-ref', 'HEAD'] +).strip().decode('ascii') +MAJOR_DIV = '#' * 78 +MINOR_DIV = '#' + '-' * 77 + +# NOTE: This reg-ex is copied from ``get_tagged_packages``. +TAG_RE = re.compile(r""" + ^ + (?P + (([a-z]+)-)*) # pkg-name-with-hyphens- (empty allowed) + ([0-9]+)\.([0-9]+)\.([0-9]+) # Version x.y.z (x, y, z all ints) + $ +""", re.VERBOSE) + +# This is the current set of dependencies by package. +# As of this writing, the only "real" dependency is that of error_reporting +# (on logging), the rest are just system test dependencies. +PKG_DEPENDENCIES = { + 'logging': {'pubsub'}, +} + + +def get_baseline(): + """Return the baseline commit. + + On a pull request, or on a branch, return the common parent revision + with the master branch. + + Locally, return a value pulled from environment variables, or None if + the environment variables are not set. + + On a push to master, return None. This will effectively cause everything + to be considered to be affected. + """ + + # If this is a pull request or branch, return the tip for master. + # We will test only packages which have changed since that point. + ci_non_master = (CI == 'true') and any([CI_BRANCH != 'master', CI_PR]) + + if ci_non_master: + + repo_url = 'git@github.com:GoogleCloudPlatform/{}'.format(GITHUB_REPO) + subprocess.run(['git', 'remote', 'add', 'baseline', repo_url], + stderr=subprocess.DEVNULL) + subprocess.run(['git', 'pull', 'baseline'], stderr=subprocess.DEVNULL) + + if CI_PR is None and CI_BRANCH is not None: + output = subprocess.check_output([ + 'git', 'merge-base', '--fork-point', + 'baseline/master', CI_BRANCH]) + return output.strip().decode('ascii') + + return 'baseline/master' + + # If environment variables are set identifying what the master tip is, + # use that. + if os.environ.get('GOOGLE_CLOUD_TESTING_REMOTE', ''): + remote = os.environ['GOOGLE_CLOUD_TESTING_REMOTE'] + branch = os.environ.get('GOOGLE_CLOUD_TESTING_BRANCH', 'master') + return '%s/%s' % (remote, branch) + + # If we are not in CI and we got this far, issue a warning. + if not CI: + warnings.warn('No baseline could be determined; this means tests ' + 'will run for every package. If this is local ' + 'development, set the $GOOGLE_CLOUD_TESTING_REMOTE ' + 'environment variable.') + + # That is all we can do; return None. + return None + + +def get_changed_files(): + """Return a list of files that have been changed since the baseline. + + If there is no base, return None. + """ + # Get the baseline, and fail quickly if there is no baseline. + baseline = get_baseline() + print('# Baseline commit: {}'.format(baseline)) + if not baseline: + return None + + # Return a list of altered files. + try: + return subprocess.check_output([ + 'git', 'diff', '--name-only', '{}..HEAD'.format(baseline), + ], stderr=subprocess.DEVNULL).decode('utf8').strip().split('\n') + except subprocess.CalledProcessError: + warnings.warn('Unable to perform git diff; falling back to assuming ' + 'all packages have changed.') + return None + + +def reverse_map(dict_of_sets): + """Reverse a map of one-to-many. + + So the map:: + + { + 'A': {'B', 'C'}, + 'B': {'C'}, + } + + becomes + + { + 'B': {'A'}, + 'C': {'A', 'B'}, + } + + Args: + dict_of_sets (dict[set]): A dictionary of sets, mapping + one value to many. + + Returns: + dict[set]: The reversed map. + """ + result = {} + for key, values in dict_of_sets.items(): + for value in values: + result.setdefault(value, set()).add(key) + + return result + +def get_changed_packages(file_list): + """Return a list of changed packages based on the provided file list. + + If the file list is None, then all packages should be considered to be + altered. + """ + # Determine a complete list of packages. + all_packages = set() + for file_ in os.listdir(BASE_DIR): + abs_file = os.path.realpath(os.path.join(BASE_DIR, file_)) + nox_file = os.path.join(abs_file, 'nox.py') + if os.path.isdir(abs_file) and os.path.isfile(nox_file): + all_packages.add(file_) + + # If ther is no file list, send down the full package set. + if file_list is None: + return all_packages + + # Create a set based on the list of changed files. + answer = set() + reverse_deps = reverse_map(PKG_DEPENDENCIES) + for file_ in file_list: + # Ignore root directory changes (setup.py, .gitignore, etc.). + if os.path.sep not in file_: + continue + + # Ignore changes that are not in a package (usually this will be docs). + package = file_.split(os.path.sep, 1)[0] + if package not in all_packages: + continue + + # If there is a change in core, short-circuit now and return + # everything. + if package in ('core',): + return all_packages + + # Add the package, as well as any dependencies this package has. + # NOTE: For now, dependencies only go down one level. + answer.add(package) + answer = answer.union(reverse_deps.get(package, set())) + + # We got this far without being short-circuited; return the final answer. + return answer + + +def get_tagged_package(): + """Return the package corresponding to the current tag. + + If there is not tag, will return :data:`None`. + """ + if CIRCLE_TAG is None: + return + + match = TAG_RE.match(CIRCLE_TAG) + if match is None: + return + + pkg_name = match.group('pkg') + if pkg_name == '': + # NOTE: This corresponds to the "umbrella" tag. + return + + return pkg_name.rstrip('-').replace('-', '_') + + +def get_target_packages(): + """Return a list of target packages to be run in the current build. + + If in a tag build, will run only the package(s) that are tagged, otherwise + will run the packages that have file changes in them (or packages that + depend on those). + """ + tagged_package = get_tagged_package() + if tagged_package is None: + file_list = get_changed_files() + print(MAJOR_DIV) + print('# Changed files:') + print(MINOR_DIV) + for file_ in file_list or (): + print('# {}'.format(file_)) + for package in sorted(get_changed_packages(file_list)): + yield package + else: + yield tagged_package + + +def main(): + print(MAJOR_DIV) + print('# Environment') + print(MINOR_DIV) + print('# CircleCI: {}'.format(CI)) + print('# CircleCI branch: {}'.format(CI_BRANCH)) + print('# CircleCI pr: {}'.format(CI_PR)) + print('# CircleCI tag: {}'.format(CIRCLE_TAG)) + print('# HEAD ref: {}'.format(head_hash)) + print('# {}'.format(head_name)) + print('# Git branch: {}'.format(rev_parse)) + print(MAJOR_DIV) + + packages = list(get_target_packages()) + + print(MAJOR_DIV) + print('# Target packages:') + print(MINOR_DIV) + for package in packages: + print(package) + print(MAJOR_DIV) + + +if __name__ == '__main__': + main() diff --git a/test_utils/scripts/get_target_packages_kokoro.py b/test_utils/scripts/get_target_packages_kokoro.py new file mode 100644 index 00000000..27d3a0c9 --- /dev/null +++ b/test_utils/scripts/get_target_packages_kokoro.py @@ -0,0 +1,98 @@ +# Copyright 2017 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Print a list of packages which require testing.""" + +import pathlib +import subprocess + +import ci_diff_helper +import requests + + +def print_environment(environment): + print("-> CI environment:") + print('Branch', environment.branch) + print('PR', environment.pr) + print('In PR', environment.in_pr) + print('Repo URL', environment.repo_url) + if environment.in_pr: + print('PR Base', environment.base) + + +def get_base(environment): + if environment.in_pr: + return environment.base + else: + # If we're not in a PR, just calculate the changes between this commit + # and its parent. + return 'HEAD~1' + + +def get_changed_files_from_base(base): + return subprocess.check_output([ + 'git', 'diff', '--name-only', f'{base}..HEAD', + ], stderr=subprocess.DEVNULL).decode('utf8').strip().split('\n') + + +_URL_TEMPLATE = ( + 'https://api.github.com/repos/googleapis/google-cloud-python/pulls/' + '{}/files' +) + + +def get_changed_files_from_pr(pr): + url = _URL_TEMPLATE.format(pr) + while url is not None: + response = requests.get(url) + for info in response.json(): + yield info['filename'] + url = response.links.get('next', {}).get('url') + + +def determine_changed_packages(changed_files): + packages = [ + path.parent for path in pathlib.Path('.').glob('*/noxfile.py') + ] + + changed_packages = set() + for file in changed_files: + file = pathlib.Path(file) + for package in packages: + if package in file.parents: + changed_packages.add(package) + + return changed_packages + + +def main(): + environment = ci_diff_helper.get_config() + print_environment(environment) + base = get_base(environment) + + if environment.in_pr: + changed_files = list(get_changed_files_from_pr(environment.pr)) + else: + changed_files = get_changed_files_from_base(base) + + packages = determine_changed_packages(changed_files) + + print(f"Comparing against {base}.") + print("-> Changed packages:") + + for package in packages: + print(package) + + +main() diff --git a/test_utils/scripts/run_emulator.py b/test_utils/scripts/run_emulator.py new file mode 100644 index 00000000..287b0864 --- /dev/null +++ b/test_utils/scripts/run_emulator.py @@ -0,0 +1,199 @@ +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Run system tests locally with the emulator. + +First makes system calls to spawn the emulator and get the local environment +variable needed for it. Then calls the system tests. +""" + + +import argparse +import os +import subprocess + +import psutil + +from google.cloud.environment_vars import BIGTABLE_EMULATOR +from google.cloud.environment_vars import GCD_DATASET +from google.cloud.environment_vars import GCD_HOST +from google.cloud.environment_vars import PUBSUB_EMULATOR +from run_system_test import run_module_tests + + +BIGTABLE = 'bigtable' +DATASTORE = 'datastore' +PUBSUB = 'pubsub' +PACKAGE_INFO = { + BIGTABLE: (BIGTABLE_EMULATOR,), + DATASTORE: (GCD_DATASET, GCD_HOST), + PUBSUB: (PUBSUB_EMULATOR,), +} +EXTRA = { + DATASTORE: ('--no-legacy',), +} +_DS_READY_LINE = '[datastore] Dev App Server is now running.\n' +_PS_READY_LINE_PREFIX = '[pubsub] INFO: Server started, listening on ' +_BT_READY_LINE_PREFIX = '[bigtable] Cloud Bigtable emulator running on ' + + +def get_parser(): + """Get simple ``argparse`` parser to determine package. + + :rtype: :class:`argparse.ArgumentParser` + :returns: The parser for this script. + """ + parser = argparse.ArgumentParser( + description='Run google-cloud system tests against local emulator.') + parser.add_argument('--package', dest='package', + choices=sorted(PACKAGE_INFO.keys()), + default=DATASTORE, help='Package to be tested.') + return parser + + +def get_start_command(package): + """Get command line arguments for starting emulator. + + :type package: str + :param package: The package to start an emulator for. + + :rtype: tuple + :returns: The arguments to be used, in a tuple. + """ + result = ('gcloud', 'beta', 'emulators', package, 'start') + extra = EXTRA.get(package, ()) + return result + extra + + +def get_env_init_command(package): + """Get command line arguments for getting emulator env. info. + + :type package: str + :param package: The package to get environment info for. + + :rtype: tuple + :returns: The arguments to be used, in a tuple. + """ + result = ('gcloud', 'beta', 'emulators', package, 'env-init') + extra = EXTRA.get(package, ()) + return result + extra + + +def datastore_wait_ready(popen): + """Wait until the datastore emulator is ready to use. + + :type popen: :class:`subprocess.Popen` + :param popen: An open subprocess to interact with. + """ + emulator_ready = False + while not emulator_ready: + emulator_ready = popen.stderr.readline() == _DS_READY_LINE + + +def wait_ready_prefix(popen, prefix): + """Wait until the a process encounters a line with matching prefix. + + :type popen: :class:`subprocess.Popen` + :param popen: An open subprocess to interact with. + + :type prefix: str + :param prefix: The prefix to match + """ + emulator_ready = False + while not emulator_ready: + emulator_ready = popen.stderr.readline().startswith(prefix) + + +def wait_ready(package, popen): + """Wait until the emulator is ready to use. + + :type package: str + :param package: The package to check if ready. + + :type popen: :class:`subprocess.Popen` + :param popen: An open subprocess to interact with. + + :raises: :class:`KeyError` if the ``package`` is not among + ``datastore``, ``pubsub`` or ``bigtable``. + """ + if package == DATASTORE: + datastore_wait_ready(popen) + elif package == PUBSUB: + wait_ready_prefix(popen, _PS_READY_LINE_PREFIX) + elif package == BIGTABLE: + wait_ready_prefix(popen, _BT_READY_LINE_PREFIX) + else: + raise KeyError('Package not supported', package) + + +def cleanup(pid): + """Cleanup a process (including all of its children). + + :type pid: int + :param pid: Process ID. + """ + proc = psutil.Process(pid) + for child_proc in proc.children(recursive=True): + try: + child_proc.kill() + child_proc.terminate() + except psutil.NoSuchProcess: + pass + proc.terminate() + proc.kill() + + +def run_tests_in_emulator(package): + """Spawn an emulator instance and run the system tests. + + :type package: str + :param package: The package to run system tests against. + """ + # Make sure this package has environment vars to replace. + env_vars = PACKAGE_INFO[package] + + start_command = get_start_command(package) + # Ignore stdin and stdout, don't pollute the user's output with them. + proc_start = subprocess.Popen(start_command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + try: + wait_ready(package, proc_start) + env_init_command = get_env_init_command(package) + proc_env = subprocess.Popen(env_init_command, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + env_status = proc_env.wait() + if env_status != 0: + raise RuntimeError(env_status, proc_env.stderr.read()) + env_lines = proc_env.stdout.read().strip().split('\n') + # Set environment variables before running the system tests. + for env_var in env_vars: + line_prefix = 'export ' + env_var + '=' + value, = [line.split(line_prefix, 1)[1] for line in env_lines + if line.startswith(line_prefix)] + os.environ[env_var] = value + run_module_tests(package, + ignore_requirements=True) + finally: + cleanup(proc_start.pid) + + +def main(): + """Main method to run this script.""" + parser = get_parser() + args = parser.parse_args() + run_tests_in_emulator(args.package) + + +if __name__ == '__main__': + main() diff --git a/test_utils/scripts/update_docs.sh b/test_utils/scripts/update_docs.sh new file mode 100755 index 00000000..8cbab9f0 --- /dev/null +++ b/test_utils/scripts/update_docs.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ev + +GH_OWNER='GoogleCloudPlatform' +GH_PROJECT_NAME='google-cloud-python' + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Function to build the docs. +function build_docs { + rm -rf docs/_build/ + rm -f docs/bigquery/generated/*.rst + # -W -> warnings as errors + # -T -> show full traceback on exception + # -N -> no color + sphinx-build \ + -W -T -N \ + -b html \ + -d docs/_build/doctrees \ + docs/ \ + docs/_build/html/ + return $? +} + +# Only update docs if we are on CircleCI. +if [[ "${CIRCLE_BRANCH}" == "master" ]] && [[ -z "${CIRCLE_PR_NUMBER}" ]]; then + echo "Building new docs on a merged commit." +elif [[ "$1" == "kokoro" ]]; then + echo "Building and publishing docs on Kokoro." +elif [[ -n "${CIRCLE_TAG}" ]]; then + echo "Building new docs on a tag (but will not deploy)." + build_docs + exit $? +else + echo "Not on master nor a release tag." + echo "Building new docs for testing purposes, but not deploying." + build_docs + exit $? +fi + +# Adding GitHub pages branch. `git submodule add` checks it +# out at HEAD. +GH_PAGES_DIR='ghpages' +git submodule add -q -b gh-pages \ + "git@github.com:${GH_OWNER}/${GH_PROJECT_NAME}" ${GH_PAGES_DIR} + +# Determine if we are building a new tag or are building docs +# for master. Then build new docs in docs/_build from master. +if [[ -n "${CIRCLE_TAG}" ]]; then + # Sphinx will use the package version by default. + build_docs +else + SPHINX_RELEASE=$(git log -1 --pretty=%h) build_docs +fi + +# Update gh-pages with the created docs. +cd ${GH_PAGES_DIR} +git rm -fr latest/ +cp -R ../docs/_build/html/ latest/ + +# Update the files push to gh-pages. +git add . +git status + +# If there are no changes, just exit cleanly. +if [[ -z "$(git status --porcelain)" ]]; then + echo "Nothing to commit. Exiting without pushing changes." + exit +fi + +# Commit to gh-pages branch to apply changes. +git config --global user.email "dpebot@google.com" +git config --global user.name "dpebot" +git commit -m "Update docs after merge to master." + +# NOTE: This may fail if two docs updates (on merges to master) +# happen in close proximity. +git push -q origin HEAD:gh-pages diff --git a/test_utils/setup.py b/test_utils/setup.py new file mode 100644 index 00000000..8e9222a7 --- /dev/null +++ b/test_utils/setup.py @@ -0,0 +1,64 @@ +# Copyright 2017 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +from setuptools import find_packages +from setuptools import setup + + +PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) + + +# NOTE: This is duplicated throughout and we should try to +# consolidate. +SETUP_BASE = { + 'author': 'Google Cloud Platform', + 'author_email': 'googleapis-publisher@google.com', + 'scripts': [], + 'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python', + 'license': 'Apache 2.0', + 'platforms': 'Posix; MacOS X; Windows', + 'include_package_data': True, + 'zip_safe': False, + 'classifiers': [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Topic :: Internet', + ], +} + + +REQUIREMENTS = [ + 'google-auth >= 0.4.0', + 'six', +] + +setup( + name='google-cloud-testutils', + version='0.24.0', + description='System test utilities for google-cloud-python', + packages=find_packages(), + install_requires=REQUIREMENTS, + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', + **SETUP_BASE +) diff --git a/test_utils/test_utils/__init__.py b/test_utils/test_utils/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test_utils/test_utils/imports.py b/test_utils/test_utils/imports.py new file mode 100644 index 00000000..5991af7f --- /dev/null +++ b/test_utils/test_utils/imports.py @@ -0,0 +1,38 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import mock +import six + + +def maybe_fail_import(predicate): + """Create and return a patcher that conditionally makes an import fail. + + Args: + predicate (Callable[[...], bool]): A callable that, if it returns `True`, + triggers an `ImportError`. It must accept the same arguments as the + built-in `__import__` function. + https://docs.python.org/3/library/functions.html#__import__ + + Returns: + A mock patcher object that can be used to enable patched import behavior. + """ + orig_import = six.moves.builtins.__import__ + + def custom_import(name, globals=None, locals=None, fromlist=(), level=0): + if predicate(name, globals, locals, fromlist, level): + raise ImportError + return orig_import(name, globals, locals, fromlist, level) + + return mock.patch.object(six.moves.builtins, "__import__", new=custom_import) diff --git a/test_utils/test_utils/retry.py b/test_utils/test_utils/retry.py new file mode 100644 index 00000000..e61c001a --- /dev/null +++ b/test_utils/test_utils/retry.py @@ -0,0 +1,207 @@ +# Copyright 2016 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import time +from functools import wraps + +import six + +MAX_TRIES = 4 +DELAY = 1 +BACKOFF = 2 + + +def _retry_all(_): + """Retry all caught exceptions.""" + return True + + +class BackoffFailed(Exception): + """Retry w/ backoffs did not complete successfully.""" + + +class RetryBase(object): + """Base for retrying calling a decorated function w/ exponential backoff. + + :type max_tries: int + :param max_tries: Number of times to try (not retry) before giving up. + + :type delay: int + :param delay: Initial delay between retries in seconds. + + :type backoff: int + :param backoff: Backoff multiplier e.g. value of 2 will double the + delay each retry. + + :type logger: logging.Logger instance + :param logger: Logger to use. If None, print. + """ + def __init__(self, max_tries=MAX_TRIES, delay=DELAY, backoff=BACKOFF, + logger=None): + self.max_tries = max_tries + self.delay = delay + self.backoff = backoff + self.logger = logger.warning if logger else six.print_ + + +class RetryErrors(RetryBase): + """Decorator for retrying given exceptions in testing. + + :type exception: Exception or tuple of Exceptions + :param exception: The exception to check or may be a tuple of + exceptions to check. + + :type error_predicate: function, takes caught exception, returns bool + :param error_predicate: Predicate evaluating whether to retry after a + caught exception. + + :type max_tries: int + :param max_tries: Number of times to try (not retry) before giving up. + + :type delay: int + :param delay: Initial delay between retries in seconds. + + :type backoff: int + :param backoff: Backoff multiplier e.g. value of 2 will double the + delay each retry. + + :type logger: logging.Logger instance + :param logger: Logger to use. If None, print. + """ + def __init__(self, exception, error_predicate=_retry_all, + max_tries=MAX_TRIES, delay=DELAY, backoff=BACKOFF, + logger=None): + super(RetryErrors, self).__init__(max_tries, delay, backoff, logger) + self.exception = exception + self.error_predicate = error_predicate + + def __call__(self, to_wrap): + @wraps(to_wrap) + def wrapped_function(*args, **kwargs): + tries = 0 + while tries < self.max_tries: + try: + return to_wrap(*args, **kwargs) + except self.exception as caught_exception: + + if not self.error_predicate(caught_exception): + raise + + delay = self.delay * self.backoff**tries + msg = ("%s, Trying again in %d seconds..." % + (caught_exception, delay)) + self.logger(msg) + + time.sleep(delay) + tries += 1 + return to_wrap(*args, **kwargs) + + return wrapped_function + + +class RetryResult(RetryBase): + """Decorator for retrying based on non-error result. + + :type result_predicate: function, takes result, returns bool + :param result_predicate: Predicate evaluating whether to retry after a + result is returned. + + :type max_tries: int + :param max_tries: Number of times to try (not retry) before giving up. + + :type delay: int + :param delay: Initial delay between retries in seconds. + + :type backoff: int + :param backoff: Backoff multiplier e.g. value of 2 will double the + delay each retry. + + :type logger: logging.Logger instance + :param logger: Logger to use. If None, print. + """ + def __init__(self, result_predicate, + max_tries=MAX_TRIES, delay=DELAY, backoff=BACKOFF, + logger=None): + super(RetryResult, self).__init__(max_tries, delay, backoff, logger) + self.result_predicate = result_predicate + + def __call__(self, to_wrap): + @wraps(to_wrap) + def wrapped_function(*args, **kwargs): + tries = 0 + while tries < self.max_tries: + result = to_wrap(*args, **kwargs) + if self.result_predicate(result): + return result + + delay = self.delay * self.backoff**tries + msg = "%s. Trying again in %d seconds..." % ( + self.result_predicate.__name__, delay,) + self.logger(msg) + + time.sleep(delay) + tries += 1 + raise BackoffFailed() + + return wrapped_function + + +class RetryInstanceState(RetryBase): + """Decorator for retrying based on instance state. + + :type instance_predicate: function, takes instance, returns bool + :param instance_predicate: Predicate evaluating whether to retry after an + API-invoking method is called. + + :type max_tries: int + :param max_tries: Number of times to try (not retry) before giving up. + + :type delay: int + :param delay: Initial delay between retries in seconds. + + :type backoff: int + :param backoff: Backoff multiplier e.g. value of 2 will double the + delay each retry. + + :type logger: logging.Logger instance + :param logger: Logger to use. If None, print. + """ + def __init__(self, instance_predicate, + max_tries=MAX_TRIES, delay=DELAY, backoff=BACKOFF, + logger=None): + super(RetryInstanceState, self).__init__( + max_tries, delay, backoff, logger) + self.instance_predicate = instance_predicate + + def __call__(self, to_wrap): + instance = to_wrap.__self__ # only instance methods allowed + + @wraps(to_wrap) + def wrapped_function(*args, **kwargs): + tries = 0 + while tries < self.max_tries: + result = to_wrap(*args, **kwargs) + if self.instance_predicate(instance): + return result + + delay = self.delay * self.backoff**tries + msg = "%s. Trying again in %d seconds..." % ( + self.instance_predicate.__name__, delay,) + self.logger(msg) + + time.sleep(delay) + tries += 1 + raise BackoffFailed() + + return wrapped_function diff --git a/test_utils/test_utils/system.py b/test_utils/test_utils/system.py new file mode 100644 index 00000000..590dc62a --- /dev/null +++ b/test_utils/test_utils/system.py @@ -0,0 +1,81 @@ +# Copyright 2014 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import print_function +import os +import sys +import time + +import google.auth.credentials +from google.auth.environment_vars import CREDENTIALS as TEST_CREDENTIALS + + +# From shell environ. May be None. +CREDENTIALS = os.getenv(TEST_CREDENTIALS) + +ENVIRON_ERROR_MSG = """\ +To run the system tests, you need to set some environment variables. +Please check the CONTRIBUTING guide for instructions. +""" + + +class EmulatorCreds(google.auth.credentials.Credentials): + """A mock credential object. + + Used to avoid unnecessary token refreshing or reliance on the network + while an emulator is running. + """ + + def __init__(self): # pylint: disable=super-init-not-called + self.token = b'seekrit' + self.expiry = None + + @property + def valid(self): + """Would-be validity check of the credentials. + + Always is :data:`True`. + """ + return True + + def refresh(self, unused_request): # pylint: disable=unused-argument + """Off-limits implementation for abstract method.""" + raise RuntimeError('Should never be refreshed.') + + +def check_environ(): + err_msg = None + if CREDENTIALS is None: + err_msg = '\nMissing variables: ' + TEST_CREDENTIALS + elif not os.path.isfile(CREDENTIALS): + err_msg = '\nThe %s path %r is not a file.' % (TEST_CREDENTIALS, + CREDENTIALS) + + if err_msg is not None: + msg = ENVIRON_ERROR_MSG + err_msg + print(msg, file=sys.stderr) + sys.exit(1) + + +def unique_resource_id(delimiter='_'): + """A unique identifier for a resource. + + Intended to help locate resources created in particular + testing environments and at particular times. + """ + build_id = os.getenv('CIRCLE_BUILD_NUM', '') + if build_id == '': + return '%s%d' % (delimiter, 1000 * time.time()) + else: + return '%s%s%s%d' % (delimiter, build_id, delimiter, time.time()) diff --git a/test_utils/test_utils/vpcsc_config.py b/test_utils/test_utils/vpcsc_config.py new file mode 100644 index 00000000..36b15d6b --- /dev/null +++ b/test_utils/test_utils/vpcsc_config.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# 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. + +import os + +import pytest + + +INSIDE_VPCSC_ENVVAR = "GOOGLE_CLOUD_TESTS_IN_VPCSC" +PROJECT_INSIDE_ENVVAR = "PROJECT_ID" +PROJECT_OUTSIDE_ENVVAR = "GOOGLE_CLOUD_TESTS_VPCSC_OUTSIDE_PERIMETER_PROJECT" +BUCKET_OUTSIDE_ENVVAR = "GOOGLE_CLOUD_TESTS_VPCSC_OUTSIDE_PERIMETER_BUCKET" + + +class VPCSCTestConfig(object): + """System test utility for VPCSC detection. + + See: https://cloud.google.com/vpc-service-controls/docs/ + """ + + @property + def inside_vpcsc(self): + """Test whether the test environment is configured to run inside VPCSC. + + Returns: + bool: + true if the environment is configured to run inside VPCSC, + else false. + """ + return INSIDE_VPCSC_ENVVAR in os.environ + + @property + def project_inside(self): + """Project ID for testing outside access. + + Returns: + str: project ID used for testing outside access; None if undefined. + """ + return os.environ.get(PROJECT_INSIDE_ENVVAR, None) + + @property + def project_outside(self): + """Project ID for testing inside access. + + Returns: + str: project ID used for testing inside access; None if undefined. + """ + return os.environ.get(PROJECT_OUTSIDE_ENVVAR, None) + + @property + def bucket_outside(self): + """GCS bucket for testing inside access. + + Returns: + str: bucket ID used for testing inside access; None if undefined. + """ + return os.environ.get(BUCKET_OUTSIDE_ENVVAR, None) + + def skip_if_inside_vpcsc(self, testcase): + """Test decorator: skip if running inside VPCSC.""" + reason = ( + "Running inside VPCSC. " + "Unset the {} environment variable to enable this test." + ).format(INSIDE_VPCSC_ENVVAR) + skip = pytest.mark.skipif(self.inside_vpcsc, reason=reason) + return skip(testcase) + + def skip_unless_inside_vpcsc(self, testcase): + """Test decorator: skip if running outside VPCSC.""" + reason = ( + "Running outside VPCSC. " + "Set the {} environment variable to enable this test." + ).format(INSIDE_VPCSC_ENVVAR) + skip = pytest.mark.skipif(not self.inside_vpcsc, reason=reason) + return skip(testcase) + + def skip_unless_inside_project(self, testcase): + """Test decorator: skip if inside project env var not set.""" + reason = ( + "Project ID for running inside VPCSC not set. " + "Set the {} environment variable to enable this test." + ).format(PROJECT_INSIDE_ENVVAR) + skip = pytest.mark.skipif(self.project_inside is None, reason=reason) + return skip(testcase) + + def skip_unless_outside_project(self, testcase): + """Test decorator: skip if outside project env var not set.""" + reason = ( + "Project ID for running outside VPCSC not set. " + "Set the {} environment variable to enable this test." + ).format(PROJECT_OUTSIDE_ENVVAR) + skip = pytest.mark.skipif(self.project_outside is None, reason=reason) + return skip(testcase) + + def skip_unless_outside_bucket(self, testcase): + """Test decorator: skip if outside bucket env var not set.""" + reason = ( + "Bucket ID for running outside VPCSC not set. " + "Set the {} environment variable to enable this test." + ).format(BUCKET_OUTSIDE_ENVVAR) + skip = pytest.mark.skipif(self.bucket_outside is None, reason=reason) + return skip(testcase) + + +vpcsc_config = VPCSCTestConfig() 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 870f259e..0cca03f9 100644 --- a/tests/unit/gapic/v1/test_image_annotator_client_v1.py +++ b/tests/unit/gapic/v1/test_image_annotator_client_v1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 3c89b92f..5a3ac654 100644 --- a/tests/unit/gapic/v1/test_product_search_client_v1.py +++ b/tests/unit/gapic/v1/test_product_search_client_v1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. diff --git a/tests/unit/gapic/v1p1beta1/test_image_annotator_client_v1p1beta1.py b/tests/unit/gapic/v1p1beta1/test_image_annotator_client_v1p1beta1.py index 6c9e250a..0b0b7fe0 100644 --- a/tests/unit/gapic/v1p1beta1/test_image_annotator_client_v1p1beta1.py +++ b/tests/unit/gapic/v1p1beta1/test_image_annotator_client_v1p1beta1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 1b769a29..8bc24368 100644 --- a/tests/unit/gapic/v1p2beta1/test_image_annotator_client_v1p2beta1.py +++ b/tests/unit/gapic/v1p2beta1/test_image_annotator_client_v1p2beta1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 eb2212b1..de5486ba 100644 --- a/tests/unit/gapic/v1p3beta1/test_image_annotator_client_v1p3beta1.py +++ b/tests/unit/gapic/v1p3beta1/test_image_annotator_client_v1p3beta1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 a97208f7..7790314c 100644 --- a/tests/unit/gapic/v1p3beta1/test_product_search_client_v1p3beta1.py +++ b/tests/unit/gapic/v1p3beta1/test_product_search_client_v1p3beta1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 11a1005b..a1ec513a 100644 --- a/tests/unit/gapic/v1p4beta1/test_image_annotator_client_v1p4beta1.py +++ b/tests/unit/gapic/v1p4beta1/test_image_annotator_client_v1p4beta1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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. 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 9f854f84..35aad821 100644 --- a/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py +++ b/tests/unit/gapic/v1p4beta1/test_product_search_client_v1p4beta1.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright 2019 Google LLC +# 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.