diff --git a/.coveragerc b/.coveragerc index b178b094..dd39c854 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# 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. + # Generated by synthtool. DO NOT EDIT! [run] branch = True diff --git a/.flake8 b/.flake8 index 0268ecc9..ed931638 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# 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. + # Generated by synthtool. DO NOT EDIT! [flake8] ignore = E203, E266, E501, W503 @@ -5,6 +21,8 @@ exclude = # Exclude generated code. **/proto/** **/gapic/** + **/services/** + **/types/** *_pb2.py # Standard linting exemptions. diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d2903c96..95f2ba3c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,8 +11,7 @@ Thanks for stopping by to let us know something could be better! 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-translate/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 + - Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python If you are still having issues, please be sure to include as much information as possible: diff --git a/.gitignore b/.gitignore index 3fb06e09..b87e1ed5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ dist build eggs +.eggs parts bin var @@ -49,6 +50,7 @@ bigquery/docs/generated # Virtual environment env/ coverage.xml +sponge_log.xml # System test environment variables. system_tests/local_test_setup diff --git a/.kokoro/publish-docs.sh b/.kokoro/publish-docs.sh index f0260463..1796acba 100755 --- a/.kokoro/publish-docs.sh +++ b/.kokoro/publish-docs.sh @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/bin/bash - set -eo pipefail # Disable buffering, so that the logs stream through. diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 5b89ca94..eb611c54 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -13,8 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/bin/bash - set -eo pipefail # Start the releasetool reporter diff --git a/.kokoro/samples/lint/common.cfg b/.kokoro/samples/lint/common.cfg new file mode 100644 index 00000000..782a7fb5 --- /dev/null +++ b/.kokoro/samples/lint/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "lint" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-translate/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file diff --git a/.kokoro/samples/lint/continuous.cfg b/.kokoro/samples/lint/continuous.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/lint/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/lint/periodic.cfg b/.kokoro/samples/lint/periodic.cfg new file mode 100644 index 00000000..50fec964 --- /dev/null +++ b/.kokoro/samples/lint/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} \ No newline at end of file diff --git a/.kokoro/samples/lint/presubmit.cfg b/.kokoro/samples/lint/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/lint/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.6/common.cfg b/.kokoro/samples/python3.6/common.cfg new file mode 100644 index 00000000..0d5ec9ab --- /dev/null +++ b/.kokoro/samples/python3.6/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.6" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-translate/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.6/continuous.cfg b/.kokoro/samples/python3.6/continuous.cfg new file mode 100644 index 00000000..7218af14 --- /dev/null +++ b/.kokoro/samples/python3.6/continuous.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} + diff --git a/.kokoro/samples/python3.6/periodic.cfg b/.kokoro/samples/python3.6/periodic.cfg new file mode 100644 index 00000000..50fec964 --- /dev/null +++ b/.kokoro/samples/python3.6/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.6/presubmit.cfg b/.kokoro/samples/python3.6/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.6/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.7/common.cfg b/.kokoro/samples/python3.7/common.cfg new file mode 100644 index 00000000..59a17837 --- /dev/null +++ b/.kokoro/samples/python3.7/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.7" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-translate/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.7/continuous.cfg b/.kokoro/samples/python3.7/continuous.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.7/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.7/periodic.cfg b/.kokoro/samples/python3.7/periodic.cfg new file mode 100644 index 00000000..50fec964 --- /dev/null +++ b/.kokoro/samples/python3.7/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.7/presubmit.cfg b/.kokoro/samples/python3.7/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.7/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.8/common.cfg b/.kokoro/samples/python3.8/common.cfg new file mode 100644 index 00000000..6cff86d8 --- /dev/null +++ b/.kokoro/samples/python3.8/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-translate/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-translate/.kokoro/trampoline.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.8/continuous.cfg b/.kokoro/samples/python3.8/continuous.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.8/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.8/periodic.cfg b/.kokoro/samples/python3.8/periodic.cfg new file mode 100644 index 00000000..50fec964 --- /dev/null +++ b/.kokoro/samples/python3.8/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.8/presubmit.cfg b/.kokoro/samples/python3.8/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.8/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/test-samples.sh b/.kokoro/test-samples.sh new file mode 100755 index 00000000..e121af3e --- /dev/null +++ b/.kokoro/test-samples.sh @@ -0,0 +1,104 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# `-e` enables the script to automatically fail when a command fails +# `-o pipefail` sets the exit code to the rightmost comment to exit with a non-zero +set -eo pipefail +# Enables `**` to include files nested inside sub-folders +shopt -s globstar + +cd github/python-translate + +# Run periodic samples tests at latest release +if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then + LATEST_RELEASE=$(git describe --abbrev=0 --tags) + git checkout $LATEST_RELEASE +fi + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Debug: show build environment +env | grep KOKORO + +# Install nox +python3.6 -m pip install --upgrade --quiet nox + +# Use secrets acessor service account to get secrets +if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then + gcloud auth activate-service-account \ + --key-file="${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" \ + --project="cloud-devrel-kokoro-resources" +fi + +# This script will create 3 files: +# - testing/test-env.sh +# - testing/service-account.json +# - testing/client-secrets.json +./scripts/decrypt-secrets.sh + +source ./testing/test-env.sh +export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json + +# For cloud-run session, we activate the service account for gcloud sdk. +gcloud auth activate-service-account \ + --key-file "${GOOGLE_APPLICATION_CREDENTIALS}" + +export GOOGLE_CLIENT_SECRETS=$(pwd)/testing/client-secrets.json + +echo -e "\n******************** TESTING PROJECTS ********************" + +# Switch to 'fail at end' to allow all tests to complete before exiting. +set +e +# Use RTN to return a non-zero value if the test fails. +RTN=0 +ROOT=$(pwd) +# Find all requirements.txt in the samples directory (may break on whitespace). +for file in samples/**/requirements.txt; do + cd "$ROOT" + # Navigate to the project folder. + file=$(dirname "$file") + cd "$file" + + echo "------------------------------------------------------------" + echo "- testing $file" + echo "------------------------------------------------------------" + + # Use nox to execute the tests for the project. + python3.6 -m nox -s "$RUN_TESTS_SESSION" + EXIT=$? + + # If this is a periodic build, send the test log to the Build Cop Bot. + # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop. + if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then + chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop + $KOKORO_GFILE_DIR/linux_amd64/buildcop + fi + + if [[ $EXIT -ne 0 ]]; then + RTN=1 + echo -e "\n Testing failed: Nox returned a non-zero exit code. \n" + else + echo -e "\n Testing completed.\n" + fi + +done +cd "$ROOT" + +# Workaround for Kokoro permissions issue: delete secrets +rm testing/{test-env.sh,client-secrets.json,service-account.json} + +exit "$RTN" \ No newline at end of file diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 1b68d97f..0d2e4022 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: 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. + 3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -214,26 +214,18 @@ We support: - `Python 3.5`_ - `Python 3.6`_ - `Python 3.7`_ +- `Python 3.8`_ .. _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/ +.. _Python 3.8: https://docs.python.org/3.8/ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-translate/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 @@ -247,7 +239,6 @@ We also explicitly decided to support Python 3 beginning with version .. _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 diff --git a/MANIFEST.in b/MANIFEST.in index cd011be2..e9e29d12 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,25 @@ +# -*- coding: utf-8 -*- +# +# 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. + # Generated by synthtool. DO NOT EDIT! include README.rst LICENSE recursive-include google *.json *.proto recursive-include tests * global-exclude *.py[co] global-exclude __pycache__ + +# Exclude scripts for samples readmegen +prune scripts/readme-gen \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 3ad7d36f..f6b4a465 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,27 +33,23 @@ extensions = [ "sphinx.ext.autodoc", "sphinx.ext.autosummary", - "sphinx.ext.doctest", "sphinx.ext.intersphinx", "sphinx.ext.coverage", "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", + "recommonmark", ] # autodoc/autosummary flags autoclass_content = "both" -autodoc_default_flags = ["members"] +autodoc_default_options = {"members": True} autosummary_generate = True # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] -# Allow markdown includes (so releases.md can include CHANGLEOG.md) -# http://www.sphinx-doc.org/en/master/markdown.html -source_parsers = {".md": "recommonmark.parser.CommonMarkParser"} - # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # source_suffix = ['.rst', '.md'] @@ -341,7 +337,7 @@ intersphinx_mapping = { "python": ("http://python.readthedocs.org/en/latest/", None), "google-auth": ("https://google-auth.readthedocs.io/en/stable", None), - "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None), + "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), "grpc": ("https://grpc.io/grpc/python/", None), } diff --git a/docs/index.rst b/docs/index.rst index b5d2405e..5289f58c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,7 @@ .. include:: README.rst +.. include:: multiprocessing.rst + API Reference ------------- diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst new file mode 100644 index 00000000..1cb29d4c --- /dev/null +++ b/docs/multiprocessing.rst @@ -0,0 +1,7 @@ +.. note:: + + Because this client uses :mod:`grpcio` library, it is safe to + share instances across threads. In multiprocessing scenarios, the best + practice is to create client instances *after* the invocation of + :func:`os.fork` by :class:`multiprocessing.Pool` or + :class:`multiprocessing.Process`. diff --git a/docs/usage.rst b/docs/usage.rst deleted file mode 100644 index c6ee312c..00000000 --- a/docs/usage.rst +++ /dev/null @@ -1,110 +0,0 @@ -Translation v2 Usage Guide --------------------------- - -To create a client: - -.. doctest:: - - >>> from google.cloud import translate_v2 - >>> client = translate_v2.Client() - -By default, the client targets English when doing detections -and translations, but a non-default value can be used as -well: - -.. doctest:: - - >>> from google.cloud import translate_v2 - >>> client = translate_v2.Client(target_language='es') - -The Google Cloud Translation v2 API has three supported methods, and they -map to three methods on a client: -:meth:`~google.cloud.translate_v2.client.Client.get_languages`, -:meth:`~google.cloud.translate_v2.client.Client.detect_language` and -:meth:`~google.cloud.translate_v2.client.Client.translate`. - -To get a list of languages supported by the Google Cloud Translation API - -.. doctest:: - - >>> from google.cloud import translate_v2 - >>> client = translate_v2.Client() - >>> client.get_languages() - [ - { - 'language': 'af', - 'name': 'Afrikaans', - }, - ... - ] - -To detect the language that some given text is written in: - -.. doctest:: - - >>> from google.cloud import translate_v2 - >>> client = translate_v2.Client() - >>> client.detect_language(['Me llamo', 'I am']) - [ - { - 'confidence': 0.25830904, - 'input': 'Me llamo', - 'language': 'es', - }, { - 'confidence': 0.17112699, - 'input': 'I am', - 'language': 'en', - }, - ] - -The `confidence`_ value is an optional floating point value between 0 and 1. -The closer this value is to 1, the higher the confidence level for the -language detection. This member is not always available. - -.. _confidence: https://cloud.google.com/translate/docs/detecting-language - -To translate text into the default destination language without knowing -the source language: - -.. doctest:: - - >>> from google.cloud import translate_v2 - >>> client = translate_v2.Client() - >>> client.translate('koszula') - { - 'translatedText': 'shirt', - 'detectedSourceLanguage': 'pl', - 'input': 'koszula', - } - -If the source language is known: - -.. doctest:: - - >>> from google.cloud import translate_v2 - >>> client = translate_v2.Client() - >>> client.translate('camisa', source_language='es') - { - 'translatedText': 'shirt', - 'input': 'camisa', - } - -or to use a non-default target language: - -.. doctest:: - - >>> from google.cloud import translate_v2 - >>> client = translate_v2.Client() - >>> client.translate(['Me llamo Jeff', 'My name is Jeff'], - ... target_language='de') - [ - { - 'translatedText': 'Mein Name ist Jeff', - 'detectedSourceLanguage': 'es', - 'input': 'Me llamo Jeff', - }, { - 'translatedText': 'Mein Name ist Jeff', - 'detectedSourceLanguage': 'en', - 'input': 'My name is Jeff', - }, - ] diff --git a/docs/v2.rst b/docs/v2.rst index 0e056c8f..d8e7f237 100644 --- a/docs/v2.rst +++ b/docs/v2.rst @@ -5,4 +5,3 @@ v2 :maxdepth: 2 client - usage diff --git a/google/cloud/translate.py b/google/cloud/translate.py index 541da1b5..7b5ea626 100644 --- a/google/cloud/translate.py +++ b/google/cloud/translate.py @@ -21,4 +21,7 @@ from google.cloud.translate_v3 import types -__all__ = ("types", "TranslationServiceClient") +__all__ = ( + "types", + "TranslationServiceClient", +) diff --git a/google/cloud/translate_v3/__init__.py b/google/cloud/translate_v3/__init__.py index dec3a565..e595cf35 100644 --- a/google/cloud/translate_v3/__init__.py +++ b/google/cloud/translate_v3/__init__.py @@ -25,8 +25,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) @@ -36,4 +36,7 @@ class TranslationServiceClient(translation_service_client.TranslationServiceClie __doc__ = translation_service_client.TranslationServiceClient.__doc__ -__all__ = ("types", "TranslationServiceClient") +__all__ = ( + "types", + "TranslationServiceClient", +) diff --git a/google/cloud/translate_v3/gapic/translation_service_client.py b/google/cloud/translate_v3/gapic/translation_service_client.py index 1540f9c7..3852f06c 100644 --- a/google/cloud/translate_v3/gapic/translation_service_client.py +++ b/google/cloud/translate_v3/gapic/translation_service_client.py @@ -44,7 +44,7 @@ _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-translate" + "google-cloud-translate", ).version @@ -184,12 +184,12 @@ def __init__( self.transport = transport else: self.transport = translation_service_grpc_transport.TranslationServiceGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -200,7 +200,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -247,8 +247,8 @@ def translate_text( Use BatchTranslateText for larger text. target_language_code (str): Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support. - parent (str): Required. Project or location to make a call. Must refer to a caller's - project. + parent (str): Required. Project or location to make a call. Must refer to a + caller's project. Format: ``projects/{project-number-or-id}`` or ``projects/{project-number-or-id}/locations/{location-id}``. @@ -261,7 +261,7 @@ def translate_text( custom glossaries. Models and glossaries must be within the same region (have same - location-id), otherwise an INVALID\_ARGUMENT (400) error is returned. + location-id), otherwise an INVALID_ARGUMENT (400) error is returned. mime_type (str): Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html". source_language_code (str): Optional. The BCP-47 language code of the input text if @@ -285,9 +285,9 @@ def translate_text( ``projects/{project-number-or-id}/locations/global/models/general/nmt``. If missing, the system decides which google base model to use. - glossary_config (Union[dict, ~google.cloud.translate_v3.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. The glossary must be within the same - region (have the same location-id) as the model, otherwise an - INVALID\_ARGUMENT (400) error is returned. + glossary_config (Union[dict, ~google.cloud.translate_v3.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. The glossary must be within the + same region (have the same location-id) as the model, otherwise an + INVALID_ARGUMENT (400) error is returned. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.translate_v3.types.TranslateTextGlossaryConfig` @@ -380,8 +380,8 @@ def detect_language( >>> response = client.detect_language(parent) Args: - parent (str): Required. Project or location to make a call. Must refer to a caller's - project. + parent (str): Required. Project or location to make a call. Must refer to a + caller's project. Format: ``projects/{project-number-or-id}/locations/{location-id}`` or ``projects/{project-number-or-id}``. @@ -391,7 +391,7 @@ def detect_language( ``projects/{project-number-or-id}``. Only models within the same region (has same location-id) can be used. - Otherwise an INVALID\_ARGUMENT (400) error is returned. + Otherwise an INVALID_ARGUMENT (400) error is returned. model (str): Optional. The language detection model to be used. Format: @@ -444,7 +444,7 @@ def detect_language( # Sanity check: We have some fields which are mutually exclusive; # raise ValueError if more than one is sent. - google.api_core.protobuf_helpers.check_oneof(content=content) + google.api_core.protobuf_helpers.check_oneof(content=content,) request = translation_service_pb2.DetectLanguageRequest( parent=parent, @@ -492,8 +492,8 @@ def get_supported_languages( >>> response = client.get_supported_languages(parent) Args: - parent (str): Required. Project or location to make a call. Must refer to a caller's - project. + parent (str): Required. Project or location to make a call. Must refer to a + caller's project. Format: ``projects/{project-number-or-id}`` or ``projects/{project-number-or-id}/locations/{location-id}``. @@ -505,7 +505,7 @@ def get_supported_languages( Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be used, - otherwise an INVALID\_ARGUMENT (400) error is returned. + otherwise an INVALID_ARGUMENT (400) error is returned. display_language_code (str): Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response. @@ -553,7 +553,7 @@ def get_supported_languages( ) request = translation_service_pb2.GetSupportedLanguagesRequest( - parent=parent, display_language_code=display_language_code, model=model + parent=parent, display_language_code=display_language_code, model=model, ) if metadata is None: metadata = [] @@ -633,7 +633,7 @@ def batch_translate_text( The ``global`` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region - (have the same location-id) can be used, otherwise an INVALID\_ARGUMENT + (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. source_language_code (str): Required. Source language code. target_language_codes (list[str]): Required. Specify up to 10 language codes here. @@ -751,7 +751,7 @@ def create_glossary( ): """ Creates a glossary and returns the long-running operation. Returns - NOT\_FOUND, if the project doesn't exist. + NOT_FOUND, if the project doesn't exist. Example: >>> from google.cloud import translate_v3 @@ -811,7 +811,7 @@ def create_glossary( ) request = translation_service_pb2.CreateGlossaryRequest( - parent=parent, glossary=glossary + parent=parent, glossary=glossary, ) if metadata is None: metadata = [] @@ -846,7 +846,7 @@ def list_glossaries( metadata=None, ): """ - Lists glossaries in a project. Returns NOT\_FOUND, if the project + Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist. Example: @@ -914,7 +914,7 @@ def list_glossaries( ) request = translation_service_pb2.ListGlossariesRequest( - parent=parent, page_size=page_size, filter=filter_ + parent=parent, page_size=page_size, filter=filter_, ) if metadata is None: metadata = [] @@ -952,7 +952,7 @@ def get_glossary( metadata=None, ): """ - Gets a glossary. Returns NOT\_FOUND, if the glossary doesn't exist. + Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist. Example: >>> from google.cloud import translate_v3 @@ -995,7 +995,7 @@ def get_glossary( client_info=self._client_info, ) - request = translation_service_pb2.GetGlossaryRequest(name=name) + request = translation_service_pb2.GetGlossaryRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1022,7 +1022,7 @@ def delete_glossary( ): """ Deletes a glossary, or cancels glossary construction if the glossary - isn't created yet. Returns NOT\_FOUND, if the glossary doesn't exist. + isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist. Example: >>> from google.cloud import translate_v3 @@ -1074,7 +1074,7 @@ def delete_glossary( client_info=self._client_info, ) - request = translation_service_pb2.DeleteGlossaryRequest(name=name) + request = translation_service_pb2.DeleteGlossaryRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) diff --git a/google/cloud/translate_v3/gapic/translation_service_client_config.py b/google/cloud/translate_v3/gapic/translation_service_client_config.py index 0e611ae4..2aa726c4 100644 --- a/google/cloud/translate_v3/gapic/translation_service_client_config.py +++ b/google/cloud/translate_v3/gapic/translation_service_client_config.py @@ -2,60 +2,79 @@ "interfaces": { "google.cloud.translation.v3.TranslationService": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "no_retry_codes": [], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000, + }, }, "methods": { "TranslateText": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "DetectLanguage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "GetSupportedLanguages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchTranslateText": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "CreateGlossary": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "ListGlossaries": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetGlossary": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteGlossary": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/google/cloud/translate_v3/gapic/transports/translation_service_grpc_transport.py b/google/cloud/translate_v3/gapic/transports/translation_service_grpc_transport.py index 45c59003..9aad4a9a 100644 --- a/google/cloud/translate_v3/gapic/transports/translation_service_grpc_transport.py +++ b/google/cloud/translate_v3/gapic/transports/translation_service_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -78,7 +78,7 @@ def __init__( self._stubs = { "translation_service_stub": translation_service_pb2_grpc.TranslationServiceStub( channel - ) + ), } # Because this API includes a method that returns a @@ -183,7 +183,7 @@ def create_glossary(self): """Return the gRPC stub for :meth:`TranslationServiceClient.create_glossary`. Creates a glossary and returns the long-running operation. Returns - NOT\_FOUND, if the project doesn't exist. + NOT_FOUND, if the project doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -196,7 +196,7 @@ def create_glossary(self): def list_glossaries(self): """Return the gRPC stub for :meth:`TranslationServiceClient.list_glossaries`. - Lists glossaries in a project. Returns NOT\_FOUND, if the project + Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist. Returns: @@ -210,7 +210,7 @@ def list_glossaries(self): def get_glossary(self): """Return the gRPC stub for :meth:`TranslationServiceClient.get_glossary`. - Gets a glossary. Returns NOT\_FOUND, if the glossary doesn't exist. + Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -224,7 +224,7 @@ def delete_glossary(self): """Return the gRPC stub for :meth:`TranslationServiceClient.delete_glossary`. Deletes a glossary, or cancels glossary construction if the glossary - isn't created yet. Returns NOT\_FOUND, if the glossary doesn't exist. + isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist. Returns: Callable: A callable which accepts the appropriate diff --git a/google/cloud/translate_v3/proto/translation_service_pb2.py b/google/cloud/translate_v3/proto/translation_service_pb2.py index deeb81ea..04f698fa 100644 --- a/google/cloud/translate_v3/proto/translation_service_pb2.py +++ b/google/cloud/translate_v3/proto/translation_service_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translation_v3/proto/translation_service.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +# source: google/cloud/translate_v3/proto/translation_service.proto +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -26,15 +23,12 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/translation_v3/proto/translation_service.proto", + name="google/cloud/translate_v3/proto/translation_service.proto", package="google.cloud.translation.v3", syntax="proto3", - serialized_options=_b( - "\n\035com.google.cloud.translate.v3B\027TranslationServiceProtoP\001ZBgoogle.golang.org/genproto/googleapis/cloud/translate/v3;translate\370\001\001\252\002\031Google.Cloud.Translate.V3\312\002\031Google\\Cloud\\Translate\\V3\352\002\034Google::Cloud::Translate::V3" - ), - serialized_pb=_b( - '\n;google/cloud/translation_v3/proto/translation_service.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"N\n\x1bTranslateTextGlossaryConfig\x12\x15\n\x08glossary\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01"\xb5\x03\n\x14TranslateTextRequest\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12R\n\x06labels\x18\n \x03(\x0b\x32=.google.cloud.translation.v3.TranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xa0\x01\n\x15TranslateTextResponse\x12>\n\x0ctranslations\x18\x01 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\x12G\n\x15glossary_translations\x18\x03 \x03(\x0b\x32(.google.cloud.translation.v3.Translation"\xa8\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x04 \x01(\t\x12Q\n\x0fglossary_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig"\x9f\x02\n\x15\x44\x65tectLanguageRequest\x12\x39\n\x06parent\x18\x05 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.translation.v3.DetectLanguageRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source"=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02"Z\n\x16\x44\x65tectLanguageResponse\x12@\n\tlanguages\x18\x01 \x03(\x0b\x32-.google.cloud.translation.v3.DetectedLanguage"\x91\x01\n\x1cGetSupportedLanguagesRequest\x12\x39\n\x06parent\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12"\n\x15\x64isplay_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x02 \x01(\tB\x03\xe0\x41\x01"W\n\x12SupportedLanguages\x12\x41\n\tlanguages\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.SupportedLanguage"p\n\x11SupportedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x16\n\x0esupport_source\x18\x03 \x01(\x08\x12\x16\n\x0esupport_target\x18\x04 \x01(\x08"\x1e\n\tGcsSource\x12\x11\n\tinput_uri\x18\x01 \x01(\t"m\n\x0bInputConfig\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"\x88\x06\n\x19\x42\x61tchTranslateTextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12W\n\x06models\x18\x04 \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.translation.v3.InputConfigB\x03\xe0\x41\x02\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32).google.cloud.translation.v3.OutputConfigB\x03\xe0\x41\x02\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateTextRequest.GlossariesEntryB\x03\xe0\x41\x01\x12W\n\x06labels\x18\t \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xce\x02\n\x16\x42\x61tchTranslateMetadata\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.google.cloud.translation.v3.BatchTranslateMetadata.State\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12\x18\n\x10total_characters\x18\x04 \x01(\x03\x12/\n\x0bsubmit_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\xcb\x01\n\x16\x42\x61tchTranslateResponse\x12\x18\n\x10total_characters\x18\x01 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12/\n\x0bsubmit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"]\n\x13GlossaryInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source"\xfa\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12O\n\rlanguage_pair\x18\x03 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodePairH\x00\x12T\n\x12language_codes_set\x18\x04 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodesSetH\x00\x12\x46\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.translation.v3.GlossaryInputConfig\x12\x18\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aN\n\x10LanguageCodePair\x12\x1c\n\x14source_language_code\x18\x01 \x01(\t\x12\x1c\n\x14target_language_code\x18\x02 \x01(\t\x1a*\n\x10LanguageCodesSet\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t:e\xea\x41\x62\n!translate.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}B\x0b\n\tlanguages"\x90\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02"M\n\x12GetGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary"P\n\x15\x44\x65leteGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary"\x98\x01\n\x15ListGlossariesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01"l\n\x16ListGlossariesResponse\x12\x39\n\nglossaries\x18\x01 \x03(\x0b\x32%.google.cloud.translation.v3.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x88\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x88\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x85\x01\n\x16\x44\x65leteGlossaryResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\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.Timestamp2\x8e\x10\n\x12TranslationService\x12\xd4\x02\n\rTranslateText\x12\x31.google.cloud.translation.v3.TranslateTextRequest\x1a\x32.google.cloud.translation.v3.TranslateTextResponse"\xdb\x01\x82\xd3\xe4\x93\x02\x62"1/v3/{parent=projects/*/locations/*}:translateText:\x01*Z*"%/v3/{parent=projects/*}:translateText:\x01*\xda\x41$parent,target_language_code,contents\xda\x41Iparent,model,mime_type,source_language_code,target_language_code,contents\x12\x87\x02\n\x0e\x44\x65tectLanguage\x12\x32.google.cloud.translation.v3.DetectLanguageRequest\x1a\x33.google.cloud.translation.v3.DetectLanguageResponse"\x8b\x01\x82\xd3\xe4\x93\x02\x64"2/v3/{parent=projects/*/locations/*}:detectLanguage:\x01*Z+"&/v3/{parent=projects/*}:detectLanguage:\x01*\xda\x41\x1eparent,model,mime_type,content\x12\x97\x02\n\x15GetSupportedLanguages\x12\x39.google.cloud.translation.v3.GetSupportedLanguagesRequest\x1a/.google.cloud.translation.v3.SupportedLanguages"\x91\x01\x82\xd3\xe4\x93\x02\x66\x12\x36/v3/{parent=projects/*/locations/*}/supportedLanguagesZ,\x12*/v3/{parent=projects/*}/supportedLanguages\xda\x41"parent,model,display_language_code\x12\xe1\x01\n\x12\x42\x61tchTranslateText\x12\x36.google.cloud.translation.v3.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"t\x82\xd3\xe4\x93\x02;"6/v3/{parent=projects/*/locations/*}:batchTranslateText:\x01*\xca\x41\x30\n\x16\x42\x61tchTranslateResponse\x12\x16\x42\x61tchTranslateMetadata\x12\xdc\x01\n\x0e\x43reateGlossary\x12\x32.google.cloud.translation.v3.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"w\x82\xd3\xe4\x93\x02:"./v3/{parent=projects/*/locations/*}/glossaries:\x08glossary\xda\x41\x0fparent,glossary\xca\x41"\n\x08Glossary\x12\x16\x43reateGlossaryMetadata\x12\xba\x01\n\x0eListGlossaries\x12\x32.google.cloud.translation.v3.ListGlossariesRequest\x1a\x33.google.cloud.translation.v3.ListGlossariesResponse"?\x82\xd3\xe4\x93\x02\x30\x12./v3/{parent=projects/*/locations/*}/glossaries\xda\x41\x06parent\x12\xa4\x01\n\x0bGetGlossary\x12/.google.cloud.translation.v3.GetGlossaryRequest\x1a%.google.cloud.translation.v3.Glossary"=\x82\xd3\xe4\x93\x02\x30\x12./v3/{name=projects/*/locations/*/glossaries/*}\xda\x41\x04name\x12\xd5\x01\n\x0e\x44\x65leteGlossary\x12\x32.google.cloud.translation.v3.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02\x30*./v3/{name=projects/*/locations/*/glossaries/*}\xda\x41\x04name\xca\x41\x30\n\x16\x44\x65leteGlossaryResponse\x12\x16\x44\x65leteGlossaryMetadata\x1a~\xca\x41\x18translate.googleapis.com\xd2\x41`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translationB\xd8\x01\n\x1d\x63om.google.cloud.translate.v3B\x17TranslationServiceProtoP\x01ZBgoogle.golang.org/genproto/googleapis/cloud/translate/v3;translate\xf8\x01\x01\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3' - ), + serialized_options=b"\n\035com.google.cloud.translate.v3B\027TranslationServiceProtoP\001ZBgoogle.golang.org/genproto/googleapis/cloud/translate/v3;translate\370\001\001\252\002\031Google.Cloud.Translate.V3\312\002\031Google\\Cloud\\Translate\\V3\352\002\034Google::Cloud::Translate::V3", + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n9google/cloud/translate_v3/proto/translation_service.proto\x12\x1bgoogle.cloud.translation.v3\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"N\n\x1bTranslateTextGlossaryConfig\x12\x15\n\x08glossary\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01"\xb5\x03\n\x14TranslateTextRequest\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12R\n\x06labels\x18\n \x03(\x0b\x32=.google.cloud.translation.v3.TranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xa0\x01\n\x15TranslateTextResponse\x12>\n\x0ctranslations\x18\x01 \x03(\x0b\x32(.google.cloud.translation.v3.Translation\x12G\n\x15glossary_translations\x18\x03 \x03(\x0b\x32(.google.cloud.translation.v3.Translation"\xa8\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x04 \x01(\t\x12Q\n\x0fglossary_config\x18\x03 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig"\x9f\x02\n\x15\x44\x65tectLanguageRequest\x12\x39\n\x06parent\x18\x05 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32>.google.cloud.translation.v3.DetectLanguageRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source"=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02"Z\n\x16\x44\x65tectLanguageResponse\x12@\n\tlanguages\x18\x01 \x03(\x0b\x32-.google.cloud.translation.v3.DetectedLanguage"\x91\x01\n\x1cGetSupportedLanguagesRequest\x12\x39\n\x06parent\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12"\n\x15\x64isplay_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x02 \x01(\tB\x03\xe0\x41\x01"W\n\x12SupportedLanguages\x12\x41\n\tlanguages\x18\x01 \x03(\x0b\x32..google.cloud.translation.v3.SupportedLanguage"p\n\x11SupportedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x16\n\x0esupport_source\x18\x03 \x01(\x08\x12\x16\n\x0esupport_target\x18\x04 \x01(\x08"\x1e\n\tGcsSource\x12\x11\n\tinput_uri\x18\x01 \x01(\t"m\n\x0bInputConfig\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"e\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"\x88\x06\n\x19\x42\x61tchTranslateTextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12W\n\x06models\x18\x04 \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.ModelsEntryB\x03\xe0\x41\x01\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.translation.v3.InputConfigB\x03\xe0\x41\x02\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32).google.cloud.translation.v3.OutputConfigB\x03\xe0\x41\x02\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32\x46.google.cloud.translation.v3.BatchTranslateTextRequest.GlossariesEntryB\x03\xe0\x41\x01\x12W\n\x06labels\x18\t \x03(\x0b\x32\x42.google.cloud.translation.v3.BatchTranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ak\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x05value\x18\x02 \x01(\x0b\x32\x38.google.cloud.translation.v3.TranslateTextGlossaryConfig:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xce\x02\n\x16\x42\x61tchTranslateMetadata\x12H\n\x05state\x18\x01 \x01(\x0e\x32\x39.google.cloud.translation.v3.BatchTranslateMetadata.State\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12\x18\n\x10total_characters\x18\x04 \x01(\x03\x12/\n\x0bsubmit_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\xcb\x01\n\x16\x42\x61tchTranslateResponse\x12\x18\n\x10total_characters\x18\x01 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12/\n\x0bsubmit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"]\n\x13GlossaryInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.translation.v3.GcsSourceH\x00\x42\x08\n\x06source"\xfa\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12O\n\rlanguage_pair\x18\x03 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodePairH\x00\x12T\n\x12language_codes_set\x18\x04 \x01(\x0b\x32\x36.google.cloud.translation.v3.Glossary.LanguageCodesSetH\x00\x12\x46\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x30.google.cloud.translation.v3.GlossaryInputConfig\x12\x18\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aN\n\x10LanguageCodePair\x12\x1c\n\x14source_language_code\x18\x01 \x01(\t\x12\x1c\n\x14target_language_code\x18\x02 \x01(\t\x1a*\n\x10LanguageCodesSet\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t:e\xea\x41\x62\n!translate.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}B\x0b\n\tlanguages"\x90\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32%.google.cloud.translation.v3.GlossaryB\x03\xe0\x41\x02"M\n\x12GetGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary"P\n\x15\x44\x65leteGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary"\x98\x01\n\x15ListGlossariesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01"l\n\x16ListGlossariesResponse\x12\x39\n\nglossaries\x18\x01 \x03(\x0b\x32%.google.cloud.translation.v3.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x88\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x88\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12H\n\x05state\x18\x02 \x01(\x0e\x32\x39.google.cloud.translation.v3.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x85\x01\n\x16\x44\x65leteGlossaryResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\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.Timestamp2\x8e\x10\n\x12TranslationService\x12\xd4\x02\n\rTranslateText\x12\x31.google.cloud.translation.v3.TranslateTextRequest\x1a\x32.google.cloud.translation.v3.TranslateTextResponse"\xdb\x01\x82\xd3\xe4\x93\x02\x62"1/v3/{parent=projects/*/locations/*}:translateText:\x01*Z*"%/v3/{parent=projects/*}:translateText:\x01*\xda\x41$parent,target_language_code,contents\xda\x41Iparent,model,mime_type,source_language_code,target_language_code,contents\x12\x87\x02\n\x0e\x44\x65tectLanguage\x12\x32.google.cloud.translation.v3.DetectLanguageRequest\x1a\x33.google.cloud.translation.v3.DetectLanguageResponse"\x8b\x01\x82\xd3\xe4\x93\x02\x64"2/v3/{parent=projects/*/locations/*}:detectLanguage:\x01*Z+"&/v3/{parent=projects/*}:detectLanguage:\x01*\xda\x41\x1eparent,model,mime_type,content\x12\x97\x02\n\x15GetSupportedLanguages\x12\x39.google.cloud.translation.v3.GetSupportedLanguagesRequest\x1a/.google.cloud.translation.v3.SupportedLanguages"\x91\x01\x82\xd3\xe4\x93\x02\x66\x12\x36/v3/{parent=projects/*/locations/*}/supportedLanguagesZ,\x12*/v3/{parent=projects/*}/supportedLanguages\xda\x41"parent,model,display_language_code\x12\xe1\x01\n\x12\x42\x61tchTranslateText\x12\x36.google.cloud.translation.v3.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"t\x82\xd3\xe4\x93\x02;"6/v3/{parent=projects/*/locations/*}:batchTranslateText:\x01*\xca\x41\x30\n\x16\x42\x61tchTranslateResponse\x12\x16\x42\x61tchTranslateMetadata\x12\xdc\x01\n\x0e\x43reateGlossary\x12\x32.google.cloud.translation.v3.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"w\x82\xd3\xe4\x93\x02:"./v3/{parent=projects/*/locations/*}/glossaries:\x08glossary\xda\x41\x0fparent,glossary\xca\x41"\n\x08Glossary\x12\x16\x43reateGlossaryMetadata\x12\xba\x01\n\x0eListGlossaries\x12\x32.google.cloud.translation.v3.ListGlossariesRequest\x1a\x33.google.cloud.translation.v3.ListGlossariesResponse"?\x82\xd3\xe4\x93\x02\x30\x12./v3/{parent=projects/*/locations/*}/glossaries\xda\x41\x06parent\x12\xa4\x01\n\x0bGetGlossary\x12/.google.cloud.translation.v3.GetGlossaryRequest\x1a%.google.cloud.translation.v3.Glossary"=\x82\xd3\xe4\x93\x02\x30\x12./v3/{name=projects/*/locations/*/glossaries/*}\xda\x41\x04name\x12\xd5\x01\n\x0e\x44\x65leteGlossary\x12\x32.google.cloud.translation.v3.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation"p\x82\xd3\xe4\x93\x02\x30*./v3/{name=projects/*/locations/*/glossaries/*}\xda\x41\x04name\xca\x41\x30\n\x16\x44\x65leteGlossaryResponse\x12\x16\x44\x65leteGlossaryMetadata\x1a~\xca\x41\x18translate.googleapis.com\xd2\x41`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translationB\xd8\x01\n\x1d\x63om.google.cloud.translate.v3B\x17TranslationServiceProtoP\x01ZBgoogle.golang.org/genproto/googleapis/cloud/translate/v3;translate\xf8\x01\x01\xaa\x02\x19Google.Cloud.Translate.V3\xca\x02\x19Google\\Cloud\\Translate\\V3\xea\x02\x1cGoogle::Cloud::Translate::V3b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -51,6 +45,7 @@ full_name="google.cloud.translation.v3.BatchTranslateMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -58,27 +53,53 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=1, number=1, serialized_options=None, type=None + name="RUNNING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILED", index=3, number=3, serialized_options=None, type=None + name="FAILED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLING", index=4, number=4, serialized_options=None, type=None + name="CANCELLING", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=5, number=5, serialized_options=None, type=None + name="CANCELLED", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=3231, - serialized_end=3332, + serialized_start=3229, + serialized_end=3330, ) _sym_db.RegisterEnumDescriptor(_BATCHTRANSLATEMETADATA_STATE) @@ -87,6 +108,7 @@ full_name="google.cloud.translation.v3.CreateGlossaryMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -94,27 +116,53 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=1, number=1, serialized_options=None, type=None + name="RUNNING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILED", index=3, number=3, serialized_options=None, type=None + name="FAILED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLING", index=4, number=4, serialized_options=None, type=None + name="CANCELLING", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=5, number=5, serialized_options=None, type=None + name="CANCELLED", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=3231, - serialized_end=3332, + serialized_start=3229, + serialized_end=3330, ) _sym_db.RegisterEnumDescriptor(_CREATEGLOSSARYMETADATA_STATE) @@ -123,6 +171,7 @@ full_name="google.cloud.translation.v3.DeleteGlossaryMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -130,27 +179,53 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=1, number=1, serialized_options=None, type=None + name="RUNNING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILED", index=3, number=3, serialized_options=None, type=None + name="FAILED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLING", index=4, number=4, serialized_options=None, type=None + name="CANCELLING", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=5, number=5, serialized_options=None, type=None + name="CANCELLED", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=3231, - serialized_end=3332, + serialized_start=3229, + serialized_end=3330, ) _sym_db.RegisterEnumDescriptor(_DELETEGLOSSARYMETADATA_STATE) @@ -161,6 +236,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="glossary", @@ -171,14 +247,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ignore_case", @@ -195,8 +272,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -207,8 +285,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=277, - serialized_end=355, + serialized_start=275, + serialized_end=353, ) @@ -218,6 +296,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -228,7 +307,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -236,6 +315,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -246,7 +326,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -254,18 +334,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=750, - serialized_end=795, + serialized_start=748, + serialized_end=793, ) _TRANSLATETEXTREQUEST = _descriptor.Descriptor( @@ -274,6 +355,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="contents", @@ -290,8 +372,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mime_type", @@ -302,14 +385,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source_language_code", @@ -320,14 +404,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="target_language_code", @@ -338,14 +423,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parent", @@ -356,16 +442,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -376,14 +461,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossary_config", @@ -400,8 +486,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -418,20 +505,21 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_TRANSLATETEXTREQUEST_LABELSENTRY], + nested_types=[_TRANSLATETEXTREQUEST_LABELSENTRY,], enum_types=[], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=358, - serialized_end=795, + serialized_start=356, + serialized_end=793, ) @@ -441,6 +529,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="translations", @@ -459,6 +548,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossary_translations", @@ -477,6 +567,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -487,8 +578,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=798, - serialized_end=958, + serialized_start=796, + serialized_end=956, ) @@ -498,6 +589,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="translated_text", @@ -508,7 +600,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -516,6 +608,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -526,7 +619,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -534,6 +627,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detected_language_code", @@ -544,7 +638,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -552,6 +646,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossary_config", @@ -570,6 +665,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -580,8 +676,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=961, - serialized_end=1129, + serialized_start=959, + serialized_end=1127, ) @@ -591,6 +687,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -601,7 +698,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -609,6 +706,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -619,7 +717,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -627,18 +725,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=750, - serialized_end=795, + serialized_start=748, + serialized_end=793, ) _DETECTLANGUAGEREQUEST = _descriptor.Descriptor( @@ -647,6 +746,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -657,16 +757,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -677,14 +776,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="content", @@ -695,7 +795,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -703,6 +803,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mime_type", @@ -713,14 +814,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -737,12 +839,13 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_DETECTLANGUAGEREQUEST_LABELSENTRY], + nested_types=[_DETECTLANGUAGEREQUEST_LABELSENTRY,], enum_types=[], serialized_options=None, is_extendable=False, @@ -754,11 +857,12 @@ full_name="google.cloud.translation.v3.DetectLanguageRequest.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=1132, - serialized_end=1419, + serialized_start=1130, + serialized_end=1417, ) @@ -768,6 +872,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_code", @@ -778,7 +883,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -786,6 +891,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -804,6 +910,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -814,8 +921,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1421, - serialized_end=1482, + serialized_start=1419, + serialized_end=1480, ) @@ -825,6 +932,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="languages", @@ -843,7 +951,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -853,8 +962,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1484, - serialized_end=1574, + serialized_start=1482, + serialized_end=1572, ) @@ -864,6 +973,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -874,16 +984,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_language_code", @@ -894,14 +1003,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -912,14 +1022,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -930,8 +1041,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1577, - serialized_end=1722, + serialized_start=1575, + serialized_end=1720, ) @@ -941,6 +1052,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="languages", @@ -959,7 +1071,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -969,8 +1082,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1724, - serialized_end=1811, + serialized_start=1722, + serialized_end=1809, ) @@ -980,6 +1093,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_code", @@ -990,7 +1104,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -998,6 +1112,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -1008,7 +1123,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1016,6 +1131,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="support_source", @@ -1034,6 +1150,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="support_target", @@ -1052,6 +1169,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1062,8 +1180,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1813, - serialized_end=1925, + serialized_start=1811, + serialized_end=1923, ) @@ -1073,6 +1191,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_uri", @@ -1083,7 +1202,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1091,7 +1210,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1101,8 +1221,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1927, - serialized_end=1957, + serialized_start=1925, + serialized_end=1955, ) @@ -1112,6 +1232,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mime_type", @@ -1122,14 +1243,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="gcs_source", @@ -1148,6 +1270,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1163,11 +1286,12 @@ full_name="google.cloud.translation.v3.InputConfig.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=1959, - serialized_end=2068, + serialized_start=1957, + serialized_end=2066, ) @@ -1177,6 +1301,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="output_uri_prefix", @@ -1187,7 +1312,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1195,7 +1320,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1205,8 +1331,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2070, - serialized_end=2113, + serialized_start=2068, + serialized_end=2111, ) @@ -1216,6 +1342,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", @@ -1234,7 +1361,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1249,11 +1377,12 @@ full_name="google.cloud.translation.v3.OutputConfig.destination", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=2115, - serialized_end=2216, + serialized_start=2113, + serialized_end=2214, ) @@ -1263,6 +1392,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1273,7 +1403,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1281,6 +1411,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1291,7 +1422,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1299,18 +1430,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2794, - serialized_end=2839, + serialized_start=2792, + serialized_end=2837, ) _BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY = _descriptor.Descriptor( @@ -1319,6 +1451,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1329,7 +1462,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1337,6 +1470,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1355,18 +1489,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2841, - serialized_end=2948, + serialized_start=2839, + serialized_end=2946, ) _BATCHTRANSLATETEXTREQUEST_LABELSENTRY = _descriptor.Descriptor( @@ -1375,6 +1510,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1385,7 +1521,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1393,6 +1529,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1403,7 +1540,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1411,18 +1548,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=750, - serialized_end=795, + serialized_start=748, + serialized_end=793, ) _BATCHTRANSLATETEXTREQUEST = _descriptor.Descriptor( @@ -1431,6 +1569,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1441,16 +1580,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source_language_code", @@ -1461,14 +1599,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="target_language_codes", @@ -1485,8 +1624,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="models", @@ -1503,8 +1643,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_configs", @@ -1521,8 +1662,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_config", @@ -1539,8 +1681,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossaries", @@ -1557,8 +1700,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -1575,8 +1719,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1591,8 +1736,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2219, - serialized_end=2995, + serialized_start=2217, + serialized_end=2993, ) @@ -1602,6 +1747,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="state", @@ -1620,6 +1766,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="translated_characters", @@ -1638,6 +1785,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="failed_characters", @@ -1656,6 +1804,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="total_characters", @@ -1674,6 +1823,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -1692,18 +1842,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_BATCHTRANSLATEMETADATA_STATE], + enum_types=[_BATCHTRANSLATEMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2998, - serialized_end=3332, + serialized_start=2996, + serialized_end=3330, ) @@ -1713,6 +1864,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="total_characters", @@ -1731,6 +1883,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="translated_characters", @@ -1749,6 +1902,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="failed_characters", @@ -1767,6 +1921,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -1785,6 +1940,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -1803,6 +1959,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1813,8 +1970,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3335, - serialized_end=3538, + serialized_start=3333, + serialized_end=3536, ) @@ -1824,6 +1981,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -1842,7 +2000,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1857,11 +2016,12 @@ full_name="google.cloud.translation.v3.GlossaryInputConfig.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=3540, - serialized_end=3633, + serialized_start=3538, + serialized_end=3631, ) @@ -1871,6 +2031,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="source_language_code", @@ -1881,7 +2042,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1889,6 +2050,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="target_language_code", @@ -1899,7 +2061,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1907,6 +2069,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1917,8 +2080,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4032, - serialized_end=4110, + serialized_start=4030, + serialized_end=4108, ) _GLOSSARY_LANGUAGECODESSET = _descriptor.Descriptor( @@ -1927,6 +2090,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_codes", @@ -1945,7 +2109,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1955,8 +2120,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4112, - serialized_end=4154, + serialized_start=4110, + serialized_end=4152, ) _GLOSSARY = _descriptor.Descriptor( @@ -1965,6 +2130,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1975,7 +2141,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1983,6 +2149,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_pair", @@ -2001,6 +2168,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_codes_set", @@ -2019,6 +2187,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_config", @@ -2037,6 +2206,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entry_count", @@ -2053,8 +2223,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -2071,8 +2242,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -2089,16 +2261,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_GLOSSARY_LANGUAGECODEPAIR, _GLOSSARY_LANGUAGECODESSET], + nested_types=[_GLOSSARY_LANGUAGECODEPAIR, _GLOSSARY_LANGUAGECODESSET,], enum_types=[], - serialized_options=_b( - "\352Ab\n!translate.googleapis.com/Glossary\022=projects/{project}/locations/{location}/glossaries/{glossary}" - ), + serialized_options=b"\352Ab\n!translate.googleapis.com/Glossary\022=projects/{project}/locations/{location}/glossaries/{glossary}", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -2108,11 +2279,12 @@ full_name="google.cloud.translation.v3.Glossary.languages", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=3636, - serialized_end=4270, + serialized_start=3634, + serialized_end=4268, ) @@ -2122,6 +2294,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -2132,16 +2305,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossary", @@ -2158,8 +2330,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2170,8 +2343,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4273, - serialized_end=4417, + serialized_start=4271, + serialized_end=4415, ) @@ -2181,6 +2354,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2191,17 +2365,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!translate.googleapis.com/Glossary" - ), + serialized_options=b"\340A\002\372A#\n!translate.googleapis.com/Glossary", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2211,8 +2384,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4419, - serialized_end=4496, + serialized_start=4417, + serialized_end=4494, ) @@ -2222,6 +2395,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2232,17 +2406,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!translate.googleapis.com/Glossary" - ), + serialized_options=b"\340A\002\372A#\n!translate.googleapis.com/Glossary", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2252,8 +2425,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4498, - serialized_end=4578, + serialized_start=4496, + serialized_end=4576, ) @@ -2263,6 +2436,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -2273,16 +2447,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -2299,8 +2472,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -2311,14 +2485,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -2329,14 +2504,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2347,8 +2523,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4581, - serialized_end=4733, + serialized_start=4579, + serialized_end=4731, ) @@ -2358,6 +2534,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="glossaries", @@ -2376,6 +2553,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -2386,7 +2564,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2394,6 +2572,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2404,8 +2583,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4735, - serialized_end=4843, + serialized_start=4733, + serialized_end=4841, ) @@ -2415,6 +2594,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2425,7 +2605,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2433,6 +2613,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="state", @@ -2451,6 +2632,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -2469,18 +2651,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_CREATEGLOSSARYMETADATA_STATE], + enum_types=[_CREATEGLOSSARYMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4846, - serialized_end=5110, + serialized_start=4844, + serialized_end=5108, ) @@ -2490,6 +2673,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2500,7 +2684,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2508,6 +2692,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="state", @@ -2526,6 +2711,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -2544,18 +2730,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_DELETEGLOSSARYMETADATA_STATE], + enum_types=[_DELETEGLOSSARYMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5113, - serialized_end=5377, + serialized_start=5111, + serialized_end=5375, ) @@ -2565,6 +2752,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2575,7 +2763,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2583,6 +2771,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -2601,6 +2790,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -2619,6 +2809,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2629,8 +2820,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5380, - serialized_end=5513, + serialized_start=5378, + serialized_end=5511, ) _TRANSLATETEXTREQUEST_LABELSENTRY.containing_type = _TRANSLATETEXTREQUEST @@ -2793,12 +2984,11 @@ TranslateTextGlossaryConfig = _reflection.GeneratedProtocolMessageType( "TranslateTextGlossaryConfig", (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATETEXTGLOSSARYCONFIG, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Configures which glossary should be used for a specific - target language, and defines options for applying that glossary. - + { + "DESCRIPTOR": _TRANSLATETEXTGLOSSARYCONFIG, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Configures which glossary should be used for a specific target + language, and defines options for applying that glossary. Attributes: glossary: @@ -2809,27 +2999,26 @@ is false if missing. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.TranslateTextGlossaryConfig) - ), + }, ) _sym_db.RegisterMessage(TranslateTextGlossaryConfig) TranslateTextRequest = _reflection.GeneratedProtocolMessageType( "TranslateTextRequest", (_message.Message,), - dict( - LabelsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATETEXTREQUEST_LABELSENTRY, - __module__="google.cloud.translation_v3.proto.translation_service_pb2" + { + "DESCRIPTOR": _TRANSLATETEXTREQUEST_LABELSENTRY, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.TranslateTextRequest.LabelsEntry) - ), + }, ), - DESCRIPTOR=_TRANSLATETEXTREQUEST, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The request message for synchronous translation. - + "DESCRIPTOR": _TRANSLATETEXTREQUEST, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The request message for synchronous translation. Attributes: contents: @@ -2838,12 +3027,12 @@ BatchTranslateText for larger text. mime_type: Optional. The format of the source text, for example, - "text/html", "text/plain". If left blank, the MIME type - defaults to "text/html". + “text/html”, “text/plain”. If left blank, the MIME type + defaults to “text/html”. source_language_code: Optional. The BCP-47 language code of the input text if known, - for example, "en-US" or "sr-Latn". Supported language codes - are listed in Language Support. If the source language isn't + for example, “en-US” or “sr-Latn”. Supported language codes + are listed in Language Support. If the source language isn’t specified, the API attempts to identify the source language automatically and returns the source language within the response. @@ -2853,14 +3042,14 @@ Language Support. parent: Required. Project or location to make a call. Must refer to a - caller's project. Format: ``projects/{project-number-or-id}`` + caller’s project. Format: ``projects/{project-number-or-id}`` or ``projects/{project-number-or-id}/locations/{location- id}``. For global calls, use ``projects/{project-number-or- id}/locations/global`` or ``projects/{project-number-or-id}``. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an - INVALID\_ARGUMENT (400) error is returned. + INVALID_ARGUMENT (400) error is returned. model: Optional. The ``model`` type requested for this translation. The format depends on model type: - AutoML Translation @@ -2877,7 +3066,7 @@ glossary_config: Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, - otherwise an INVALID\_ARGUMENT (400) error is returned. + otherwise an INVALID_ARGUMENT (400) error is returned. labels: Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 @@ -2889,7 +3078,7 @@ information. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.TranslateTextRequest) - ), + }, ) _sym_db.RegisterMessage(TranslateTextRequest) _sym_db.RegisterMessage(TranslateTextRequest.LabelsEntry) @@ -2897,11 +3086,12 @@ TranslateTextResponse = _reflection.GeneratedProtocolMessageType( "TranslateTextResponse", (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATETEXTRESPONSE, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__=""" - Attributes: + { + "DESCRIPTOR": _TRANSLATETEXTRESPONSE, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """ + + Attributes: translations: Text translation responses with no glossary applied. This field has the same length as [``contents``][google.cloud.trans @@ -2914,18 +3104,17 @@ google.cloud.translation.v3.TranslateTextRequest.contents]. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.TranslateTextResponse) - ), + }, ) _sym_db.RegisterMessage(TranslateTextResponse) Translation = _reflection.GeneratedProtocolMessageType( "Translation", (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATION, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""A single translation response. - + { + "DESCRIPTOR": _TRANSLATION, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """A single translation response. Attributes: translated_text: @@ -2948,37 +3137,36 @@ The ``glossary_config`` used for this translation. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.Translation) - ), + }, ) _sym_db.RegisterMessage(Translation) DetectLanguageRequest = _reflection.GeneratedProtocolMessageType( "DetectLanguageRequest", (_message.Message,), - dict( - LabelsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_DETECTLANGUAGEREQUEST_LABELSENTRY, - __module__="google.cloud.translation_v3.proto.translation_service_pb2" + { + "DESCRIPTOR": _DETECTLANGUAGEREQUEST_LABELSENTRY, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.DetectLanguageRequest.LabelsEntry) - ), + }, ), - DESCRIPTOR=_DETECTLANGUAGEREQUEST, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The request message for language detection. - + "DESCRIPTOR": _DETECTLANGUAGEREQUEST, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The request message for language detection. Attributes: parent: Required. Project or location to make a call. Must refer to a - caller's project. Format: ``projects/{project-number-or- + caller’s project. Format: ``projects/{project-number-or- id}/locations/{location-id}`` or ``projects/{project-number- or-id}``. For global calls, use ``projects/{project-number- or-id}/locations/global`` or ``projects/{project-number-or- id}``. Only models within the same region (has same location- - id) can be used. Otherwise an INVALID\_ARGUMENT (400) error is + id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned. model: Optional. The language detection model to be used. Format: @@ -2995,8 +3183,8 @@ The content of the input stored as a string. mime_type: Optional. The format of the source text, for example, - "text/html", "text/plain". If left blank, the MIME type - defaults to "text/html". + “text/html”, “text/plain”. If left blank, the MIME type + defaults to “text/html”. labels: Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 @@ -3008,7 +3196,7 @@ information. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.DetectLanguageRequest) - ), + }, ) _sym_db.RegisterMessage(DetectLanguageRequest) _sym_db.RegisterMessage(DetectLanguageRequest.LabelsEntry) @@ -3016,11 +3204,10 @@ DetectedLanguage = _reflection.GeneratedProtocolMessageType( "DetectedLanguage", (_message.Message,), - dict( - DESCRIPTOR=_DETECTEDLANGUAGE, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The response message for language detection. - + { + "DESCRIPTOR": _DETECTEDLANGUAGE, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The response message for language detection. Attributes: language_code: @@ -3030,18 +3217,17 @@ The confidence of the detection result for this language. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.DetectedLanguage) - ), + }, ) _sym_db.RegisterMessage(DetectedLanguage) DetectLanguageResponse = _reflection.GeneratedProtocolMessageType( "DetectLanguageResponse", (_message.Message,), - dict( - DESCRIPTOR=_DETECTLANGUAGERESPONSE, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The response message for language detection. - + { + "DESCRIPTOR": _DETECTLANGUAGERESPONSE, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The response message for language detection. Attributes: languages: @@ -3049,29 +3235,28 @@ descending order. The most probable language first. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.DetectLanguageResponse) - ), + }, ) _sym_db.RegisterMessage(DetectLanguageResponse) GetSupportedLanguagesRequest = _reflection.GeneratedProtocolMessageType( "GetSupportedLanguagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETSUPPORTEDLANGUAGESREQUEST, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The request message for discovering supported languages. - + { + "DESCRIPTOR": _GETSUPPORTEDLANGUAGESREQUEST, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The request message for discovering supported languages. Attributes: parent: Required. Project or location to make a call. Must refer to a - caller's project. Format: ``projects/{project-number-or-id}`` + caller’s project. Format: ``projects/{project-number-or-id}`` or ``projects/{project-number-or-id}/locations/{location- id}``. For global calls, use ``projects/{project-number-or- id}/locations/global`` or ``projects/{project-number-or-id}``. Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be - used, otherwise an INVALID\_ARGUMENT (400) error is returned. + used, otherwise an INVALID_ARGUMENT (400) error is returned. display_language_code: Optional. The language to use to return localized, human readable names of supported languages. If missing, then @@ -3088,18 +3273,17 @@ supported languages of Google general base (PBMT) model. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.GetSupportedLanguagesRequest) - ), + }, ) _sym_db.RegisterMessage(GetSupportedLanguagesRequest) SupportedLanguages = _reflection.GeneratedProtocolMessageType( "SupportedLanguages", (_message.Message,), - dict( - DESCRIPTOR=_SUPPORTEDLANGUAGES, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The response message for discovering supported languages. - + { + "DESCRIPTOR": _SUPPORTEDLANGUAGES, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The response message for discovering supported languages. Attributes: languages: @@ -3107,26 +3291,25 @@ entry for each language the Translation API supports. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.SupportedLanguages) - ), + }, ) _sym_db.RegisterMessage(SupportedLanguages) SupportedLanguage = _reflection.GeneratedProtocolMessageType( "SupportedLanguage", (_message.Message,), - dict( - DESCRIPTOR=_SUPPORTEDLANGUAGE, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""A single supported language response corresponds to - information related to one supported language. - + { + "DESCRIPTOR": _SUPPORTEDLANGUAGE, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """A single supported language response corresponds to information + related to one supported language. Attributes: language_code: Supported language code, generally consisting of its ISO 639-1 - identifier, for example, 'en', 'ja'. In certain cases, BCP-47 + identifier, for example, ‘en’, ‘ja’. In certain cases, BCP-47 codes including language and region identifiers are returned - (for example, 'zh-TW' and 'zh-CN') + (for example, ‘zh-TW’ and ‘zh-CN’) display_name: Human readable name of the language localized in the display language specified in the request. @@ -3136,18 +3319,17 @@ Can be used as target language. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.SupportedLanguage) - ), + }, ) _sym_db.RegisterMessage(SupportedLanguage) GcsSource = _reflection.GeneratedProtocolMessageType( "GcsSource", (_message.Message,), - dict( - DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The Google Cloud Storage location for the input content. - + { + "DESCRIPTOR": _GCSSOURCE, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The Google Cloud Storage location for the input content. Attributes: input_uri: @@ -3155,25 +3337,24 @@ ``gs://my_bucket/my_object``. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.GcsSource) - ), + }, ) _sym_db.RegisterMessage(GcsSource) InputConfig = _reflection.GeneratedProtocolMessageType( "InputConfig", (_message.Message,), - dict( - DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Input configuration for BatchTranslateText request. - + { + "DESCRIPTOR": _INPUTCONFIG, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Input configuration for BatchTranslateText request. Attributes: mime_type: - Optional. Can be "text/plain" or "text/html". For ``.tsv``, - "text/html" is used if mime\_type is missing. For ``.html``, - this field must be "text/html" or empty. For ``.txt``, this - field must be "text/plain" or empty. + Optional. Can be “text/plain” or “text/html”. For ``.tsv``, + “text/html” is used if mime_type is missing. For ``.html``, + this field must be “text/html” or empty. For ``.txt``, this + field must be “text/plain” or empty. source: Required. Specify the input. gcs_source: @@ -3189,45 +3370,42 @@ Unicode codepoints, otherwise an error might be returned. Note that the input tsv must be RFC 4180 compliant. You could use https://github.com/Clever/csvlint to check potential - formatting errors in your tsv file. csvlint --delimiter=':raw- - latex:`\t`' your\_input\_file.tsv The other supported file + formatting errors in your tsv file. csvlint –delimiter=‘:raw- + latex:`\t`’ your_input_file.tsv The other supported file extensions are ``.txt`` or ``.html``, which is treated as a single large chunk of text. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.InputConfig) - ), + }, ) _sym_db.RegisterMessage(InputConfig) GcsDestination = _reflection.GeneratedProtocolMessageType( "GcsDestination", (_message.Message,), - dict( - DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The Google Cloud Storage location for the output content. - + { + "DESCRIPTOR": _GCSDESTINATION, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The Google Cloud Storage location for the output content. Attributes: output_uri_prefix: - Required. There must be no files under 'output\_uri\_prefix'. - 'output\_uri\_prefix' must end with "/" and start with - "gs://", otherwise an INVALID\_ARGUMENT (400) error is - returned. + Required. There must be no files under ‘output_uri_prefix’. + ‘output_uri_prefix’ must end with “/” and start with “gs://”, + otherwise an INVALID_ARGUMENT (400) error is returned. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.GcsDestination) - ), + }, ) _sym_db.RegisterMessage(GcsDestination) OutputConfig = _reflection.GeneratedProtocolMessageType( "OutputConfig", (_message.Message,), - dict( - DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Output configuration for BatchTranslateText request. - + { + "DESCRIPTOR": _OUTPUTCONFIG, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Output configuration for BatchTranslateText request. Attributes: destination: @@ -3236,116 +3414,114 @@ Google Cloud Storage destination for output content. For every single input file (for example, gs://a/b/c.[extension]), we generate at most 2 \* n output files. (n is the # of - target\_language\_codes in the BatchTranslateTextRequest). + target_language_codes in the BatchTranslateTextRequest). Output files (tsv) generated are compliant with RFC 4180 except that record delimiters are ``\\\\n`` instead of - ``\\\\r\\\\n``. We don't provide any way to + ``\\\\r\\\\n``. We don’t provide any way to change record delimiters. While the input files are being - processed, we write/update an index file 'index.csv' under - 'output\_uri\_prefix' (for example, gs://translation- + processed, we write/update an index file ‘index.csv’ under + ‘output_uri_prefix’ (for example, gs://translation- test/index.csv) The index file is generated/updated as new - files are being translated. The format is: input\_file,target - \_language\_code,translations\_file,errors\_file, - glossary\_translations\_file,glossary\_errors\_file - input\_file is one file we matched using - gcs\_source.input\_uri. target\_language\_code is provided in - the request. translations\_file contains the translations. - (details provided below) errors\_file contains the errors - during processing of the file. (details below). Both - translations\_file and errors\_file could be empty strings if - we have no content to output. glossary\_translations\_file and - glossary\_errors\_file are always empty strings if the - input\_file is tsv. They could also be empty if we have no - content to output. Once a row is present in index.csv, the - input/output matching never changes. Callers should also - expect all the content in input\_file are processed and ready - to be consumed (that is, no partial output file is written). - The format of translations\_file (for target language code - 'trg') is: gs://translation\_test/a\_b\_c\_'trg'\_translations - .[extension] If the input file extension is tsv, the output - has the following columns: Column 1: ID of the request - provided in the input, if it's not provided in the input, then - the input row number is used (0-based). Column 2: source - sentence. Column 3: translation without applying a glossary. - Empty string if there is an error. Column 4 (only present if a - glossary is provided in the request): translation after - applying the glossary. Empty string if there is an error - applying the glossary. Could be same string as column 3 if - there is no glossary applied. If input file extension is a - txt or html, the translation is directly written to the output - file. If glossary is requested, a separate - glossary\_translations\_file has format of gs://translation\_t - est/a\_b\_c\_'trg'\_glossary\_translations.[extension] The - format of errors file (for target language code 'trg') is: - gs://translation\_test/a\_b\_c\_'trg'\_errors.[extension] If - the input file extension is tsv, errors\_file contains the + files are being translated. The format is: + input_file,target_language_code,translations_file,errors_file, + glossary_translations_file,glossary_errors_file input_file is + one file we matched using gcs_source.input_uri. + target_language_code is provided in the request. + translations_file contains the translations. (details provided + below) errors_file contains the errors during processing of + the file. (details below). Both translations_file and + errors_file could be empty strings if we have no content to + output. glossary_translations_file and glossary_errors_file + are always empty strings if the input_file is tsv. They could + also be empty if we have no content to output. Once a row is + present in index.csv, the input/output matching never changes. + Callers should also expect all the content in input_file are + processed and ready to be consumed (that is, no partial output + file is written). The format of translations_file (for target + language code ‘trg’) is: + gs://translation_test/a_b_c\_‘trg’\_translations.[extension] + If the input file extension is tsv, the output has the + following columns: Column 1: ID of the request provided in the + input, if it’s not provided in the input, then the input row + number is used (0-based). Column 2: source sentence. Column 3: + translation without applying a glossary. Empty string if there + is an error. Column 4 (only present if a glossary is provided + in the request): translation after applying the glossary. + Empty string if there is an error applying the glossary. Could + be same string as column 3 if there is no glossary applied. + If input file extension is a txt or html, the translation is + directly written to the output file. If glossary is requested, + a separate glossary_translations_file has format of gs://trans + lation_test/a_b_c\_‘trg’\_glossary_translations.[extension] + The format of errors file (for target language code ‘trg’) is: + gs://translation_test/a_b_c\_‘trg’\_errors.[extension] If the + input file extension is tsv, errors_file contains the following: Column 1: ID of the request provided in the input, - if it's not provided in the input, then the input row number + if it’s not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: Error detail for the translation. Could be empty. Column 4 (only present if a glossary is provided in the request): Error when applying the glossary. If the input file extension is txt or - html, glossary\_error\_file will be generated that contains - error details. glossary\_error\_file has format of gs://transl - ation\_test/a\_b\_c\_'trg'\_glossary\_errors.[extension] + html, glossary_error_file will be generated that contains + error details. glossary_error_file has format of gs://translat + ion_test/a_b_c\_‘trg’\_glossary_errors.[extension] """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.OutputConfig) - ), + }, ) _sym_db.RegisterMessage(OutputConfig) BatchTranslateTextRequest = _reflection.GeneratedProtocolMessageType( "BatchTranslateTextRequest", (_message.Message,), - dict( - ModelsEntry=_reflection.GeneratedProtocolMessageType( + { + "ModelsEntry": _reflection.GeneratedProtocolMessageType( "ModelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_MODELSENTRY, - __module__="google.cloud.translation_v3.proto.translation_service_pb2" + { + "DESCRIPTOR": _BATCHTRANSLATETEXTREQUEST_MODELSENTRY, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchTranslateTextRequest.ModelsEntry) - ), + }, ), - GlossariesEntry=_reflection.GeneratedProtocolMessageType( + "GlossariesEntry": _reflection.GeneratedProtocolMessageType( "GlossariesEntry", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY, - __module__="google.cloud.translation_v3.proto.translation_service_pb2" + { + "DESCRIPTOR": _BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchTranslateTextRequest.GlossariesEntry) - ), + }, ), - LabelsEntry=_reflection.GeneratedProtocolMessageType( + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_LABELSENTRY, - __module__="google.cloud.translation_v3.proto.translation_service_pb2" + { + "DESCRIPTOR": _BATCHTRANSLATETEXTREQUEST_LABELSENTRY, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchTranslateTextRequest.LabelsEntry) - ), + }, ), - DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""The batch translation request. - + "DESCRIPTOR": _BATCHTRANSLATETEXTREQUEST, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """The batch translation request. Attributes: parent: - Required. Location to make a call. Must refer to a caller's + Required. Location to make a call. Must refer to a caller’s project. Format: ``projects/{project-number-or- id}/locations/{location-id}``. The ``global`` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same - location-id) can be used, otherwise an INVALID\_ARGUMENT (400) + location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. source_language_code: Required. Source language code. target_language_codes: Required. Specify up to 10 language codes here. models: - Optional. The models to use for translation. Map's key is - target language code. Map's value is model name. Value can be + Optional. The models to use for translation. Map’s key is + target language code. Map’s value is model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: ``projects/{project-number-or- @@ -3362,10 +3538,10 @@ 100M Unicode codepoints. The files must use UTF-8 encoding. output_config: Required. Output configuration. If 2 input configs match to - the same file (that is, same input path), we don't generate + the same file (that is, same input path), we don’t generate output for duplicate inputs. glossaries: - Optional. Glossaries to be applied for translation. It's keyed + Optional. Glossaries to be applied for translation. It’s keyed by target language code. labels: Optional. The labels with user-defined metadata for the @@ -3378,7 +3554,7 @@ information. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchTranslateTextRequest) - ), + }, ) _sym_db.RegisterMessage(BatchTranslateTextRequest) _sym_db.RegisterMessage(BatchTranslateTextRequest.ModelsEntry) @@ -3388,11 +3564,10 @@ BatchTranslateMetadata = _reflection.GeneratedProtocolMessageType( "BatchTranslateMetadata", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATEMETADATA, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""State metadata for the batch translation operation. - + { + "DESCRIPTOR": _BATCHTRANSLATEMETADATA, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """State metadata for the batch translation operation. Attributes: state: @@ -3412,21 +3587,19 @@ Time when the operation was submitted. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchTranslateMetadata) - ), + }, ) _sym_db.RegisterMessage(BatchTranslateMetadata) BatchTranslateResponse = _reflection.GeneratedProtocolMessageType( "BatchTranslateResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATERESPONSE, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Stored in the - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field returned by BatchTranslateText if at least one sentence is - translated successfully. - + { + "DESCRIPTOR": _BATCHTRANSLATERESPONSE, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Stored in the [google.longrunning.Operation.response][google.longrunni + ng.Operation.response] field returned by BatchTranslateText if at + least one sentence is translated successfully. Attributes: total_characters: @@ -3445,18 +3618,17 @@ true. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.BatchTranslateResponse) - ), + }, ) _sym_db.RegisterMessage(BatchTranslateResponse) GlossaryInputConfig = _reflection.GeneratedProtocolMessageType( "GlossaryInputConfig", (_message.Message,), - dict( - DESCRIPTOR=_GLOSSARYINPUTCONFIG, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Input configuration for glossaries. - + { + "DESCRIPTOR": _GLOSSARYINPUTCONFIG, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Input configuration for glossaries. Attributes: source: @@ -3464,7 +3636,7 @@ gcs_source: Required. Google Cloud Storage location of glossary data. File format is determined based on the filename extension. API - returns [google.rpc.Code.INVALID\_ARGUMENT] for unsupported + returns [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file formats. Wildcards are not allowed. This must be a single file in one of the following formats: For unidirectional glossaries: - TSV/CSV (``.tsv``/``.csv``): 2 @@ -3480,59 +3652,56 @@ google.com/translatortoolkit/answer/6306379?hl=en>`__. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.GlossaryInputConfig) - ), + }, ) _sym_db.RegisterMessage(GlossaryInputConfig) Glossary = _reflection.GeneratedProtocolMessageType( "Glossary", (_message.Message,), - dict( - LanguageCodePair=_reflection.GeneratedProtocolMessageType( + { + "LanguageCodePair": _reflection.GeneratedProtocolMessageType( "LanguageCodePair", (_message.Message,), - dict( - DESCRIPTOR=_GLOSSARY_LANGUAGECODEPAIR, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Used with unidirectional glossaries. - + { + "DESCRIPTOR": _GLOSSARY_LANGUAGECODEPAIR, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Used with unidirectional glossaries. Attributes: source_language_code: Required. The BCP-47 language code of the input text, for - example, "en-US". Expected to be an exact match for - GlossaryTerm.language\_code. + example, “en-US”. Expected to be an exact match for + GlossaryTerm.language_code. target_language_code: Required. The BCP-47 language code for translation output, for - example, "zh-CN". Expected to be an exact match for - GlossaryTerm.language\_code. + example, “zh-CN”. Expected to be an exact match for + GlossaryTerm.language_code. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.Glossary.LanguageCodePair) - ), + }, ), - LanguageCodesSet=_reflection.GeneratedProtocolMessageType( + "LanguageCodesSet": _reflection.GeneratedProtocolMessageType( "LanguageCodesSet", (_message.Message,), - dict( - DESCRIPTOR=_GLOSSARY_LANGUAGECODESSET, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Used with equivalent term set glossaries. - + { + "DESCRIPTOR": _GLOSSARY_LANGUAGECODESSET, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Used with equivalent term set glossaries. Attributes: language_codes: The BCP-47 language code(s) for terms defined in the glossary. All entries are unique. The list contains at least two entries. Expected to be an exact match for - GlossaryTerm.language\_code. + GlossaryTerm.language_code. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.Glossary.LanguageCodesSet) - ), + }, ), - DESCRIPTOR=_GLOSSARY, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Represents a glossary built from user provided data. - + "DESCRIPTOR": _GLOSSARY, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Represents a glossary built from user provided data. Attributes: name: @@ -3556,7 +3725,7 @@ Output only. When the glossary creation was finished. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.Glossary) - ), + }, ) _sym_db.RegisterMessage(Glossary) _sym_db.RegisterMessage(Glossary.LanguageCodePair) @@ -3565,11 +3734,10 @@ CreateGlossaryRequest = _reflection.GeneratedProtocolMessageType( "CreateGlossaryRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEGLOSSARYREQUEST, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Request message for CreateGlossary. - + { + "DESCRIPTOR": _CREATEGLOSSARYREQUEST, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Request message for CreateGlossary. Attributes: parent: @@ -3578,54 +3746,51 @@ Required. The glossary to create. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.CreateGlossaryRequest) - ), + }, ) _sym_db.RegisterMessage(CreateGlossaryRequest) GetGlossaryRequest = _reflection.GeneratedProtocolMessageType( "GetGlossaryRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETGLOSSARYREQUEST, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Request message for GetGlossary. - + { + "DESCRIPTOR": _GETGLOSSARYREQUEST, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Request message for GetGlossary. Attributes: name: Required. The name of the glossary to retrieve. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.GetGlossaryRequest) - ), + }, ) _sym_db.RegisterMessage(GetGlossaryRequest) DeleteGlossaryRequest = _reflection.GeneratedProtocolMessageType( "DeleteGlossaryRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEGLOSSARYREQUEST, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Request message for DeleteGlossary. - + { + "DESCRIPTOR": _DELETEGLOSSARYREQUEST, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Request message for DeleteGlossary. Attributes: name: Required. The name of the glossary to delete. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.DeleteGlossaryRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteGlossaryRequest) ListGlossariesRequest = _reflection.GeneratedProtocolMessageType( "ListGlossariesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTGLOSSARIESREQUEST, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Request message for ListGlossaries. - + { + "DESCRIPTOR": _LISTGLOSSARIESREQUEST, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Request message for ListGlossaries. Attributes: parent: @@ -3638,7 +3803,7 @@ page_token: Optional. A token identifying a page of results the server should return. Typically, this is the value of - [ListGlossariesResponse.next\_page\_token] returned from the + [ListGlossariesResponse.next_page_token] returned from the previous call to ``ListGlossaries`` method. The first page is returned if ``page_token``\ is empty or missing. filter: @@ -3647,43 +3812,40 @@ has no effect. If missing, no filtering is performed. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.ListGlossariesRequest) - ), + }, ) _sym_db.RegisterMessage(ListGlossariesRequest) ListGlossariesResponse = _reflection.GeneratedProtocolMessageType( "ListGlossariesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTGLOSSARIESRESPONSE, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Response message for ListGlossaries. - + { + "DESCRIPTOR": _LISTGLOSSARIESRESPONSE, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Response message for ListGlossaries. Attributes: glossaries: The list of glossaries for a project. next_page_token: A token to retrieve a page of results. Pass this value in the - [ListGlossariesRequest.page\_token] field in the subsequent + [ListGlossariesRequest.page_token] field in the subsequent call to ``ListGlossaries`` method to retrieve the next page of results. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.ListGlossariesResponse) - ), + }, ) _sym_db.RegisterMessage(ListGlossariesResponse) CreateGlossaryMetadata = _reflection.GeneratedProtocolMessageType( "CreateGlossaryMetadata", (_message.Message,), - dict( - DESCRIPTOR=_CREATEGLOSSARYMETADATA, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Stored in the - [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] - field returned by CreateGlossary. - + { + "DESCRIPTOR": _CREATEGLOSSARYMETADATA, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Stored in the [google.longrunning.Operation.metadata][google.longrunni + ng.Operation.metadata] field returned by CreateGlossary. Attributes: name: @@ -3694,20 +3856,18 @@ The time when the operation was submitted to the server. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.CreateGlossaryMetadata) - ), + }, ) _sym_db.RegisterMessage(CreateGlossaryMetadata) DeleteGlossaryMetadata = _reflection.GeneratedProtocolMessageType( "DeleteGlossaryMetadata", (_message.Message,), - dict( - DESCRIPTOR=_DELETEGLOSSARYMETADATA, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Stored in the - [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] - field returned by DeleteGlossary. - + { + "DESCRIPTOR": _DELETEGLOSSARYMETADATA, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Stored in the [google.longrunning.Operation.metadata][google.longrunni + ng.Operation.metadata] field returned by DeleteGlossary. Attributes: name: @@ -3718,20 +3878,18 @@ The time when the operation was submitted to the server. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.DeleteGlossaryMetadata) - ), + }, ) _sym_db.RegisterMessage(DeleteGlossaryMetadata) DeleteGlossaryResponse = _reflection.GeneratedProtocolMessageType( "DeleteGlossaryResponse", (_message.Message,), - dict( - DESCRIPTOR=_DELETEGLOSSARYRESPONSE, - __module__="google.cloud.translation_v3.proto.translation_service_pb2", - __doc__="""Stored in the - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field returned by DeleteGlossary. - + { + "DESCRIPTOR": _DELETEGLOSSARYRESPONSE, + "__module__": "google.cloud.translate_v3.proto.translation_service_pb2", + "__doc__": """Stored in the [google.longrunning.Operation.response][google.longrunni + ng.Operation.response] field returned by DeleteGlossary. Attributes: name: @@ -3744,7 +3902,7 @@ is set to true. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3.DeleteGlossaryResponse) - ), + }, ) _sym_db.RegisterMessage(DeleteGlossaryResponse) @@ -3799,11 +3957,10 @@ full_name="google.cloud.translation.v3.TranslationService", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\030translate.googleapis.com\322A`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translation" - ), - serialized_start=5516, - serialized_end=7578, + serialized_options=b"\312A\030translate.googleapis.com\322A`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translation", + create_key=_descriptor._internal_create_key, + serialized_start=5514, + serialized_end=7576, methods=[ _descriptor.MethodDescriptor( name="TranslateText", @@ -3812,9 +3969,8 @@ containing_service=None, input_type=_TRANSLATETEXTREQUEST, output_type=_TRANSLATETEXTRESPONSE, - serialized_options=_b( - '\202\323\344\223\002b"1/v3/{parent=projects/*/locations/*}:translateText:\001*Z*"%/v3/{parent=projects/*}:translateText:\001*\332A$parent,target_language_code,contents\332AIparent,model,mime_type,source_language_code,target_language_code,contents' - ), + serialized_options=b'\202\323\344\223\002b"1/v3/{parent=projects/*/locations/*}:translateText:\001*Z*"%/v3/{parent=projects/*}:translateText:\001*\332A$parent,target_language_code,contents\332AIparent,model,mime_type,source_language_code,target_language_code,contents', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DetectLanguage", @@ -3823,9 +3979,8 @@ containing_service=None, input_type=_DETECTLANGUAGEREQUEST, output_type=_DETECTLANGUAGERESPONSE, - serialized_options=_b( - '\202\323\344\223\002d"2/v3/{parent=projects/*/locations/*}:detectLanguage:\001*Z+"&/v3/{parent=projects/*}:detectLanguage:\001*\332A\036parent,model,mime_type,content' - ), + serialized_options=b'\202\323\344\223\002d"2/v3/{parent=projects/*/locations/*}:detectLanguage:\001*Z+"&/v3/{parent=projects/*}:detectLanguage:\001*\332A\036parent,model,mime_type,content', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetSupportedLanguages", @@ -3834,9 +3989,8 @@ containing_service=None, input_type=_GETSUPPORTEDLANGUAGESREQUEST, output_type=_SUPPORTEDLANGUAGES, - serialized_options=_b( - '\202\323\344\223\002f\0226/v3/{parent=projects/*/locations/*}/supportedLanguagesZ,\022*/v3/{parent=projects/*}/supportedLanguages\332A"parent,model,display_language_code' - ), + serialized_options=b'\202\323\344\223\002f\0226/v3/{parent=projects/*/locations/*}/supportedLanguagesZ,\022*/v3/{parent=projects/*}/supportedLanguages\332A"parent,model,display_language_code', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchTranslateText", @@ -3845,9 +3999,8 @@ containing_service=None, input_type=_BATCHTRANSLATETEXTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002;"6/v3/{parent=projects/*/locations/*}:batchTranslateText:\001*\312A0\n\026BatchTranslateResponse\022\026BatchTranslateMetadata' - ), + serialized_options=b'\202\323\344\223\002;"6/v3/{parent=projects/*/locations/*}:batchTranslateText:\001*\312A0\n\026BatchTranslateResponse\022\026BatchTranslateMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateGlossary", @@ -3856,9 +4009,8 @@ containing_service=None, input_type=_CREATEGLOSSARYREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002:"./v3/{parent=projects/*/locations/*}/glossaries:\010glossary\332A\017parent,glossary\312A"\n\010Glossary\022\026CreateGlossaryMetadata' - ), + serialized_options=b'\202\323\344\223\002:"./v3/{parent=projects/*/locations/*}/glossaries:\010glossary\332A\017parent,glossary\312A"\n\010Glossary\022\026CreateGlossaryMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListGlossaries", @@ -3867,9 +4019,8 @@ containing_service=None, input_type=_LISTGLOSSARIESREQUEST, output_type=_LISTGLOSSARIESRESPONSE, - serialized_options=_b( - "\202\323\344\223\0020\022./v3/{parent=projects/*/locations/*}/glossaries\332A\006parent" - ), + serialized_options=b"\202\323\344\223\0020\022./v3/{parent=projects/*/locations/*}/glossaries\332A\006parent", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetGlossary", @@ -3878,9 +4029,8 @@ containing_service=None, input_type=_GETGLOSSARYREQUEST, output_type=_GLOSSARY, - serialized_options=_b( - "\202\323\344\223\0020\022./v3/{name=projects/*/locations/*/glossaries/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0020\022./v3/{name=projects/*/locations/*/glossaries/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteGlossary", @@ -3889,9 +4039,8 @@ containing_service=None, input_type=_DELETEGLOSSARYREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - "\202\323\344\223\0020*./v3/{name=projects/*/locations/*/glossaries/*}\332A\004name\312A0\n\026DeleteGlossaryResponse\022\026DeleteGlossaryMetadata" - ), + serialized_options=b"\202\323\344\223\0020*./v3/{name=projects/*/locations/*/glossaries/*}\332A\004name\312A0\n\026DeleteGlossaryResponse\022\026DeleteGlossaryMetadata", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/translate_v3/proto/translation_service_pb2_grpc.py b/google/cloud/translate_v3/proto/translation_service_pb2_grpc.py index 5f7f9813..66b1b6cf 100644 --- a/google/cloud/translate_v3/proto/translation_service_pb2_grpc.py +++ b/google/cloud/translate_v3/proto/translation_service_pb2_grpc.py @@ -1,8 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.translate_v3.proto import ( - translation_service_pb2 as google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2, + translation_service_pb2 as google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2, ) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, @@ -12,53 +13,53 @@ class TranslationServiceStub(object): """Proto file for the Cloud Translation API (v3 GA). - Provides natural language translation operations. - """ + Provides natural language translation operations. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.TranslateText = channel.unary_unary( "/google.cloud.translation.v3.TranslationService/TranslateText", - request_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.TranslateTextRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.TranslateTextResponse.FromString, + request_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.TranslateTextRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.TranslateTextResponse.FromString, ) self.DetectLanguage = channel.unary_unary( "/google.cloud.translation.v3.TranslationService/DetectLanguage", - request_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.FromString, + request_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.FromString, ) self.GetSupportedLanguages = channel.unary_unary( "/google.cloud.translation.v3.TranslationService/GetSupportedLanguages", - request_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.SupportedLanguages.FromString, + request_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.SupportedLanguages.FromString, ) self.BatchTranslateText = channel.unary_unary( "/google.cloud.translation.v3.TranslationService/BatchTranslateText", - request_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.SerializeToString, + request_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) self.CreateGlossary = channel.unary_unary( "/google.cloud.translation.v3.TranslationService/CreateGlossary", - request_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.SerializeToString, + request_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) self.ListGlossaries = channel.unary_unary( "/google.cloud.translation.v3.TranslationService/ListGlossaries", - request_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.FromString, + request_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.FromString, ) self.GetGlossary = channel.unary_unary( "/google.cloud.translation.v3.TranslationService/GetGlossary", - request_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.Glossary.FromString, + request_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.Glossary.FromString, ) self.DeleteGlossary = channel.unary_unary( "/google.cloud.translation.v3.TranslationService/DeleteGlossary", - request_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.SerializeToString, + request_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) @@ -66,72 +67,72 @@ def __init__(self, channel): class TranslationServiceServicer(object): """Proto file for the Cloud Translation API (v3 GA). - Provides natural language translation operations. - """ + Provides natural language translation operations. + """ def TranslateText(self, request, context): """Translates input text and returns translated text. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DetectLanguage(self, request, context): """Detects the language of text within a request. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetSupportedLanguages(self, request, context): """Returns a list of supported languages for translation. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchTranslateText(self, request, context): """Translates a large volume of text in asynchronous batch mode. - This function provides real-time output as the inputs are being processed. - If caller cancels a request, the partial results (for an input file, it's - all or nothing) may still be available on the specified output location. + This function provides real-time output as the inputs are being processed. + If caller cancels a request, the partial results (for an input file, it's + all or nothing) may still be available on the specified output location. - This call returns immediately and you can - use google.longrunning.Operation.name to poll the status of the call. - """ + This call returns immediately and you can + use google.longrunning.Operation.name to poll the status of the call. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateGlossary(self, request, context): """Creates a glossary and returns the long-running operation. Returns - NOT_FOUND, if the project doesn't exist. - """ + NOT_FOUND, if the project doesn't exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListGlossaries(self, request, context): """Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't - exist. - """ + exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetGlossary(self, request, context): """Gets a glossary. Returns NOT_FOUND, if the glossary doesn't - exist. - """ + exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteGlossary(self, request, context): """Deletes a glossary, or cancels glossary construction - if the glossary isn't created yet. - Returns NOT_FOUND, if the glossary doesn't exist. - """ + if the glossary isn't created yet. + Returns NOT_FOUND, if the glossary doesn't exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -141,42 +142,42 @@ def add_TranslationServiceServicer_to_server(servicer, server): rpc_method_handlers = { "TranslateText": grpc.unary_unary_rpc_method_handler( servicer.TranslateText, - request_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.TranslateTextRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.TranslateTextResponse.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.TranslateTextRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.TranslateTextResponse.SerializeToString, ), "DetectLanguage": grpc.unary_unary_rpc_method_handler( servicer.DetectLanguage, - request_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.SerializeToString, ), "GetSupportedLanguages": grpc.unary_unary_rpc_method_handler( servicer.GetSupportedLanguages, - request_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.SupportedLanguages.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.SupportedLanguages.SerializeToString, ), "BatchTranslateText": grpc.unary_unary_rpc_method_handler( servicer.BatchTranslateText, - request_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.FromString, + request_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "CreateGlossary": grpc.unary_unary_rpc_method_handler( servicer.CreateGlossary, - request_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.FromString, + request_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "ListGlossaries": grpc.unary_unary_rpc_method_handler( servicer.ListGlossaries, - request_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.SerializeToString, ), "GetGlossary": grpc.unary_unary_rpc_method_handler( servicer.GetGlossary, - request_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.Glossary.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.Glossary.SerializeToString, ), "DeleteGlossary": grpc.unary_unary_rpc_method_handler( servicer.DeleteGlossary, - request_deserializer=google_dot_cloud_dot_translation__v3_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.FromString, + request_deserializer=google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), } @@ -184,3 +185,227 @@ def add_TranslationServiceServicer_to_server(servicer, server): "google.cloud.translation.v3.TranslationService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class TranslationService(object): + """Proto file for the Cloud Translation API (v3 GA). + + Provides natural language translation operations. + """ + + @staticmethod + def TranslateText( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3.TranslationService/TranslateText", + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.TranslateTextRequest.SerializeToString, + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.TranslateTextResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DetectLanguage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3.TranslationService/DetectLanguage", + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.SerializeToString, + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetSupportedLanguages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3.TranslationService/GetSupportedLanguages", + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.SerializeToString, + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.SupportedLanguages.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchTranslateText( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3.TranslationService/BatchTranslateText", + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateGlossary( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3.TranslationService/CreateGlossary", + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListGlossaries( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3.TranslationService/ListGlossaries", + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.SerializeToString, + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetGlossary( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3.TranslationService/GetGlossary", + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.SerializeToString, + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.Glossary.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteGlossary( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3.TranslationService/DeleteGlossary", + google_dot_cloud_dot_translate__v3_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/translate_v3/types.py b/google/cloud/translate_v3/types.py index b1e9aad3..d95b3650 100644 --- a/google/cloud/translate_v3/types.py +++ b/google/cloud/translate_v3/types.py @@ -27,9 +27,16 @@ from google.rpc import status_pb2 -_shared_modules = [operations_pb2, any_pb2, timestamp_pb2, status_pb2] - -_local_modules = [translation_service_pb2] +_shared_modules = [ + operations_pb2, + any_pb2, + timestamp_pb2, + status_pb2, +] + +_local_modules = [ + translation_service_pb2, +] names = [] diff --git a/google/cloud/translate_v3beta1/__init__.py b/google/cloud/translate_v3beta1/__init__.py index 7323f3e3..bebafdf3 100644 --- a/google/cloud/translate_v3beta1/__init__.py +++ b/google/cloud/translate_v3beta1/__init__.py @@ -25,8 +25,8 @@ if sys.version_info[:2] == (2, 7): message = ( - "A future version of this library will drop support for Python 2.7." - "More details about Python 2 support for Google Cloud Client Libraries" + "A future version of this library will drop support for Python 2.7. " + "More details about Python 2 support for Google Cloud Client Libraries " "can be found at https://cloud.google.com/python/docs/python2-sunset/" ) warnings.warn(message, DeprecationWarning) @@ -36,4 +36,7 @@ class TranslationServiceClient(translation_service_client.TranslationServiceClie __doc__ = translation_service_client.TranslationServiceClient.__doc__ -__all__ = ("types", "TranslationServiceClient") +__all__ = ( + "types", + "TranslationServiceClient", +) diff --git a/google/cloud/translate_v3beta1/gapic/translation_service_client.py b/google/cloud/translate_v3beta1/gapic/translation_service_client.py index ed8de5d6..15668dfd 100644 --- a/google/cloud/translate_v3beta1/gapic/translation_service_client.py +++ b/google/cloud/translate_v3beta1/gapic/translation_service_client.py @@ -44,7 +44,7 @@ _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( - "google-cloud-translate" + "google-cloud-translate", ).version @@ -184,12 +184,12 @@ def __init__( self.transport = transport else: self.transport = translation_service_grpc_transport.TranslationServiceGrpcTransport( - address=api_endpoint, channel=channel, credentials=credentials + address=api_endpoint, channel=channel, credentials=credentials, ) if client_info is None: client_info = google.api_core.gapic_v1.client_info.ClientInfo( - gapic_version=_GAPIC_LIBRARY_VERSION + gapic_version=_GAPIC_LIBRARY_VERSION, ) else: client_info.gapic_version = _GAPIC_LIBRARY_VERSION @@ -200,7 +200,7 @@ def __init__( # (Ordinarily, these are the defaults specified in the `*_config.py` # file next to this one.) self._method_configs = google.api_core.gapic_v1.config.parse_method_configs( - client_config["interfaces"][self._INTERFACE_NAME] + client_config["interfaces"][self._INTERFACE_NAME], ) # Save a dictionary of cached API call functions. @@ -247,8 +247,8 @@ def translate_text( Use BatchTranslateText for larger text. target_language_code (str): Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support. - parent (str): Required. Project or location to make a call. Must refer to a caller's - project. + parent (str): Required. Project or location to make a call. Must refer to a + caller's project. Format: ``projects/{project-id}`` or ``projects/{project-id}/locations/{location-id}``. @@ -260,7 +260,7 @@ def translate_text( custom glossaries. Models and glossaries must be within the same region (have same - location-id), otherwise an INVALID\_ARGUMENT (400) error is returned. + location-id), otherwise an INVALID_ARGUMENT (400) error is returned. mime_type (str): Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html". source_language_code (str): Optional. The BCP-47 language code of the input text if @@ -284,9 +284,9 @@ def translate_text( ``projects/{project-id}/locations/global/models/general/nmt``. If missing, the system decides which google base model to use. - glossary_config (Union[dict, ~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. The glossary must be within the same - region (have the same location-id) as the model, otherwise an - INVALID\_ARGUMENT (400) error is returned. + glossary_config (Union[dict, ~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. The glossary must be within the + same region (have the same location-id) as the model, otherwise an + INVALID_ARGUMENT (400) error is returned. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig` @@ -379,8 +379,8 @@ def detect_language( >>> response = client.detect_language(parent) Args: - parent (str): Required. Project or location to make a call. Must refer to a caller's - project. + parent (str): Required. Project or location to make a call. Must refer to a + caller's project. Format: ``projects/{project-id}/locations/{location-id}`` or ``projects/{project-id}``. @@ -389,7 +389,7 @@ def detect_language( ``projects/{project-id}``. Only models within the same region (has same location-id) can be used. - Otherwise an INVALID\_ARGUMENT (400) error is returned. + Otherwise an INVALID_ARGUMENT (400) error is returned. model (str): Optional. The language detection model to be used. Format: @@ -442,7 +442,7 @@ def detect_language( # Sanity check: We have some fields which are mutually exclusive; # raise ValueError if more than one is sent. - google.api_core.protobuf_helpers.check_oneof(content=content) + google.api_core.protobuf_helpers.check_oneof(content=content,) request = translation_service_pb2.DetectLanguageRequest( parent=parent, @@ -490,8 +490,8 @@ def get_supported_languages( >>> response = client.get_supported_languages(parent) Args: - parent (str): Required. Project or location to make a call. Must refer to a caller's - project. + parent (str): Required. Project or location to make a call. Must refer to a + caller's project. Format: ``projects/{project-id}`` or ``projects/{project-id}/locations/{location-id}``. @@ -502,7 +502,7 @@ def get_supported_languages( Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be used, - otherwise an INVALID\_ARGUMENT (400) error is returned. + otherwise an INVALID_ARGUMENT (400) error is returned. display_language_code (str): Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response. @@ -550,7 +550,7 @@ def get_supported_languages( ) request = translation_service_pb2.GetSupportedLanguagesRequest( - parent=parent, display_language_code=display_language_code, model=model + parent=parent, display_language_code=display_language_code, model=model, ) if metadata is None: metadata = [] @@ -630,7 +630,7 @@ def batch_translate_text( The ``global`` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region - (have the same location-id) can be used, otherwise an INVALID\_ARGUMENT + (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. source_language_code (str): Required. Source language code. target_language_codes (list[str]): Required. Specify up to 10 language codes here. @@ -748,7 +748,7 @@ def create_glossary( ): """ Creates a glossary and returns the long-running operation. Returns - NOT\_FOUND, if the project doesn't exist. + NOT_FOUND, if the project doesn't exist. Example: >>> from google.cloud import translate_v3beta1 @@ -808,7 +808,7 @@ def create_glossary( ) request = translation_service_pb2.CreateGlossaryRequest( - parent=parent, glossary=glossary + parent=parent, glossary=glossary, ) if metadata is None: metadata = [] @@ -843,7 +843,7 @@ def list_glossaries( metadata=None, ): """ - Lists glossaries in a project. Returns NOT\_FOUND, if the project + Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist. Example: @@ -911,7 +911,7 @@ def list_glossaries( ) request = translation_service_pb2.ListGlossariesRequest( - parent=parent, page_size=page_size, filter=filter_ + parent=parent, page_size=page_size, filter=filter_, ) if metadata is None: metadata = [] @@ -949,7 +949,7 @@ def get_glossary( metadata=None, ): """ - Gets a glossary. Returns NOT\_FOUND, if the glossary doesn't exist. + Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist. Example: >>> from google.cloud import translate_v3beta1 @@ -992,7 +992,7 @@ def get_glossary( client_info=self._client_info, ) - request = translation_service_pb2.GetGlossaryRequest(name=name) + request = translation_service_pb2.GetGlossaryRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) @@ -1019,7 +1019,7 @@ def delete_glossary( ): """ Deletes a glossary, or cancels glossary construction if the glossary - isn't created yet. Returns NOT\_FOUND, if the glossary doesn't exist. + isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist. Example: >>> from google.cloud import translate_v3beta1 @@ -1071,7 +1071,7 @@ def delete_glossary( client_info=self._client_info, ) - request = translation_service_pb2.DeleteGlossaryRequest(name=name) + request = translation_service_pb2.DeleteGlossaryRequest(name=name,) if metadata is None: metadata = [] metadata = list(metadata) diff --git a/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py b/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py index af45b10d..228f685c 100644 --- a/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py +++ b/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py @@ -2,60 +2,79 @@ "interfaces": { "google.cloud.translation.v3beta1.TranslationService": { "retry_codes": { - "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], - "non_idempotent": [], + "retry_policy_1_codes": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "no_retry_codes": [], + "no_retry_1_codes": [], }, "retry_params": { - "default": { + "retry_policy_1_params": { "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 600000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000, - } + }, + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0, + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000, + }, }, "methods": { "TranslateText": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "DetectLanguage": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "GetSupportedLanguages": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "BatchTranslateText": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "CreateGlossary": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params", }, "ListGlossaries": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "GetGlossary": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, "DeleteGlossary": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default", + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", }, }, } diff --git a/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py b/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py index d3aeadc9..34e754ae 100644 --- a/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py +++ b/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py @@ -57,7 +57,7 @@ def __init__( # exception (channels come with credentials baked in already). if channel is not None and credentials is not None: raise ValueError( - "The `channel` and `credentials` arguments are mutually " "exclusive." + "The `channel` and `credentials` arguments are mutually " "exclusive.", ) # Create the channel. @@ -78,7 +78,7 @@ def __init__( self._stubs = { "translation_service_stub": translation_service_pb2_grpc.TranslationServiceStub( channel - ) + ), } # Because this API includes a method that returns a @@ -183,7 +183,7 @@ def create_glossary(self): """Return the gRPC stub for :meth:`TranslationServiceClient.create_glossary`. Creates a glossary and returns the long-running operation. Returns - NOT\_FOUND, if the project doesn't exist. + NOT_FOUND, if the project doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -196,7 +196,7 @@ def create_glossary(self): def list_glossaries(self): """Return the gRPC stub for :meth:`TranslationServiceClient.list_glossaries`. - Lists glossaries in a project. Returns NOT\_FOUND, if the project + Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist. Returns: @@ -210,7 +210,7 @@ def list_glossaries(self): def get_glossary(self): """Return the gRPC stub for :meth:`TranslationServiceClient.get_glossary`. - Gets a glossary. Returns NOT\_FOUND, if the glossary doesn't exist. + Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -224,7 +224,7 @@ def delete_glossary(self): """Return the gRPC stub for :meth:`TranslationServiceClient.delete_glossary`. Deletes a glossary, or cancels glossary construction if the glossary - isn't created yet. Returns NOT\_FOUND, if the glossary doesn't exist. + isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist. Returns: Callable: A callable which accepts the appropriate diff --git a/google/cloud/translate_v3beta1/proto/translation_service_pb2.py b/google/cloud/translate_v3beta1/proto/translation_service_pb2.py index b58cc600..0d3e11fd 100644 --- a/google/cloud/translate_v3beta1/proto/translation_service_pb2.py +++ b/google/cloud/translate_v3beta1/proto/translation_service_pb2.py @@ -1,10 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translation_v3beta1/proto/translation_service.proto - -import sys - -_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +# source: google/cloud/translate_v3beta1/proto/translation_service.proto +"""Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -26,15 +23,12 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/translation_v3beta1/proto/translation_service.proto", + name="google/cloud/translate_v3beta1/proto/translation_service.proto", package="google.cloud.translation.v3beta1", syntax="proto3", - serialized_options=_b( - '\n"com.google.cloud.translate.v3beta1B\027TranslationServiceProtoP\001ZGgoogle.golang.org/genproto/googleapis/cloud/translate/v3beta1;translate\370\001\001\252\002\036Google.Cloud.Translate.V3Beta1\312\002\036Google\\Cloud\\Translate\\V3beta1\352\002!Google::Cloud::Translate::V3beta1' - ), - serialized_pb=_b( - '\n@google/cloud/translation_v3beta1/proto/translation_service.proto\x12 google.cloud.translation.v3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"N\n\x1bTranslateTextGlossaryConfig\x12\x15\n\x08glossary\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01"\xbf\x03\n\x14TranslateTextRequest\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0fglossary_config\x18\x07 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12W\n\x06labels\x18\n \x03(\x0b\x32\x42.google.cloud.translation.v3beta1.TranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xaa\x01\n\x15TranslateTextResponse\x12\x43\n\x0ctranslations\x18\x01 \x03(\x0b\x32-.google.cloud.translation.v3beta1.Translation\x12L\n\x15glossary_translations\x18\x03 \x03(\x0b\x32-.google.cloud.translation.v3beta1.Translation"\xad\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x04 \x01(\t\x12V\n\x0fglossary_config\x18\x03 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig"\x9f\x02\n\x15\x44\x65tectLanguageRequest\x12\x39\n\x06parent\x18\x05 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32\x43.google.cloud.translation.v3beta1.DetectLanguageRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source"=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02"_\n\x16\x44\x65tectLanguageResponse\x12\x45\n\tlanguages\x18\x01 \x03(\x0b\x32\x32.google.cloud.translation.v3beta1.DetectedLanguage"\x91\x01\n\x1cGetSupportedLanguagesRequest\x12\x39\n\x06parent\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12"\n\x15\x64isplay_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x02 \x01(\tB\x03\xe0\x41\x01"\\\n\x12SupportedLanguages\x12\x46\n\tlanguages\x18\x01 \x03(\x0b\x32\x33.google.cloud.translation.v3beta1.SupportedLanguage"p\n\x11SupportedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x16\n\x0esupport_source\x18\x03 \x01(\x08\x12\x16\n\x0esupport_target\x18\x04 \x01(\x08"#\n\tGcsSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02"r\n\x0bInputConfig\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\ngcs_source\x18\x02 \x01(\x0b\x32+.google.cloud.translation.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02"j\n\x0cOutputConfig\x12K\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x30.google.cloud.translation.v3beta1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xa6\x06\n\x19\x42\x61tchTranslateTextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\\\n\x06models\x18\x04 \x03(\x0b\x32G.google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntryB\x03\xe0\x41\x01\x12I\n\rinput_configs\x18\x05 \x03(\x0b\x32-.google.cloud.translation.v3beta1.InputConfigB\x03\xe0\x41\x02\x12J\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.translation.v3beta1.OutputConfigB\x03\xe0\x41\x02\x12\x64\n\nglossaries\x18\x07 \x03(\x0b\x32K.google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntryB\x03\xe0\x41\x01\x12\\\n\x06labels\x18\t \x03(\x0b\x32G.google.cloud.translation.v3beta1.BatchTranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ap\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12L\n\x05value\x18\x02 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xd3\x02\n\x16\x42\x61tchTranslateMetadata\x12M\n\x05state\x18\x01 \x01(\x0e\x32>.google.cloud.translation.v3beta1.BatchTranslateMetadata.State\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12\x18\n\x10total_characters\x18\x04 \x01(\x03\x12/\n\x0bsubmit_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\xcb\x01\n\x16\x42\x61tchTranslateResponse\x12\x18\n\x10total_characters\x18\x01 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12/\n\x0bsubmit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"b\n\x13GlossaryInputConfig\x12\x41\n\ngcs_source\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"\x8e\x05\n\x08Glossary\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12T\n\rlanguage_pair\x18\x03 \x01(\x0b\x32;.google.cloud.translation.v3beta1.Glossary.LanguageCodePairH\x00\x12Y\n\x12language_codes_set\x18\x04 \x01(\x0b\x32;.google.cloud.translation.v3beta1.Glossary.LanguageCodesSetH\x00\x12K\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.translation.v3beta1.GlossaryInputConfig\x12\x18\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aN\n\x10LanguageCodePair\x12\x1c\n\x14source_language_code\x18\x01 \x01(\t\x12\x1c\n\x14target_language_code\x18\x02 \x01(\t\x1a*\n\x10LanguageCodesSet\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t:e\xea\x41\x62\n!translate.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}B\x0b\n\tlanguages"\x95\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x41\n\x08glossary\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3beta1.GlossaryB\x03\xe0\x41\x02"M\n\x12GetGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary"P\n\x15\x44\x65leteGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary"\x98\x01\n\x15ListGlossariesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01"q\n\x16ListGlossariesResponse\x12>\n\nglossaries\x18\x01 \x03(\x0b\x32*.google.cloud.translation.v3beta1.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8d\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x05state\x18\x02 \x01(\x0e\x32>.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x8d\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x05state\x18\x02 \x01(\x0e\x32>.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x85\x01\n\x16\x44\x65leteGlossaryResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\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.Timestamp2\x9a\x10\n\x12TranslationService\x12\xf4\x01\n\rTranslateText\x12\x36.google.cloud.translation.v3beta1.TranslateTextRequest\x1a\x37.google.cloud.translation.v3beta1.TranslateTextResponse"r\x82\xd3\xe4\x93\x02l"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*Z/"*/v3beta1/{parent=projects/*}:translateText:\x01*\x12\x93\x02\n\x0e\x44\x65tectLanguage\x12\x37.google.cloud.translation.v3beta1.DetectLanguageRequest\x1a\x38.google.cloud.translation.v3beta1.DetectLanguageResponse"\x8d\x01\x82\xd3\xe4\x93\x02n"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*Z0"+/v3beta1/{parent=projects/*}:detectLanguage:\x01*\xda\x41\x16parent,model,mime_type\x12\xab\x02\n\x15GetSupportedLanguages\x12>.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest\x1a\x34.google.cloud.translation.v3beta1.SupportedLanguages"\x9b\x01\x82\xd3\xe4\x93\x02p\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguagesZ1\x12//v3beta1/{parent=projects/*}/supportedLanguages\xda\x41"parent,display_language_code,model\x12\xeb\x01\n\x12\x42\x61tchTranslateText\x12;.google.cloud.translation.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"y\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\xca\x41\x30\n\x16\x42\x61tchTranslateResponse\x12\x16\x42\x61tchTranslateMetadata\x12\xe6\x01\n\x0e\x43reateGlossary\x12\x37.google.cloud.translation.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"|\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\xda\x41\x0fparent,glossary\xca\x41"\n\x08Glossary\x12\x16\x43reateGlossaryMetadata\x12\xd9\x01\n\x0eListGlossaries\x12\x37.google.cloud.translation.v3beta1.ListGlossariesRequest\x1a\x38.google.cloud.translation.v3beta1.ListGlossariesResponse"T\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\xda\x41\x06parent\xda\x41\rparent,filter\x12\xb3\x01\n\x0bGetGlossary\x12\x34.google.cloud.translation.v3beta1.GetGlossaryRequest\x1a*.google.cloud.translation.v3beta1.Glossary"B\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\xda\x41\x04name\x12\xdf\x01\n\x0e\x44\x65leteGlossary\x12\x37.google.cloud.translation.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation"u\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}\xda\x41\x04name\xca\x41\x30\n\x16\x44\x65leteGlossaryResponse\x12\x16\x44\x65leteGlossaryMetadata\x1a~\xca\x41\x18translate.googleapis.com\xd2\x41`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translationB\xf1\x01\n"com.google.cloud.translate.v3beta1B\x17TranslationServiceProtoP\x01ZGgoogle.golang.org/genproto/googleapis/cloud/translate/v3beta1;translate\xf8\x01\x01\xaa\x02\x1eGoogle.Cloud.Translate.V3Beta1\xca\x02\x1eGoogle\\Cloud\\Translate\\V3beta1\xea\x02!Google::Cloud::Translate::V3beta1b\x06proto3' - ), + serialized_options=b'\n"com.google.cloud.translate.v3beta1B\027TranslationServiceProtoP\001ZGgoogle.golang.org/genproto/googleapis/cloud/translate/v3beta1;translate\370\001\001\252\002\036Google.Cloud.Translate.V3Beta1\312\002\036Google\\Cloud\\Translate\\V3beta1\352\002!Google::Cloud::Translate::V3beta1', + create_key=_descriptor._internal_create_key, + serialized_pb=b'\n>google/cloud/translate_v3beta1/proto/translation_service.proto\x12 google.cloud.translation.v3beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"N\n\x1bTranslateTextGlossaryConfig\x12\x15\n\x08glossary\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bignore_case\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01"\xbf\x03\n\x14TranslateTextRequest\x12\x15\n\x08\x63ontents\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14source_language_code\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12!\n\x14target_language_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06parent\x18\x08 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12[\n\x0fglossary_config\x18\x07 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfigB\x03\xe0\x41\x01\x12W\n\x06labels\x18\n \x03(\x0b\x32\x42.google.cloud.translation.v3beta1.TranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xaa\x01\n\x15TranslateTextResponse\x12\x43\n\x0ctranslations\x18\x01 \x03(\x0b\x32-.google.cloud.translation.v3beta1.Translation\x12L\n\x15glossary_translations\x18\x03 \x03(\x0b\x32-.google.cloud.translation.v3beta1.Translation"\xad\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x1e\n\x16\x64\x65tected_language_code\x18\x04 \x01(\t\x12V\n\x0fglossary_config\x18\x03 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig"\x9f\x02\n\x15\x44\x65tectLanguageRequest\x12\x39\n\x06parent\x18\x05 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x12\n\x05model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x16\n\tmime_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12S\n\x06labels\x18\x06 \x03(\x0b\x32\x43.google.cloud.translation.v3beta1.DetectLanguageRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source"=\n\x10\x44\x65tectedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x12\n\nconfidence\x18\x02 \x01(\x02"_\n\x16\x44\x65tectLanguageResponse\x12\x45\n\tlanguages\x18\x01 \x03(\x0b\x32\x32.google.cloud.translation.v3beta1.DetectedLanguage"\x91\x01\n\x1cGetSupportedLanguagesRequest\x12\x39\n\x06parent\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12"\n\x15\x64isplay_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05model\x18\x02 \x01(\tB\x03\xe0\x41\x01"\\\n\x12SupportedLanguages\x12\x46\n\tlanguages\x18\x01 \x03(\x0b\x32\x33.google.cloud.translation.v3beta1.SupportedLanguage"p\n\x11SupportedLanguage\x12\x15\n\rlanguage_code\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x16\n\x0esupport_source\x18\x03 \x01(\x08\x12\x16\n\x0esupport_target\x18\x04 \x01(\x08"#\n\tGcsSource\x12\x16\n\tinput_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02"r\n\x0bInputConfig\x12\x16\n\tmime_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\ngcs_source\x18\x02 \x01(\x0b\x32+.google.cloud.translation.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"0\n\x0eGcsDestination\x12\x1e\n\x11output_uri_prefix\x18\x01 \x01(\tB\x03\xe0\x41\x02"j\n\x0cOutputConfig\x12K\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x30.google.cloud.translation.v3beta1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xa6\x06\n\x19\x42\x61tchTranslateTextRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12!\n\x14source_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12"\n\x15target_language_codes\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12\\\n\x06models\x18\x04 \x03(\x0b\x32G.google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntryB\x03\xe0\x41\x01\x12I\n\rinput_configs\x18\x05 \x03(\x0b\x32-.google.cloud.translation.v3beta1.InputConfigB\x03\xe0\x41\x02\x12J\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.translation.v3beta1.OutputConfigB\x03\xe0\x41\x02\x12\x64\n\nglossaries\x18\x07 \x03(\x0b\x32K.google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntryB\x03\xe0\x41\x01\x12\\\n\x06labels\x18\t \x03(\x0b\x32G.google.cloud.translation.v3beta1.BatchTranslateTextRequest.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1ap\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12L\n\x05value\x18\x02 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xd3\x02\n\x16\x42\x61tchTranslateMetadata\x12M\n\x05state\x18\x01 \x01(\x0e\x32>.google.cloud.translation.v3beta1.BatchTranslateMetadata.State\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12\x18\n\x10total_characters\x18\x04 \x01(\x03\x12/\n\x0bsubmit_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\xcb\x01\n\x16\x42\x61tchTranslateResponse\x12\x18\n\x10total_characters\x18\x01 \x01(\x03\x12\x1d\n\x15translated_characters\x18\x02 \x01(\x03\x12\x19\n\x11\x66\x61iled_characters\x18\x03 \x01(\x03\x12/\n\x0bsubmit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"b\n\x13GlossaryInputConfig\x12\x41\n\ngcs_source\x18\x01 \x01(\x0b\x32+.google.cloud.translation.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"\x8e\x05\n\x08Glossary\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12T\n\rlanguage_pair\x18\x03 \x01(\x0b\x32;.google.cloud.translation.v3beta1.Glossary.LanguageCodePairH\x00\x12Y\n\x12language_codes_set\x18\x04 \x01(\x0b\x32;.google.cloud.translation.v3beta1.Glossary.LanguageCodesSetH\x00\x12K\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x35.google.cloud.translation.v3beta1.GlossaryInputConfig\x12\x18\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1aN\n\x10LanguageCodePair\x12\x1c\n\x14source_language_code\x18\x01 \x01(\t\x12\x1c\n\x14target_language_code\x18\x02 \x01(\t\x1a*\n\x10LanguageCodesSet\x12\x16\n\x0elanguage_codes\x18\x01 \x03(\t:e\xea\x41\x62\n!translate.googleapis.com/Glossary\x12=projects/{project}/locations/{location}/glossaries/{glossary}B\x0b\n\tlanguages"\x95\x01\n\x15\x43reateGlossaryRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x41\n\x08glossary\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3beta1.GlossaryB\x03\xe0\x41\x02"M\n\x12GetGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary"P\n\x15\x44\x65leteGlossaryRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!translate.googleapis.com/Glossary"\x98\x01\n\x15ListGlossariesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01"q\n\x16ListGlossariesResponse\x12>\n\nglossaries\x18\x01 \x03(\x0b\x32*.google.cloud.translation.v3beta1.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8d\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x05state\x18\x02 \x01(\x0e\x32>.google.cloud.translation.v3beta1.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x8d\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\x05state\x18\x02 \x01(\x0e\x32>.google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"e\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x85\x01\n\x16\x44\x65leteGlossaryResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\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.Timestamp2\x9a\x10\n\x12TranslationService\x12\xf4\x01\n\rTranslateText\x12\x36.google.cloud.translation.v3beta1.TranslateTextRequest\x1a\x37.google.cloud.translation.v3beta1.TranslateTextResponse"r\x82\xd3\xe4\x93\x02l"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*Z/"*/v3beta1/{parent=projects/*}:translateText:\x01*\x12\x93\x02\n\x0e\x44\x65tectLanguage\x12\x37.google.cloud.translation.v3beta1.DetectLanguageRequest\x1a\x38.google.cloud.translation.v3beta1.DetectLanguageResponse"\x8d\x01\x82\xd3\xe4\x93\x02n"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*Z0"+/v3beta1/{parent=projects/*}:detectLanguage:\x01*\xda\x41\x16parent,model,mime_type\x12\xab\x02\n\x15GetSupportedLanguages\x12>.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest\x1a\x34.google.cloud.translation.v3beta1.SupportedLanguages"\x9b\x01\x82\xd3\xe4\x93\x02p\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguagesZ1\x12//v3beta1/{parent=projects/*}/supportedLanguages\xda\x41"parent,display_language_code,model\x12\xeb\x01\n\x12\x42\x61tchTranslateText\x12;.google.cloud.translation.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"y\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\xca\x41\x30\n\x16\x42\x61tchTranslateResponse\x12\x16\x42\x61tchTranslateMetadata\x12\xe6\x01\n\x0e\x43reateGlossary\x12\x37.google.cloud.translation.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"|\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\xda\x41\x0fparent,glossary\xca\x41"\n\x08Glossary\x12\x16\x43reateGlossaryMetadata\x12\xd9\x01\n\x0eListGlossaries\x12\x37.google.cloud.translation.v3beta1.ListGlossariesRequest\x1a\x38.google.cloud.translation.v3beta1.ListGlossariesResponse"T\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\xda\x41\x06parent\xda\x41\rparent,filter\x12\xb3\x01\n\x0bGetGlossary\x12\x34.google.cloud.translation.v3beta1.GetGlossaryRequest\x1a*.google.cloud.translation.v3beta1.Glossary"B\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\xda\x41\x04name\x12\xdf\x01\n\x0e\x44\x65leteGlossary\x12\x37.google.cloud.translation.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation"u\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}\xda\x41\x04name\xca\x41\x30\n\x16\x44\x65leteGlossaryResponse\x12\x16\x44\x65leteGlossaryMetadata\x1a~\xca\x41\x18translate.googleapis.com\xd2\x41`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translationB\xf1\x01\n"com.google.cloud.translate.v3beta1B\x17TranslationServiceProtoP\x01ZGgoogle.golang.org/genproto/googleapis/cloud/translate/v3beta1;translate\xf8\x01\x01\xaa\x02\x1eGoogle.Cloud.Translate.V3Beta1\xca\x02\x1eGoogle\\Cloud\\Translate\\V3beta1\xea\x02!Google::Cloud::Translate::V3beta1b\x06proto3', dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, @@ -51,6 +45,7 @@ full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -58,27 +53,53 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=1, number=1, serialized_options=None, type=None + name="RUNNING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILED", index=3, number=3, serialized_options=None, type=None + name="FAILED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLING", index=4, number=4, serialized_options=None, type=None + name="CANCELLING", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=5, number=5, serialized_options=None, type=None + name="CANCELLED", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=3331, - serialized_end=3432, + serialized_start=3329, + serialized_end=3430, ) _sym_db.RegisterEnumDescriptor(_BATCHTRANSLATEMETADATA_STATE) @@ -87,6 +108,7 @@ full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -94,27 +116,53 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=1, number=1, serialized_options=None, type=None + name="RUNNING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILED", index=3, number=3, serialized_options=None, type=None + name="FAILED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLING", index=4, number=4, serialized_options=None, type=None + name="CANCELLING", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=5, number=5, serialized_options=None, type=None + name="CANCELLED", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=3331, - serialized_end=3432, + serialized_start=3329, + serialized_end=3430, ) _sym_db.RegisterEnumDescriptor(_CREATEGLOSSARYMETADATA_STATE) @@ -123,6 +171,7 @@ full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State", filename=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, values=[ _descriptor.EnumValueDescriptor( name="STATE_UNSPECIFIED", @@ -130,27 +179,53 @@ number=0, serialized_options=None, type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="RUNNING", index=1, number=1, serialized_options=None, type=None + name="RUNNING", + index=1, + number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", + index=2, + number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="FAILED", index=3, number=3, serialized_options=None, type=None + name="FAILED", + index=3, + number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLING", index=4, number=4, serialized_options=None, type=None + name="CANCELLING", + index=4, + number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), _descriptor.EnumValueDescriptor( - name="CANCELLED", index=5, number=5, serialized_options=None, type=None + name="CANCELLED", + index=5, + number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key, ), ], containing_type=None, serialized_options=None, - serialized_start=3331, - serialized_end=3432, + serialized_start=3329, + serialized_end=3430, ) _sym_db.RegisterEnumDescriptor(_DELETEGLOSSARYMETADATA_STATE) @@ -161,6 +236,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="glossary", @@ -171,14 +247,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="ignore_case", @@ -195,8 +272,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -207,8 +285,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=287, - serialized_end=365, + serialized_start=285, + serialized_end=363, ) @@ -218,6 +296,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -228,7 +307,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -236,6 +315,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -246,7 +326,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -254,18 +334,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=770, - serialized_end=815, + serialized_start=768, + serialized_end=813, ) _TRANSLATETEXTREQUEST = _descriptor.Descriptor( @@ -274,6 +355,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="contents", @@ -290,8 +372,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mime_type", @@ -302,14 +385,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source_language_code", @@ -320,14 +404,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="target_language_code", @@ -338,14 +423,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="parent", @@ -356,16 +442,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -376,14 +461,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossary_config", @@ -400,8 +486,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -418,20 +505,21 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_TRANSLATETEXTREQUEST_LABELSENTRY], + nested_types=[_TRANSLATETEXTREQUEST_LABELSENTRY,], enum_types=[], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=368, - serialized_end=815, + serialized_start=366, + serialized_end=813, ) @@ -441,6 +529,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="translations", @@ -459,6 +548,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossary_translations", @@ -477,6 +567,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -487,8 +578,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=818, - serialized_end=988, + serialized_start=816, + serialized_end=986, ) @@ -498,6 +589,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="translated_text", @@ -508,7 +600,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -516,6 +608,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -526,7 +619,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -534,6 +627,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="detected_language_code", @@ -544,7 +638,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -552,6 +646,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossary_config", @@ -570,6 +665,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -580,8 +676,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=991, - serialized_end=1164, + serialized_start=989, + serialized_end=1162, ) @@ -591,6 +687,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -601,7 +698,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -609,6 +706,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -619,7 +717,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -627,18 +725,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=770, - serialized_end=815, + serialized_start=768, + serialized_end=813, ) _DETECTLANGUAGEREQUEST = _descriptor.Descriptor( @@ -647,6 +746,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -657,16 +757,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -677,14 +776,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="content", @@ -695,7 +795,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -703,6 +803,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="mime_type", @@ -713,14 +814,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -739,10 +841,11 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_DETECTLANGUAGEREQUEST_LABELSENTRY], + nested_types=[_DETECTLANGUAGEREQUEST_LABELSENTRY,], enum_types=[], serialized_options=None, is_extendable=False, @@ -754,11 +857,12 @@ full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=1167, - serialized_end=1454, + serialized_start=1165, + serialized_end=1452, ) @@ -768,6 +872,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_code", @@ -778,7 +883,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -786,6 +891,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="confidence", @@ -804,6 +910,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -814,8 +921,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1456, - serialized_end=1517, + serialized_start=1454, + serialized_end=1515, ) @@ -825,6 +932,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="languages", @@ -843,7 +951,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -853,8 +962,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1519, - serialized_end=1614, + serialized_start=1517, + serialized_end=1612, ) @@ -864,6 +973,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -874,16 +984,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_language_code", @@ -894,14 +1003,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="model", @@ -912,14 +1022,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -930,8 +1041,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1617, - serialized_end=1762, + serialized_start=1615, + serialized_end=1760, ) @@ -941,6 +1052,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="languages", @@ -959,7 +1071,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -969,8 +1082,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1764, - serialized_end=1856, + serialized_start=1762, + serialized_end=1854, ) @@ -980,6 +1093,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_code", @@ -990,7 +1104,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -998,6 +1112,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="display_name", @@ -1008,7 +1123,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1016,6 +1131,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="support_source", @@ -1034,6 +1150,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="support_target", @@ -1052,6 +1169,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1062,8 +1180,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1858, - serialized_end=1970, + serialized_start=1856, + serialized_end=1968, ) @@ -1073,6 +1191,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="input_uri", @@ -1083,15 +1202,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1101,8 +1221,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1972, - serialized_end=2007, + serialized_start=1970, + serialized_end=2005, ) @@ -1112,6 +1232,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="mime_type", @@ -1122,14 +1243,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="gcs_source", @@ -1148,6 +1270,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1163,11 +1286,12 @@ full_name="google.cloud.translation.v3beta1.InputConfig.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=2009, - serialized_end=2123, + serialized_start=2007, + serialized_end=2121, ) @@ -1177,6 +1301,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="output_uri_prefix", @@ -1187,15 +1312,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1205,8 +1331,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2125, - serialized_end=2173, + serialized_start=2123, + serialized_end=2171, ) @@ -1216,6 +1342,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", @@ -1234,7 +1361,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1249,11 +1377,12 @@ full_name="google.cloud.translation.v3beta1.OutputConfig.destination", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=2175, - serialized_end=2281, + serialized_start=2173, + serialized_end=2279, ) @@ -1263,6 +1392,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1273,7 +1403,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1281,6 +1411,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1291,7 +1422,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1299,18 +1430,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2884, - serialized_end=2929, + serialized_start=2882, + serialized_end=2927, ) _BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY = _descriptor.Descriptor( @@ -1319,6 +1451,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1329,7 +1462,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1337,6 +1470,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1355,18 +1489,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2931, - serialized_end=3043, + serialized_start=2929, + serialized_end=3041, ) _BATCHTRANSLATETEXTREQUEST_LABELSENTRY = _descriptor.Descriptor( @@ -1375,6 +1510,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="key", @@ -1385,7 +1521,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1393,6 +1529,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="value", @@ -1403,7 +1540,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1411,18 +1548,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=b"8\001", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=770, - serialized_end=815, + serialized_start=768, + serialized_end=813, ) _BATCHTRANSLATETEXTREQUEST = _descriptor.Descriptor( @@ -1431,6 +1569,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -1441,16 +1580,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="source_language_code", @@ -1461,14 +1599,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="target_language_codes", @@ -1485,8 +1624,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="models", @@ -1503,8 +1643,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_configs", @@ -1521,8 +1662,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="output_config", @@ -1539,8 +1681,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossaries", @@ -1557,8 +1700,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="labels", @@ -1575,8 +1719,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1591,8 +1736,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2284, - serialized_end=3090, + serialized_start=2282, + serialized_end=3088, ) @@ -1602,6 +1747,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="state", @@ -1620,6 +1766,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="translated_characters", @@ -1638,6 +1785,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="failed_characters", @@ -1656,6 +1804,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="total_characters", @@ -1674,6 +1823,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -1692,18 +1842,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_BATCHTRANSLATEMETADATA_STATE], + enum_types=[_BATCHTRANSLATEMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3093, - serialized_end=3432, + serialized_start=3091, + serialized_end=3430, ) @@ -1713,6 +1864,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="total_characters", @@ -1731,6 +1883,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="translated_characters", @@ -1749,6 +1902,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="failed_characters", @@ -1767,6 +1921,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -1785,6 +1940,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -1803,6 +1959,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1813,8 +1970,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3435, - serialized_end=3638, + serialized_start=3433, + serialized_end=3636, ) @@ -1824,6 +1981,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="gcs_source", @@ -1842,7 +2000,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1857,11 +2016,12 @@ full_name="google.cloud.translation.v3beta1.GlossaryInputConfig.source", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=3640, - serialized_end=3738, + serialized_start=3638, + serialized_end=3736, ) @@ -1871,6 +2031,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="source_language_code", @@ -1881,7 +2042,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1889,6 +2050,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="target_language_code", @@ -1899,7 +2061,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -1907,6 +2069,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -1917,8 +2080,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4157, - serialized_end=4235, + serialized_start=4155, + serialized_end=4233, ) _GLOSSARY_LANGUAGECODESSET = _descriptor.Descriptor( @@ -1927,6 +2090,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="language_codes", @@ -1945,7 +2109,8 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -1955,8 +2120,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4237, - serialized_end=4279, + serialized_start=4235, + serialized_end=4277, ) _GLOSSARY = _descriptor.Descriptor( @@ -1965,6 +2130,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -1975,14 +2141,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_pair", @@ -2001,6 +2168,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="language_codes_set", @@ -2019,6 +2187,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="input_config", @@ -2037,6 +2206,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="entry_count", @@ -2053,8 +2223,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -2071,8 +2242,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -2089,16 +2261,15 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\003"), + serialized_options=b"\340A\003", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], - nested_types=[_GLOSSARY_LANGUAGECODEPAIR, _GLOSSARY_LANGUAGECODESSET], + nested_types=[_GLOSSARY_LANGUAGECODEPAIR, _GLOSSARY_LANGUAGECODESSET,], enum_types=[], - serialized_options=_b( - "\352Ab\n!translate.googleapis.com/Glossary\022=projects/{project}/locations/{location}/glossaries/{glossary}" - ), + serialized_options=b"\352Ab\n!translate.googleapis.com/Glossary\022=projects/{project}/locations/{location}/glossaries/{glossary}", is_extendable=False, syntax="proto3", extension_ranges=[], @@ -2108,11 +2279,12 @@ full_name="google.cloud.translation.v3beta1.Glossary.languages", index=0, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[], - ) + ), ], - serialized_start=3741, - serialized_end=4395, + serialized_start=3739, + serialized_end=4393, ) @@ -2122,6 +2294,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -2132,16 +2305,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="glossary", @@ -2158,8 +2330,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\002"), + serialized_options=b"\340A\002", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2170,8 +2343,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4398, - serialized_end=4547, + serialized_start=4396, + serialized_end=4545, ) @@ -2181,6 +2354,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2191,17 +2365,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!translate.googleapis.com/Glossary" - ), + serialized_options=b"\340A\002\372A#\n!translate.googleapis.com/Glossary", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2211,8 +2384,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4549, - serialized_end=4626, + serialized_start=4547, + serialized_end=4624, ) @@ -2222,6 +2395,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2232,17 +2406,16 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!translate.googleapis.com/Glossary" - ), + serialized_options=b"\340A\002\372A#\n!translate.googleapis.com/Glossary", file=DESCRIPTOR, - ) + create_key=_descriptor._internal_create_key, + ), ], extensions=[], nested_types=[], @@ -2252,8 +2425,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4628, - serialized_end=4708, + serialized_start=4626, + serialized_end=4706, ) @@ -2263,6 +2436,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="parent", @@ -2273,16 +2447,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b( - "\340A\002\372A#\n!locations.googleapis.com/Location" - ), + serialized_options=b"\340A\002\372A#\n!locations.googleapis.com/Location", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_size", @@ -2299,8 +2472,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="page_token", @@ -2311,14 +2485,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="filter", @@ -2329,14 +2504,15 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\340A\001"), + serialized_options=b"\340A\001", file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2347,8 +2523,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4711, - serialized_end=4863, + serialized_start=4709, + serialized_end=4861, ) @@ -2358,6 +2534,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="glossaries", @@ -2376,6 +2553,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="next_page_token", @@ -2386,7 +2564,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2394,6 +2572,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2404,8 +2583,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4865, - serialized_end=4978, + serialized_start=4863, + serialized_end=4976, ) @@ -2415,6 +2594,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2425,7 +2605,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2433,6 +2613,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="state", @@ -2451,6 +2632,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -2469,18 +2651,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_CREATEGLOSSARYMETADATA_STATE], + enum_types=[_CREATEGLOSSARYMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4981, - serialized_end=5250, + serialized_start=4979, + serialized_end=5248, ) @@ -2490,6 +2673,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2500,7 +2684,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2508,6 +2692,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="state", @@ -2526,6 +2711,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -2544,18 +2730,19 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], - enum_types=[_DELETEGLOSSARYMETADATA_STATE], + enum_types=[_DELETEGLOSSARYMETADATA_STATE,], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5253, - serialized_end=5522, + serialized_start=5251, + serialized_end=5520, ) @@ -2565,6 +2752,7 @@ filename=None, file=DESCRIPTOR, containing_type=None, + create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="name", @@ -2575,7 +2763,7 @@ cpp_type=9, label=1, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -2583,6 +2771,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="submit_time", @@ -2601,6 +2790,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="end_time", @@ -2619,6 +2809,7 @@ extension_scope=None, serialized_options=None, file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, ), ], extensions=[], @@ -2629,8 +2820,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5525, - serialized_end=5658, + serialized_start=5523, + serialized_end=5656, ) _TRANSLATETEXTREQUEST_LABELSENTRY.containing_type = _TRANSLATETEXTREQUEST @@ -2793,12 +2984,11 @@ TranslateTextGlossaryConfig = _reflection.GeneratedProtocolMessageType( "TranslateTextGlossaryConfig", (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATETEXTGLOSSARYCONFIG, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Configures which glossary should be used for a specific - target language, and defines options for applying that glossary. - + { + "DESCRIPTOR": _TRANSLATETEXTGLOSSARYCONFIG, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Configures which glossary should be used for a specific target + language, and defines options for applying that glossary. Attributes: glossary: @@ -2809,27 +2999,26 @@ is false if missing. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextGlossaryConfig) - ), + }, ) _sym_db.RegisterMessage(TranslateTextGlossaryConfig) TranslateTextRequest = _reflection.GeneratedProtocolMessageType( "TranslateTextRequest", (_message.Message,), - dict( - LabelsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATETEXTREQUEST_LABELSENTRY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + { + "DESCRIPTOR": _TRANSLATETEXTREQUEST_LABELSENTRY, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextRequest.LabelsEntry) - ), + }, ), - DESCRIPTOR=_TRANSLATETEXTREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The request message for synchronous translation. - + "DESCRIPTOR": _TRANSLATETEXTREQUEST, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The request message for synchronous translation. Attributes: contents: @@ -2838,12 +3027,12 @@ BatchTranslateText for larger text. mime_type: Optional. The format of the source text, for example, - "text/html", "text/plain". If left blank, the MIME type - defaults to "text/html". + “text/html”, “text/plain”. If left blank, the MIME type + defaults to “text/html”. source_language_code: Optional. The BCP-47 language code of the input text if known, - for example, "en-US" or "sr-Latn". Supported language codes - are listed in Language Support. If the source language isn't + for example, “en-US” or “sr-Latn”. Supported language codes + are listed in Language Support. If the source language isn’t specified, the API attempts to identify the source language automatically and returns the source language within the response. @@ -2853,13 +3042,13 @@ Language Support. parent: Required. Project or location to make a call. Must refer to a - caller's project. Format: ``projects/{project-id}`` or + caller’s project. Format: ``projects/{project-id}`` or ``projects/{project-id}/locations/{location-id}``. For global calls, use ``projects/{project-id}/locations/global`` or ``projects/{project-id}``. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same - location-id), otherwise an INVALID\_ARGUMENT (400) error is + location-id), otherwise an INVALID_ARGUMENT (400) error is returned. model: Optional. The ``model`` type requested for this translation. @@ -2876,7 +3065,7 @@ glossary_config: Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, - otherwise an INVALID\_ARGUMENT (400) error is returned. + otherwise an INVALID_ARGUMENT (400) error is returned. labels: Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 @@ -2888,7 +3077,7 @@ information. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextRequest) - ), + }, ) _sym_db.RegisterMessage(TranslateTextRequest) _sym_db.RegisterMessage(TranslateTextRequest.LabelsEntry) @@ -2896,11 +3085,12 @@ TranslateTextResponse = _reflection.GeneratedProtocolMessageType( "TranslateTextResponse", (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATETEXTRESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__=""" - Attributes: + { + "DESCRIPTOR": _TRANSLATETEXTRESPONSE, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """ + + Attributes: translations: Text translation responses with no glossary applied. This field has the same length as [``contents``][google.cloud.trans @@ -2912,18 +3102,17 @@ no terms apply. This field has the same length as [``contents``][google.cloud.translation.v3beta1.TranslateTextRequest.contents]. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextResponse) - ), + }, ) _sym_db.RegisterMessage(TranslateTextResponse) Translation = _reflection.GeneratedProtocolMessageType( "Translation", (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATION, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""A single translation response. - + { + "DESCRIPTOR": _TRANSLATION, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """A single translation response. Attributes: translated_text: @@ -2941,37 +3130,36 @@ The ``glossary_config`` used for this translation. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Translation) - ), + }, ) _sym_db.RegisterMessage(Translation) DetectLanguageRequest = _reflection.GeneratedProtocolMessageType( "DetectLanguageRequest", (_message.Message,), - dict( - LabelsEntry=_reflection.GeneratedProtocolMessageType( + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_DETECTLANGUAGEREQUEST_LABELSENTRY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + { + "DESCRIPTOR": _DETECTLANGUAGEREQUEST_LABELSENTRY, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageRequest.LabelsEntry) - ), + }, ), - DESCRIPTOR=_DETECTLANGUAGEREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The request message for language detection. - + "DESCRIPTOR": _DETECTLANGUAGEREQUEST, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The request message for language detection. Attributes: parent: Required. Project or location to make a call. Must refer to a - caller's project. Format: ``projects/{project- + caller’s project. Format: ``projects/{project- id}/locations/{location-id}`` or ``projects/{project-id}``. For global calls, use ``projects/{project- id}/locations/global`` or ``projects/{project-id}``. Only models within the same region (has same location-id) can be - used. Otherwise an INVALID\_ARGUMENT (400) error is returned. + used. Otherwise an INVALID_ARGUMENT (400) error is returned. model: Optional. The language detection model to be used. Format: ``projects/{project-id}/locations/{location- @@ -2987,8 +3175,8 @@ The content of the input stored as a string. mime_type: Optional. The format of the source text, for example, - "text/html", "text/plain". If left blank, the MIME type - defaults to "text/html". + “text/html”, “text/plain”. If left blank, the MIME type + defaults to “text/html”. labels: Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 @@ -3000,7 +3188,7 @@ information. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageRequest) - ), + }, ) _sym_db.RegisterMessage(DetectLanguageRequest) _sym_db.RegisterMessage(DetectLanguageRequest.LabelsEntry) @@ -3008,11 +3196,10 @@ DetectedLanguage = _reflection.GeneratedProtocolMessageType( "DetectedLanguage", (_message.Message,), - dict( - DESCRIPTOR=_DETECTEDLANGUAGE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The response message for language detection. - + { + "DESCRIPTOR": _DETECTEDLANGUAGE, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The response message for language detection. Attributes: language_code: @@ -3022,18 +3209,17 @@ The confidence of the detection result for this language. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectedLanguage) - ), + }, ) _sym_db.RegisterMessage(DetectedLanguage) DetectLanguageResponse = _reflection.GeneratedProtocolMessageType( "DetectLanguageResponse", (_message.Message,), - dict( - DESCRIPTOR=_DETECTLANGUAGERESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The response message for language detection. - + { + "DESCRIPTOR": _DETECTLANGUAGERESPONSE, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The response message for language detection. Attributes: languages: @@ -3041,28 +3227,27 @@ descending order. The most probable language first. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageResponse) - ), + }, ) _sym_db.RegisterMessage(DetectLanguageResponse) GetSupportedLanguagesRequest = _reflection.GeneratedProtocolMessageType( "GetSupportedLanguagesRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETSUPPORTEDLANGUAGESREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The request message for discovering supported languages. - + { + "DESCRIPTOR": _GETSUPPORTEDLANGUAGESREQUEST, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The request message for discovering supported languages. Attributes: parent: Required. Project or location to make a call. Must refer to a - caller's project. Format: ``projects/{project-id}`` or + caller’s project. Format: ``projects/{project-id}`` or ``projects/{project-id}/locations/{location-id}``. For global calls, use ``projects/{project-id}/locations/global`` or ``projects/{project-id}``. Non-global location is required for AutoML models. Only models within the same region (have - same location-id) can be used, otherwise an INVALID\_ARGUMENT + same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. display_language_code: Optional. The language to use to return localized, human @@ -3080,18 +3265,17 @@ Google general base (PBMT) model. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetSupportedLanguagesRequest) - ), + }, ) _sym_db.RegisterMessage(GetSupportedLanguagesRequest) SupportedLanguages = _reflection.GeneratedProtocolMessageType( "SupportedLanguages", (_message.Message,), - dict( - DESCRIPTOR=_SUPPORTEDLANGUAGES, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The response message for discovering supported languages. - + { + "DESCRIPTOR": _SUPPORTEDLANGUAGES, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The response message for discovering supported languages. Attributes: languages: @@ -3099,26 +3283,25 @@ entry for each language the Translation API supports. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguages) - ), + }, ) _sym_db.RegisterMessage(SupportedLanguages) SupportedLanguage = _reflection.GeneratedProtocolMessageType( "SupportedLanguage", (_message.Message,), - dict( - DESCRIPTOR=_SUPPORTEDLANGUAGE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""A single supported language response corresponds to - information related to one supported language. - + { + "DESCRIPTOR": _SUPPORTEDLANGUAGE, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """A single supported language response corresponds to information + related to one supported language. Attributes: language_code: Supported language code, generally consisting of its ISO 639-1 - identifier, for example, 'en', 'ja'. In certain cases, BCP-47 + identifier, for example, ‘en’, ‘ja’. In certain cases, BCP-47 codes including language and region identifiers are returned - (for example, 'zh-TW' and 'zh-CN') + (for example, ‘zh-TW’ and ‘zh-CN’) display_name: Human readable name of the language localized in the display language specified in the request. @@ -3128,18 +3311,17 @@ Can be used as target language. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguage) - ), + }, ) _sym_db.RegisterMessage(SupportedLanguage) GcsSource = _reflection.GeneratedProtocolMessageType( "GcsSource", (_message.Message,), - dict( - DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The Google Cloud Storage location for the input content. - + { + "DESCRIPTOR": _GCSSOURCE, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The Google Cloud Storage location for the input content. Attributes: input_uri: @@ -3147,25 +3329,24 @@ ``gs://my_bucket/my_object``. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsSource) - ), + }, ) _sym_db.RegisterMessage(GcsSource) InputConfig = _reflection.GeneratedProtocolMessageType( "InputConfig", (_message.Message,), - dict( - DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Input configuration for BatchTranslateText request. - + { + "DESCRIPTOR": _INPUTCONFIG, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Input configuration for BatchTranslateText request. Attributes: mime_type: - Optional. Can be "text/plain" or "text/html". For ``.tsv``, - "text/html" is used if mime\_type is missing. For ``.html``, - this field must be "text/html" or empty. For ``.txt``, this - field must be "text/plain" or empty. + Optional. Can be “text/plain” or “text/html”. For ``.tsv``, + “text/html” is used if mime_type is missing. For ``.html``, + this field must be “text/html” or empty. For ``.txt``, this + field must be “text/plain” or empty. source: Required. Specify the input. gcs_source: @@ -3181,45 +3362,42 @@ Unicode codepoints, otherwise an error might be returned. Note that the input tsv must be RFC 4180 compliant. You could use https://github.com/Clever/csvlint to check potential - formatting errors in your tsv file. csvlint --delimiter=':raw- - latex:`\t`' your\_input\_file.tsv The other supported file + formatting errors in your tsv file. csvlint –delimiter=‘:raw- + latex:`\t`’ your_input_file.tsv The other supported file extensions are ``.txt`` or ``.html``, which is treated as a single large chunk of text. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.InputConfig) - ), + }, ) _sym_db.RegisterMessage(InputConfig) GcsDestination = _reflection.GeneratedProtocolMessageType( "GcsDestination", (_message.Message,), - dict( - DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The Google Cloud Storage location for the output content. - + { + "DESCRIPTOR": _GCSDESTINATION, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The Google Cloud Storage location for the output content. Attributes: output_uri_prefix: - Required. There must be no files under 'output\_uri\_prefix'. - 'output\_uri\_prefix' must end with "/" and start with - "gs://", otherwise an INVALID\_ARGUMENT (400) error is - returned. + Required. There must be no files under ‘output_uri_prefix’. + ‘output_uri_prefix’ must end with “/” and start with “gs://”, + otherwise an INVALID_ARGUMENT (400) error is returned. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsDestination) - ), + }, ) _sym_db.RegisterMessage(GcsDestination) OutputConfig = _reflection.GeneratedProtocolMessageType( "OutputConfig", (_message.Message,), - dict( - DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Output configuration for BatchTranslateText request. - + { + "DESCRIPTOR": _OUTPUTCONFIG, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Output configuration for BatchTranslateText request. Attributes: destination: @@ -3228,115 +3406,113 @@ Google Cloud Storage destination for output content. For every single input file (for example, gs://a/b/c.[extension]), we generate at most 2 \* n output files. (n is the # of - target\_language\_codes in the BatchTranslateTextRequest). + target_language_codes in the BatchTranslateTextRequest). Output files (tsv) generated are compliant with RFC 4180 except that record delimiters are ``\\\\n`` instead of - ``\\\\r\\\\n``. We don't provide any way to + ``\\\\r\\\\n``. We don’t provide any way to change record delimiters. While the input files are being - processed, we write/update an index file 'index.csv' under - 'output\_uri\_prefix' (for example, gs://translation- + processed, we write/update an index file ‘index.csv’ under + ‘output_uri_prefix’ (for example, gs://translation- test/index.csv) The index file is generated/updated as new - files are being translated. The format is: input\_file,target - \_language\_code,translations\_file,errors\_file, - glossary\_translations\_file,glossary\_errors\_file - input\_file is one file we matched using - gcs\_source.input\_uri. target\_language\_code is provided in - the request. translations\_file contains the translations. - (details provided below) errors\_file contains the errors - during processing of the file. (details below). Both - translations\_file and errors\_file could be empty strings if - we have no content to output. glossary\_translations\_file and - glossary\_errors\_file are always empty strings if the - input\_file is tsv. They could also be empty if we have no - content to output. Once a row is present in index.csv, the - input/output matching never changes. Callers should also - expect all the content in input\_file are processed and ready - to be consumed (that is, no partial output file is written). - The format of translations\_file (for target language code - 'trg') is: gs://translation\_test/a\_b\_c\_'trg'\_translations - .[extension] If the input file extension is tsv, the output - has the following columns: Column 1: ID of the request - provided in the input, if it's not provided in the input, then - the input row number is used (0-based). Column 2: source - sentence. Column 3: translation without applying a glossary. - Empty string if there is an error. Column 4 (only present if a - glossary is provided in the request): translation after - applying the glossary. Empty string if there is an error - applying the glossary. Could be same string as column 3 if - there is no glossary applied. If input file extension is a - txt or html, the translation is directly written to the output - file. If glossary is requested, a separate - glossary\_translations\_file has format of gs://translation\_t - est/a\_b\_c\_'trg'\_glossary\_translations.[extension] The - format of errors file (for target language code 'trg') is: - gs://translation\_test/a\_b\_c\_'trg'\_errors.[extension] If - the input file extension is tsv, errors\_file contains the + files are being translated. The format is: + input_file,target_language_code,translations_file,errors_file, + glossary_translations_file,glossary_errors_file input_file is + one file we matched using gcs_source.input_uri. + target_language_code is provided in the request. + translations_file contains the translations. (details provided + below) errors_file contains the errors during processing of + the file. (details below). Both translations_file and + errors_file could be empty strings if we have no content to + output. glossary_translations_file and glossary_errors_file + are always empty strings if the input_file is tsv. They could + also be empty if we have no content to output. Once a row is + present in index.csv, the input/output matching never changes. + Callers should also expect all the content in input_file are + processed and ready to be consumed (that is, no partial output + file is written). The format of translations_file (for target + language code ‘trg’) is: + gs://translation_test/a_b_c\_‘trg’\_translations.[extension] + If the input file extension is tsv, the output has the + following columns: Column 1: ID of the request provided in the + input, if it’s not provided in the input, then the input row + number is used (0-based). Column 2: source sentence. Column 3: + translation without applying a glossary. Empty string if there + is an error. Column 4 (only present if a glossary is provided + in the request): translation after applying the glossary. + Empty string if there is an error applying the glossary. Could + be same string as column 3 if there is no glossary applied. + If input file extension is a txt or html, the translation is + directly written to the output file. If glossary is requested, + a separate glossary_translations_file has format of gs://trans + lation_test/a_b_c\_‘trg’\_glossary_translations.[extension] + The format of errors file (for target language code ‘trg’) is: + gs://translation_test/a_b_c\_‘trg’\_errors.[extension] If the + input file extension is tsv, errors_file contains the following: Column 1: ID of the request provided in the input, - if it's not provided in the input, then the input row number + if it’s not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: Error detail for the translation. Could be empty. Column 4 (only present if a glossary is provided in the request): Error when applying the glossary. If the input file extension is txt or - html, glossary\_error\_file will be generated that contains - error details. glossary\_error\_file has format of gs://transl - ation\_test/a\_b\_c\_'trg'\_glossary\_errors.[extension] + html, glossary_error_file will be generated that contains + error details. glossary_error_file has format of gs://translat + ion_test/a_b_c\_‘trg’\_glossary_errors.[extension] """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.OutputConfig) - ), + }, ) _sym_db.RegisterMessage(OutputConfig) BatchTranslateTextRequest = _reflection.GeneratedProtocolMessageType( "BatchTranslateTextRequest", (_message.Message,), - dict( - ModelsEntry=_reflection.GeneratedProtocolMessageType( + { + "ModelsEntry": _reflection.GeneratedProtocolMessageType( "ModelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_MODELSENTRY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + { + "DESCRIPTOR": _BATCHTRANSLATETEXTREQUEST_MODELSENTRY, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry) - ), + }, ), - GlossariesEntry=_reflection.GeneratedProtocolMessageType( + "GlossariesEntry": _reflection.GeneratedProtocolMessageType( "GlossariesEntry", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + { + "DESCRIPTOR": _BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry) - ), + }, ), - LabelsEntry=_reflection.GeneratedProtocolMessageType( + "LabelsEntry": _reflection.GeneratedProtocolMessageType( "LabelsEntry", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_LABELSENTRY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + { + "DESCRIPTOR": _BATCHTRANSLATETEXTREQUEST_LABELSENTRY, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2" # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.LabelsEntry) - ), + }, ), - DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""The batch translation request. - + "DESCRIPTOR": _BATCHTRANSLATETEXTREQUEST, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """The batch translation request. Attributes: parent: - Required. Location to make a call. Must refer to a caller's + Required. Location to make a call. Must refer to a caller’s project. Format: ``projects/{project-id}/locations/{location- id}``. The ``global`` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be - used, otherwise an INVALID\_ARGUMENT (400) error is returned. + used, otherwise an INVALID_ARGUMENT (400) error is returned. source_language_code: Required. Source language code. target_language_codes: Required. Specify up to 10 language codes here. models: - Optional. The models to use for translation. Map's key is - target language code. Map's value is model name. Value can be + Optional. The models to use for translation. Map’s key is + target language code. Map’s value is model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: ``projects/{project-id}/locations/{location- @@ -3352,10 +3528,10 @@ 100M Unicode codepoints. The files must use UTF-8 encoding. output_config: Required. Output configuration. If 2 input configs match to - the same file (that is, same input path), we don't generate + the same file (that is, same input path), we don’t generate output for duplicate inputs. glossaries: - Optional. Glossaries to be applied for translation. It's keyed + Optional. Glossaries to be applied for translation. It’s keyed by target language code. labels: Optional. The labels with user-defined metadata for the @@ -3368,7 +3544,7 @@ information. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest) - ), + }, ) _sym_db.RegisterMessage(BatchTranslateTextRequest) _sym_db.RegisterMessage(BatchTranslateTextRequest.ModelsEntry) @@ -3378,11 +3554,10 @@ BatchTranslateMetadata = _reflection.GeneratedProtocolMessageType( "BatchTranslateMetadata", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATEMETADATA, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""State metadata for the batch translation operation. - + { + "DESCRIPTOR": _BATCHTRANSLATEMETADATA, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """State metadata for the batch translation operation. Attributes: state: @@ -3402,21 +3577,19 @@ Time when the operation was submitted. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateMetadata) - ), + }, ) _sym_db.RegisterMessage(BatchTranslateMetadata) BatchTranslateResponse = _reflection.GeneratedProtocolMessageType( "BatchTranslateResponse", (_message.Message,), - dict( - DESCRIPTOR=_BATCHTRANSLATERESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Stored in the - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field returned by BatchTranslateText if at least one sentence is - translated successfully. - + { + "DESCRIPTOR": _BATCHTRANSLATERESPONSE, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Stored in the [google.longrunning.Operation.response][google.longrunni + ng.Operation.response] field returned by BatchTranslateText if at + least one sentence is translated successfully. Attributes: total_characters: @@ -3435,18 +3608,17 @@ true. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateResponse) - ), + }, ) _sym_db.RegisterMessage(BatchTranslateResponse) GlossaryInputConfig = _reflection.GeneratedProtocolMessageType( "GlossaryInputConfig", (_message.Message,), - dict( - DESCRIPTOR=_GLOSSARYINPUTCONFIG, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Input configuration for glossaries. - + { + "DESCRIPTOR": _GLOSSARYINPUTCONFIG, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Input configuration for glossaries. Attributes: source: @@ -3454,7 +3626,7 @@ gcs_source: Required. Google Cloud Storage location of glossary data. File format is determined based on the filename extension. API - returns [google.rpc.Code.INVALID\_ARGUMENT] for unsupported + returns [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file formats. Wildcards are not allowed. This must be a single file in one of the following formats: For unidirectional glossaries: - TSV/CSV (``.tsv``/``.csv``): 2 @@ -3470,59 +3642,56 @@ google.com/translatortoolkit/answer/6306379?hl=en>`__. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GlossaryInputConfig) - ), + }, ) _sym_db.RegisterMessage(GlossaryInputConfig) Glossary = _reflection.GeneratedProtocolMessageType( "Glossary", (_message.Message,), - dict( - LanguageCodePair=_reflection.GeneratedProtocolMessageType( + { + "LanguageCodePair": _reflection.GeneratedProtocolMessageType( "LanguageCodePair", (_message.Message,), - dict( - DESCRIPTOR=_GLOSSARY_LANGUAGECODEPAIR, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Used with unidirectional glossaries. - + { + "DESCRIPTOR": _GLOSSARY_LANGUAGECODEPAIR, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Used with unidirectional glossaries. Attributes: source_language_code: Required. The BCP-47 language code of the input text, for - example, "en-US". Expected to be an exact match for - GlossaryTerm.language\_code. + example, “en-US”. Expected to be an exact match for + GlossaryTerm.language_code. target_language_code: Required. The BCP-47 language code for translation output, for - example, "zh-CN". Expected to be an exact match for - GlossaryTerm.language\_code. + example, “zh-CN”. Expected to be an exact match for + GlossaryTerm.language_code. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodePair) - ), + }, ), - LanguageCodesSet=_reflection.GeneratedProtocolMessageType( + "LanguageCodesSet": _reflection.GeneratedProtocolMessageType( "LanguageCodesSet", (_message.Message,), - dict( - DESCRIPTOR=_GLOSSARY_LANGUAGECODESSET, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Used with equivalent term set glossaries. - + { + "DESCRIPTOR": _GLOSSARY_LANGUAGECODESSET, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Used with equivalent term set glossaries. Attributes: language_codes: The BCP-47 language code(s) for terms defined in the glossary. All entries are unique. The list contains at least two entries. Expected to be an exact match for - GlossaryTerm.language\_code. + GlossaryTerm.language_code. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodesSet) - ), + }, ), - DESCRIPTOR=_GLOSSARY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Represents a glossary built from user provided data. - + "DESCRIPTOR": _GLOSSARY, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Represents a glossary built from user provided data. Attributes: name: @@ -3546,7 +3715,7 @@ Output only. When the glossary creation was finished. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary) - ), + }, ) _sym_db.RegisterMessage(Glossary) _sym_db.RegisterMessage(Glossary.LanguageCodePair) @@ -3555,11 +3724,10 @@ CreateGlossaryRequest = _reflection.GeneratedProtocolMessageType( "CreateGlossaryRequest", (_message.Message,), - dict( - DESCRIPTOR=_CREATEGLOSSARYREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Request message for CreateGlossary. - + { + "DESCRIPTOR": _CREATEGLOSSARYREQUEST, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Request message for CreateGlossary. Attributes: parent: @@ -3568,54 +3736,51 @@ Required. The glossary to create. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryRequest) - ), + }, ) _sym_db.RegisterMessage(CreateGlossaryRequest) GetGlossaryRequest = _reflection.GeneratedProtocolMessageType( "GetGlossaryRequest", (_message.Message,), - dict( - DESCRIPTOR=_GETGLOSSARYREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Request message for GetGlossary. - + { + "DESCRIPTOR": _GETGLOSSARYREQUEST, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Request message for GetGlossary. Attributes: name: Required. The name of the glossary to retrieve. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetGlossaryRequest) - ), + }, ) _sym_db.RegisterMessage(GetGlossaryRequest) DeleteGlossaryRequest = _reflection.GeneratedProtocolMessageType( "DeleteGlossaryRequest", (_message.Message,), - dict( - DESCRIPTOR=_DELETEGLOSSARYREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Request message for DeleteGlossary. - + { + "DESCRIPTOR": _DELETEGLOSSARYREQUEST, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Request message for DeleteGlossary. Attributes: name: Required. The name of the glossary to delete. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryRequest) - ), + }, ) _sym_db.RegisterMessage(DeleteGlossaryRequest) ListGlossariesRequest = _reflection.GeneratedProtocolMessageType( "ListGlossariesRequest", (_message.Message,), - dict( - DESCRIPTOR=_LISTGLOSSARIESREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Request message for ListGlossaries. - + { + "DESCRIPTOR": _LISTGLOSSARIESREQUEST, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Request message for ListGlossaries. Attributes: parent: @@ -3628,7 +3793,7 @@ page_token: Optional. A token identifying a page of results the server should return. Typically, this is the value of - [ListGlossariesResponse.next\_page\_token] returned from the + [ListGlossariesResponse.next_page_token] returned from the previous call to ``ListGlossaries`` method. The first page is returned if ``page_token``\ is empty or missing. filter: @@ -3637,43 +3802,40 @@ has no effect. If missing, no filtering is performed. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesRequest) - ), + }, ) _sym_db.RegisterMessage(ListGlossariesRequest) ListGlossariesResponse = _reflection.GeneratedProtocolMessageType( "ListGlossariesResponse", (_message.Message,), - dict( - DESCRIPTOR=_LISTGLOSSARIESRESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Response message for ListGlossaries. - + { + "DESCRIPTOR": _LISTGLOSSARIESRESPONSE, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Response message for ListGlossaries. Attributes: glossaries: The list of glossaries for a project. next_page_token: A token to retrieve a page of results. Pass this value in the - [ListGlossariesRequest.page\_token] field in the subsequent + [ListGlossariesRequest.page_token] field in the subsequent call to ``ListGlossaries`` method to retrieve the next page of results. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesResponse) - ), + }, ) _sym_db.RegisterMessage(ListGlossariesResponse) CreateGlossaryMetadata = _reflection.GeneratedProtocolMessageType( "CreateGlossaryMetadata", (_message.Message,), - dict( - DESCRIPTOR=_CREATEGLOSSARYMETADATA, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Stored in the - [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] - field returned by CreateGlossary. - + { + "DESCRIPTOR": _CREATEGLOSSARYMETADATA, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Stored in the [google.longrunning.Operation.metadata][google.longrunni + ng.Operation.metadata] field returned by CreateGlossary. Attributes: name: @@ -3684,20 +3846,18 @@ The time when the operation was submitted to the server. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryMetadata) - ), + }, ) _sym_db.RegisterMessage(CreateGlossaryMetadata) DeleteGlossaryMetadata = _reflection.GeneratedProtocolMessageType( "DeleteGlossaryMetadata", (_message.Message,), - dict( - DESCRIPTOR=_DELETEGLOSSARYMETADATA, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Stored in the - [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] - field returned by DeleteGlossary. - + { + "DESCRIPTOR": _DELETEGLOSSARYMETADATA, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Stored in the [google.longrunning.Operation.metadata][google.longrunni + ng.Operation.metadata] field returned by DeleteGlossary. Attributes: name: @@ -3708,20 +3868,18 @@ The time when the operation was submitted to the server. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryMetadata) - ), + }, ) _sym_db.RegisterMessage(DeleteGlossaryMetadata) DeleteGlossaryResponse = _reflection.GeneratedProtocolMessageType( "DeleteGlossaryResponse", (_message.Message,), - dict( - DESCRIPTOR=_DELETEGLOSSARYRESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", - __doc__="""Stored in the - [google.longrunning.Operation.response][google.longrunning.Operation.response] - field returned by DeleteGlossary. - + { + "DESCRIPTOR": _DELETEGLOSSARYRESPONSE, + "__module__": "google.cloud.translate_v3beta1.proto.translation_service_pb2", + "__doc__": """Stored in the [google.longrunning.Operation.response][google.longrunni + ng.Operation.response] field returned by DeleteGlossary. Attributes: name: @@ -3734,7 +3892,7 @@ is set to true. """, # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryResponse) - ), + }, ) _sym_db.RegisterMessage(DeleteGlossaryResponse) @@ -3791,11 +3949,10 @@ full_name="google.cloud.translation.v3beta1.TranslationService", file=DESCRIPTOR, index=0, - serialized_options=_b( - "\312A\030translate.googleapis.com\322A`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translation" - ), - serialized_start=5661, - serialized_end=7735, + serialized_options=b"\312A\030translate.googleapis.com\322A`https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-translation", + create_key=_descriptor._internal_create_key, + serialized_start=5659, + serialized_end=7733, methods=[ _descriptor.MethodDescriptor( name="TranslateText", @@ -3804,9 +3961,8 @@ containing_service=None, input_type=_TRANSLATETEXTREQUEST, output_type=_TRANSLATETEXTRESPONSE, - serialized_options=_b( - '\202\323\344\223\002l"6/v3beta1/{parent=projects/*/locations/*}:translateText:\001*Z/"*/v3beta1/{parent=projects/*}:translateText:\001*' - ), + serialized_options=b'\202\323\344\223\002l"6/v3beta1/{parent=projects/*/locations/*}:translateText:\001*Z/"*/v3beta1/{parent=projects/*}:translateText:\001*', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DetectLanguage", @@ -3815,9 +3971,8 @@ containing_service=None, input_type=_DETECTLANGUAGEREQUEST, output_type=_DETECTLANGUAGERESPONSE, - serialized_options=_b( - '\202\323\344\223\002n"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\001*Z0"+/v3beta1/{parent=projects/*}:detectLanguage:\001*\332A\026parent,model,mime_type' - ), + serialized_options=b'\202\323\344\223\002n"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\001*Z0"+/v3beta1/{parent=projects/*}:detectLanguage:\001*\332A\026parent,model,mime_type', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetSupportedLanguages", @@ -3826,9 +3981,8 @@ containing_service=None, input_type=_GETSUPPORTEDLANGUAGESREQUEST, output_type=_SUPPORTEDLANGUAGES, - serialized_options=_b( - '\202\323\344\223\002p\022;/v3beta1/{parent=projects/*/locations/*}/supportedLanguagesZ1\022//v3beta1/{parent=projects/*}/supportedLanguages\332A"parent,display_language_code,model' - ), + serialized_options=b'\202\323\344\223\002p\022;/v3beta1/{parent=projects/*/locations/*}/supportedLanguagesZ1\022//v3beta1/{parent=projects/*}/supportedLanguages\332A"parent,display_language_code,model', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="BatchTranslateText", @@ -3837,9 +3991,8 @@ containing_service=None, input_type=_BATCHTRANSLATETEXTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\001*\312A0\n\026BatchTranslateResponse\022\026BatchTranslateMetadata' - ), + serialized_options=b'\202\323\344\223\002@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\001*\312A0\n\026BatchTranslateResponse\022\026BatchTranslateMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="CreateGlossary", @@ -3848,9 +4001,8 @@ containing_service=None, input_type=_CREATEGLOSSARYREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - '\202\323\344\223\002?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\010glossary\332A\017parent,glossary\312A"\n\010Glossary\022\026CreateGlossaryMetadata' - ), + serialized_options=b'\202\323\344\223\002?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\010glossary\332A\017parent,glossary\312A"\n\010Glossary\022\026CreateGlossaryMetadata', + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="ListGlossaries", @@ -3859,9 +4011,8 @@ containing_service=None, input_type=_LISTGLOSSARIESREQUEST, output_type=_LISTGLOSSARIESRESPONSE, - serialized_options=_b( - "\202\323\344\223\0025\0223/v3beta1/{parent=projects/*/locations/*}/glossaries\332A\006parent\332A\rparent,filter" - ), + serialized_options=b"\202\323\344\223\0025\0223/v3beta1/{parent=projects/*/locations/*}/glossaries\332A\006parent\332A\rparent,filter", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="GetGlossary", @@ -3870,9 +4021,8 @@ containing_service=None, input_type=_GETGLOSSARYREQUEST, output_type=_GLOSSARY, - serialized_options=_b( - "\202\323\344\223\0025\0223/v3beta1/{name=projects/*/locations/*/glossaries/*}\332A\004name" - ), + serialized_options=b"\202\323\344\223\0025\0223/v3beta1/{name=projects/*/locations/*/glossaries/*}\332A\004name", + create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name="DeleteGlossary", @@ -3881,9 +4031,8 @@ containing_service=None, input_type=_DELETEGLOSSARYREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, - serialized_options=_b( - "\202\323\344\223\0025*3/v3beta1/{name=projects/*/locations/*/glossaries/*}\332A\004name\312A0\n\026DeleteGlossaryResponse\022\026DeleteGlossaryMetadata" - ), + serialized_options=b"\202\323\344\223\0025*3/v3beta1/{name=projects/*/locations/*/glossaries/*}\332A\004name\312A0\n\026DeleteGlossaryResponse\022\026DeleteGlossaryMetadata", + create_key=_descriptor._internal_create_key, ), ], ) diff --git a/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py b/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py index 695f7992..03a02437 100644 --- a/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py +++ b/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py @@ -1,8 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.translate_v3beta1.proto import ( - translation_service_pb2 as google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2, + translation_service_pb2 as google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2, ) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, @@ -12,53 +13,53 @@ class TranslationServiceStub(object): """Proto file for the Cloud Translation API (v3beta1). - Provides natural language translation operations. - """ + Provides natural language translation operations. + """ def __init__(self, channel): """Constructor. - Args: - channel: A grpc.Channel. - """ + Args: + channel: A grpc.Channel. + """ self.TranslateText = channel.unary_unary( "/google.cloud.translation.v3beta1.TranslationService/TranslateText", - request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextResponse.FromString, + request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextResponse.FromString, ) self.DetectLanguage = channel.unary_unary( "/google.cloud.translation.v3beta1.TranslationService/DetectLanguage", - request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.FromString, + request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.FromString, ) self.GetSupportedLanguages = channel.unary_unary( "/google.cloud.translation.v3beta1.TranslationService/GetSupportedLanguages", - request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.SupportedLanguages.FromString, + request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.SupportedLanguages.FromString, ) self.BatchTranslateText = channel.unary_unary( "/google.cloud.translation.v3beta1.TranslationService/BatchTranslateText", - request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.SerializeToString, + request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) self.CreateGlossary = channel.unary_unary( "/google.cloud.translation.v3beta1.TranslationService/CreateGlossary", - request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.SerializeToString, + request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) self.ListGlossaries = channel.unary_unary( "/google.cloud.translation.v3beta1.TranslationService/ListGlossaries", - request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.FromString, + request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.FromString, ) self.GetGlossary = channel.unary_unary( "/google.cloud.translation.v3beta1.TranslationService/GetGlossary", - request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.SerializeToString, - response_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.Glossary.FromString, + request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.SerializeToString, + response_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.Glossary.FromString, ) self.DeleteGlossary = channel.unary_unary( "/google.cloud.translation.v3beta1.TranslationService/DeleteGlossary", - request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.SerializeToString, + request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) @@ -66,72 +67,72 @@ def __init__(self, channel): class TranslationServiceServicer(object): """Proto file for the Cloud Translation API (v3beta1). - Provides natural language translation operations. - """ + Provides natural language translation operations. + """ def TranslateText(self, request, context): """Translates input text and returns translated text. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DetectLanguage(self, request, context): """Detects the language of text within a request. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetSupportedLanguages(self, request, context): """Returns a list of supported languages for translation. - """ + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def BatchTranslateText(self, request, context): """Translates a large volume of text in asynchronous batch mode. - This function provides real-time output as the inputs are being processed. - If caller cancels a request, the partial results (for an input file, it's - all or nothing) may still be available on the specified output location. + This function provides real-time output as the inputs are being processed. + If caller cancels a request, the partial results (for an input file, it's + all or nothing) may still be available on the specified output location. - This call returns immediately and you can - use google.longrunning.Operation.name to poll the status of the call. - """ + This call returns immediately and you can + use google.longrunning.Operation.name to poll the status of the call. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def CreateGlossary(self, request, context): """Creates a glossary and returns the long-running operation. Returns - NOT_FOUND, if the project doesn't exist. - """ + NOT_FOUND, if the project doesn't exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def ListGlossaries(self, request, context): """Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't - exist. - """ + exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def GetGlossary(self, request, context): """Gets a glossary. Returns NOT_FOUND, if the glossary doesn't - exist. - """ + exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") def DeleteGlossary(self, request, context): """Deletes a glossary, or cancels glossary construction - if the glossary isn't created yet. - Returns NOT_FOUND, if the glossary doesn't exist. - """ + if the glossary isn't created yet. + Returns NOT_FOUND, if the glossary doesn't exist. + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!") @@ -141,42 +142,42 @@ def add_TranslationServiceServicer_to_server(servicer, server): rpc_method_handlers = { "TranslateText": grpc.unary_unary_rpc_method_handler( servicer.TranslateText, - request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextResponse.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextResponse.SerializeToString, ), "DetectLanguage": grpc.unary_unary_rpc_method_handler( servicer.DetectLanguage, - request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.SerializeToString, ), "GetSupportedLanguages": grpc.unary_unary_rpc_method_handler( servicer.GetSupportedLanguages, - request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.SupportedLanguages.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.SupportedLanguages.SerializeToString, ), "BatchTranslateText": grpc.unary_unary_rpc_method_handler( servicer.BatchTranslateText, - request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.FromString, + request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "CreateGlossary": grpc.unary_unary_rpc_method_handler( servicer.CreateGlossary, - request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.FromString, + request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), "ListGlossaries": grpc.unary_unary_rpc_method_handler( servicer.ListGlossaries, - request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.SerializeToString, ), "GetGlossary": grpc.unary_unary_rpc_method_handler( servicer.GetGlossary, - request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.FromString, - response_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.Glossary.SerializeToString, + request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.FromString, + response_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.Glossary.SerializeToString, ), "DeleteGlossary": grpc.unary_unary_rpc_method_handler( servicer.DeleteGlossary, - request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.FromString, + request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), } @@ -184,3 +185,227 @@ def add_TranslationServiceServicer_to_server(servicer, server): "google.cloud.translation.v3beta1.TranslationService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) + + +# This class is part of an EXPERIMENTAL API. +class TranslationService(object): + """Proto file for the Cloud Translation API (v3beta1). + + Provides natural language translation operations. + """ + + @staticmethod + def TranslateText( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3beta1.TranslationService/TranslateText", + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextRequest.SerializeToString, + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.TranslateTextResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DetectLanguage( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3beta1.TranslationService/DetectLanguage", + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageRequest.SerializeToString, + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DetectLanguageResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetSupportedLanguages( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3beta1.TranslationService/GetSupportedLanguages", + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.GetSupportedLanguagesRequest.SerializeToString, + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.SupportedLanguages.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def BatchTranslateText( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3beta1.TranslationService/BatchTranslateText", + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def CreateGlossary( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3beta1.TranslationService/CreateGlossary", + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def ListGlossaries( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3beta1.TranslationService/ListGlossaries", + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesRequest.SerializeToString, + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.ListGlossariesResponse.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def GetGlossary( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3beta1.TranslationService/GetGlossary", + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.GetGlossaryRequest.SerializeToString, + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.Glossary.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) + + @staticmethod + def DeleteGlossary( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, + target, + "/google.cloud.translation.v3beta1.TranslationService/DeleteGlossary", + google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.SerializeToString, + google_dot_longrunning_dot_operations__pb2.Operation.FromString, + options, + channel_credentials, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + ) diff --git a/google/cloud/translate_v3beta1/types.py b/google/cloud/translate_v3beta1/types.py index 335149a6..0512ce19 100644 --- a/google/cloud/translate_v3beta1/types.py +++ b/google/cloud/translate_v3beta1/types.py @@ -27,9 +27,16 @@ from google.rpc import status_pb2 -_shared_modules = [operations_pb2, any_pb2, timestamp_pb2, status_pb2] - -_local_modules = [translation_service_pb2] +_shared_modules = [ + operations_pb2, + any_pb2, + timestamp_pb2, + status_pb2, +] + +_local_modules = [ + translation_service_pb2, +] names = [] diff --git a/noxfile.py b/noxfile.py index cf50e978..a8bbe3ca 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,14 +23,15 @@ import nox -BLACK_VERSION = "black==19.3b0" +BLACK_VERSION = "black==19.10b0" BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] -if os.path.exists("samples"): - BLACK_PATHS.append("samples") +DEFAULT_PYTHON_VERSION = "3.8" +SYSTEM_TEST_PYTHON_VERSIONS = ["2.7", "3.8"] +UNIT_TEST_PYTHON_VERSIONS = ["2.7", "3.5", "3.6", "3.7", "3.8"] -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint(session): """Run linters. @@ -38,7 +39,9 @@ def lint(session): serious code quality issues. """ session.install("flake8", BLACK_VERSION) - session.run("black", "--check", *BLACK_PATHS) + session.run( + "black", "--check", *BLACK_PATHS, + ) session.run("flake8", "google", "tests") @@ -53,10 +56,12 @@ def blacken(session): check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ session.install(BLACK_VERSION) - session.run("black", *BLACK_PATHS) + session.run( + "black", *BLACK_PATHS, + ) -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def lint_setup_py(session): """Verify that setup.py is valid (including RST check).""" session.install("docutils", "pygments") @@ -72,6 +77,7 @@ def default(session): session.run( "py.test", "--quiet", + "--cov=google.cloud.translation", "--cov=google.cloud", "--cov=tests.unit", "--cov-append", @@ -83,13 +89,13 @@ def default(session): ) -@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"]) +@nox.session(python=UNIT_TEST_PYTHON_VERSIONS) def unit(session): """Run the unit test suite.""" default(session) -@nox.session(python=["2.7", "3.7"]) +@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) def system(session): """Run the system test suite.""" system_test_path = os.path.join("tests", "system.py") @@ -109,7 +115,9 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. - session.install("mock", "pytest") + session.install( + "mock", "pytest", "google-cloud-testutils", + ) session.install("-e", "test_utils") session.install("-e", ".") @@ -120,7 +128,7 @@ def system(session): session.run("py.test", "--quiet", system_test_folder_path, *session.posargs) -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def cover(session): """Run the final coverage report. @@ -133,7 +141,7 @@ def cover(session): session.run("coverage", "erase") -@nox.session(python="3.7") +@nox.session(python=DEFAULT_PYTHON_VERSION) def docs(session): """Build the docs for this library.""" diff --git a/scripts/decrypt-secrets.sh b/scripts/decrypt-secrets.sh new file mode 100755 index 00000000..ff599eb2 --- /dev/null +++ b/scripts/decrypt-secrets.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Copyright 2015 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +ROOT=$( dirname "$DIR" ) + +# Work from the project root. +cd $ROOT + +# Use SECRET_MANAGER_PROJECT if set, fallback to cloud-devrel-kokoro-resources. +PROJECT_ID="${SECRET_MANAGER_PROJECT:-cloud-devrel-kokoro-resources}" + +gcloud secrets versions access latest --secret="python-docs-samples-test-env" \ + > testing/test-env.sh +gcloud secrets versions access latest \ + --secret="python-docs-samples-service-account" \ + > testing/service-account.json +gcloud secrets versions access latest \ + --secret="python-docs-samples-client-secrets" \ + > testing/client-secrets.json \ No newline at end of file diff --git a/scripts/readme-gen/readme_gen.py b/scripts/readme-gen/readme_gen.py new file mode 100644 index 00000000..d309d6e9 --- /dev/null +++ b/scripts/readme-gen/readme_gen.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python + +# Copyright 2016 Google Inc +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Generates READMEs using configuration defined in yaml.""" + +import argparse +import io +import os +import subprocess + +import jinja2 +import yaml + + +jinja_env = jinja2.Environment( + trim_blocks=True, + loader=jinja2.FileSystemLoader( + os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')))) + +README_TMPL = jinja_env.get_template('README.tmpl.rst') + + +def get_help(file): + return subprocess.check_output(['python', file, '--help']).decode() + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('source') + parser.add_argument('--destination', default='README.rst') + + args = parser.parse_args() + + source = os.path.abspath(args.source) + root = os.path.dirname(source) + destination = os.path.join(root, args.destination) + + jinja_env.globals['get_help'] = get_help + + with io.open(source, 'r') as f: + config = yaml.load(f) + + # This allows get_help to execute in the right directory. + os.chdir(root) + + output = README_TMPL.render(config) + + with io.open(destination, 'w') as f: + f.write(output) + + +if __name__ == '__main__': + main() diff --git a/scripts/readme-gen/templates/README.tmpl.rst b/scripts/readme-gen/templates/README.tmpl.rst new file mode 100644 index 00000000..4fd23976 --- /dev/null +++ b/scripts/readme-gen/templates/README.tmpl.rst @@ -0,0 +1,87 @@ +{# The following line is a lie. BUT! Once jinja2 is done with it, it will + become truth! #} +.. This file is automatically generated. Do not edit this file directly. + +{{product.name}} Python Samples +=============================================================================== + +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/README.rst + + +This directory contains samples for {{product.name}}. {{product.description}} + +{{description}} + +.. _{{product.name}}: {{product.url}} + +{% if required_api_url %} +To run the sample, you need to enable the API at: {{required_api_url}} +{% endif %} + +{% if required_role %} +To run the sample, you need to have `{{required_role}}` role. +{% endif %} + +{{other_required_steps}} + +{% if setup %} +Setup +------------------------------------------------------------------------------- + +{% for section in setup %} + +{% include section + '.tmpl.rst' %} + +{% endfor %} +{% endif %} + +{% if samples %} +Samples +------------------------------------------------------------------------------- + +{% for sample in samples %} +{{sample.name}} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +{% if not sample.hide_cloudshell_button %} +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/{{sample.file}},{{folder}}/README.rst +{% endif %} + + +{{sample.description}} + +To run this sample: + +.. code-block:: bash + + $ python {{sample.file}} +{% if sample.show_help %} + + {{get_help(sample.file)|indent}} +{% endif %} + + +{% endfor %} +{% endif %} + +{% if cloud_client_library %} + +The client library +------------------------------------------------------------------------------- + +This sample uses the `Google Cloud Client Library for Python`_. +You can read the documentation for more details on API usage and use GitHub +to `browse the source`_ and `report issues`_. + +.. _Google Cloud Client Library for Python: + https://googlecloudplatform.github.io/google-cloud-python/ +.. _browse the source: + https://github.com/GoogleCloudPlatform/google-cloud-python +.. _report issues: + https://github.com/GoogleCloudPlatform/google-cloud-python/issues + +{% endif %} + +.. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/scripts/readme-gen/templates/auth.tmpl.rst b/scripts/readme-gen/templates/auth.tmpl.rst new file mode 100644 index 00000000..1446b94a --- /dev/null +++ b/scripts/readme-gen/templates/auth.tmpl.rst @@ -0,0 +1,9 @@ +Authentication +++++++++++++++ + +This sample requires you to have authentication setup. Refer to the +`Authentication Getting Started Guide`_ for instructions on setting up +credentials for applications. + +.. _Authentication Getting Started Guide: + https://cloud.google.com/docs/authentication/getting-started diff --git a/scripts/readme-gen/templates/auth_api_key.tmpl.rst b/scripts/readme-gen/templates/auth_api_key.tmpl.rst new file mode 100644 index 00000000..11957ce2 --- /dev/null +++ b/scripts/readme-gen/templates/auth_api_key.tmpl.rst @@ -0,0 +1,14 @@ +Authentication +++++++++++++++ + +Authentication for this service is done via an `API Key`_. To obtain an API +Key: + +1. Open the `Cloud Platform Console`_ +2. Make sure that billing is enabled for your project. +3. From the **Credentials** page, create a new **API Key** or use an existing + one for your project. + +.. _API Key: + https://developers.google.com/api-client-library/python/guide/aaa_apikeys +.. _Cloud Console: https://console.cloud.google.com/project?_ diff --git a/scripts/readme-gen/templates/install_deps.tmpl.rst b/scripts/readme-gen/templates/install_deps.tmpl.rst new file mode 100644 index 00000000..a0406dba --- /dev/null +++ b/scripts/readme-gen/templates/install_deps.tmpl.rst @@ -0,0 +1,29 @@ +Install Dependencies +++++++++++++++++++++ + +#. Clone python-docs-samples and change directory to the sample directory you want to use. + + .. code-block:: bash + + $ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git + +#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. + + .. _Python Development Environment Setup Guide: + https://cloud.google.com/python/setup + +#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. + + .. code-block:: bash + + $ virtualenv env + $ source env/bin/activate + +#. Install the dependencies needed to run the samples. + + .. code-block:: bash + + $ pip install -r requirements.txt + +.. _pip: https://pip.pypa.io/ +.. _virtualenv: https://virtualenv.pypa.io/ diff --git a/scripts/readme-gen/templates/install_portaudio.tmpl.rst b/scripts/readme-gen/templates/install_portaudio.tmpl.rst new file mode 100644 index 00000000..5ea33d18 --- /dev/null +++ b/scripts/readme-gen/templates/install_portaudio.tmpl.rst @@ -0,0 +1,35 @@ +Install PortAudio ++++++++++++++++++ + +Install `PortAudio`_. This is required by the `PyAudio`_ library to stream +audio from your computer's microphone. PyAudio depends on PortAudio for cross-platform compatibility, and is installed differently depending on the +platform. + +* For Mac OS X, you can use `Homebrew`_:: + + brew install portaudio + + **Note**: if you encounter an error when running `pip install` that indicates + it can't find `portaudio.h`, try running `pip install` with the following + flags:: + + pip install --global-option='build_ext' \ + --global-option='-I/usr/local/include' \ + --global-option='-L/usr/local/lib' \ + pyaudio + +* For Debian / Ubuntu Linux:: + + apt-get install portaudio19-dev python-all-dev + +* Windows may work without having to install PortAudio explicitly (it will get + installed with PyAudio). + +For more details, see the `PyAudio installation`_ page. + + +.. _PyAudio: https://people.csail.mit.edu/hubert/pyaudio/ +.. _PortAudio: http://www.portaudio.com/ +.. _PyAudio installation: + https://people.csail.mit.edu/hubert/pyaudio/#downloads +.. _Homebrew: http://brew.sh diff --git a/setup.cfg b/setup.cfg index 3bd55550..c3a2b39f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# 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. + # Generated by synthtool. DO NOT EDIT! [bdist_wheel] universal = 1 diff --git a/synth.metadata b/synth.metadata index a4a60a1b..8f4ef527 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,26 +1,25 @@ { - "updateTime": "2020-01-31T21:01:53.491633Z", "sources": [ { - "generator": { - "name": "artman", - "version": "0.44.4", - "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" + "git": { + "name": ".", + "remote": "https://github.com/googleapis/python-translate.git", + "sha": "7a68632c7b5d73e1ee67278c930f67e692a1c56b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2717b8a1c762b26911b45ecc2e4ee01d98401b28", - "internalRef": "292555664" + "sha": "b882b8e6bfcd708042ff00f7adc67ce750817dd0", + "internalRef": "318028816" } }, { - "template": { - "name": "python_split_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "ce68c0e70d36c93ffcde96e9908fb4d94aa4f2e4" } } ], @@ -31,8 +30,7 @@ "apiName": "translate", "apiVersion": "v3beta1", "language": "python", - "generator": "gapic", - "config": "google/cloud/translate/artman_translate_v3beta1.yaml" + "generator": "bazel" } }, { @@ -41,8 +39,7 @@ "apiName": "translate", "apiVersion": "v3", "language": "python", - "generator": "gapic", - "config": "google/cloud/translate/artman_translate_v3.yaml" + "generator": "bazel" } } ] diff --git a/synth.py b/synth.py index eb8a48fc..584caf8b 100644 --- a/synth.py +++ b/synth.py @@ -63,8 +63,8 @@ s.replace( "google/cloud/**/translation_service_pb2.py", - r"""record delimiters are ':raw-latex:`\\n`' instead of - ':raw-latex:`\\r`:raw-latex:`\\n`'.""", + r"""record delimiters are ‘:raw-latex:`\\n`’ instead of + ‘:raw-latex:`\\r`:raw-latex:`\\n`’.""", r"""record delimiters are ``\\\\\\\\n`` instead of ``\\\\\\\\r\\\\\\\\n``.""", ) @@ -72,8 +72,8 @@ # Fix docstring issue for classes with no summary line s.replace( "google/cloud/**/proto/*_pb2.py", - '''__doc__ = """Attributes:''', - '''__doc__ = """ + '''__doc__: """Attributes:''', + '''__doc__: """ Attributes:''', ) @@ -97,4 +97,7 @@ ) s.move(templated_files) +# TODO(busunkim): Use latest sphinx after microgenerator transition +s.replace("noxfile.py", '"sphinx"', '"sphinx<3.0.0"') + s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/testing/.gitignore b/testing/.gitignore new file mode 100644 index 00000000..b05fbd63 --- /dev/null +++ b/testing/.gitignore @@ -0,0 +1,3 @@ +test-env.sh +service-account.json +client-secrets.json \ No newline at end of file