From b25df25f19ffbc4558d11a6cde42dab2c4468167 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Fri, 8 Mar 2019 17:17:25 -0800 Subject: [PATCH 1/8] templates --- translate/.coveragerc | 2 + translate/LICENSE | 7 +-- translate/MANIFEST.in | 3 +- translate/google/__init__.py | 6 +- translate/google/cloud/__init__.py | 6 +- translate/noxfile.py | 94 ++++++++++++++++++------------ 6 files changed, 72 insertions(+), 46 deletions(-) diff --git a/translate/.coveragerc b/translate/.coveragerc index 098720f672e1..6b9ab9da4a1b 100644 --- a/translate/.coveragerc +++ b/translate/.coveragerc @@ -14,3 +14,5 @@ exclude_lines = omit = */gapic/*.py */proto/*.py + */core/*.py + */site-packages/*.py \ No newline at end of file diff --git a/translate/LICENSE b/translate/LICENSE index d64569567334..a8ee855de2aa 100644 --- a/translate/LICENSE +++ b/translate/LICENSE @@ -1,7 +1,6 @@ - - Apache License + Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -193,7 +192,7 @@ 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 + 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, diff --git a/translate/MANIFEST.in b/translate/MANIFEST.in index fc77f8c82ff0..9cbf175afe6b 100644 --- a/translate/MANIFEST.in +++ b/translate/MANIFEST.in @@ -1,4 +1,5 @@ include README.rst LICENSE recursive-include google *.json *.proto recursive-include tests * -global-exclude *.pyc __pycache__ +global-exclude *.py[co] +global-exclude __pycache__ diff --git a/translate/google/__init__.py b/translate/google/__init__.py index 0e1bc5131ba6..8fcc60e2b9c6 100644 --- a/translate/google/__init__.py +++ b/translate/google/__init__.py @@ -1,10 +1,12 @@ -# Copyright 2016 Google LLC +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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, diff --git a/translate/google/cloud/__init__.py b/translate/google/cloud/__init__.py index 0e1bc5131ba6..8fcc60e2b9c6 100644 --- a/translate/google/cloud/__init__.py +++ b/translate/google/cloud/__init__.py @@ -1,10 +1,12 @@ -# Copyright 2016 Google LLC +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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, diff --git a/translate/noxfile.py b/translate/noxfile.py index fe9d1a8f0deb..fad9b6cc11b5 100644 --- a/translate/noxfile.py +++ b/translate/noxfile.py @@ -1,10 +1,12 @@ -# Copyright 2016 Google LLC +# -*- coding: utf-8 -*- +# +# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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, @@ -13,20 +15,17 @@ # limitations under the License. from __future__ import absolute_import - import os import nox -LOCAL_DEPS = ( - os.path.join('..', 'api_core'), - os.path.join('..', 'core'), -) +LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core")) @nox.session(python="3.7") def lint(session): """Run linters. + Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ @@ -44,7 +43,12 @@ def lint(session): @nox.session(python="3.6") def blacken(session): """Run black. + Format code to uniform standard. + + This currently uses Python 3.6 due to the automated Kokoro run of synthtool. + That run uses an image that doesn't have 3.6 installed. Before updating this + check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ session.install("black") session.run( @@ -55,66 +59,82 @@ def blacken(session): ) -@nox.session(python='3.6') +@nox.session(python="3.7") def lint_setup_py(session): """Verify that setup.py is valid (including RST check).""" - session.install('docutils', 'Pygments') - session.run( - 'python', 'setup.py', 'check', '--restructuredtext', '--strict') + session.install("docutils", "pygments") + session.run("python", "setup.py", "check", "--restructuredtext", "--strict") def default(session): - """Default unit test session.""" - # Install all test dependencies, then install local packages in-place. - session.install('mock', 'pytest', 'pytest-cov') + # Install all test dependencies, then install this package in-place. + session.install("mock", "pytest", "pytest-cov") for local_dep in LOCAL_DEPS: - session.install('-e', local_dep) - session.install('-e', '.') + session.install("-e", local_dep) + session.install("-e", ".") # Run py.test against the unit tests. session.run( - 'py.test', '--quiet', - '--cov=google.cloud.translate', '--cov=tests.unit', '--cov-append', - '--cov-config=.coveragerc', '--cov-report=', '--cov-fail-under=97', - 'tests/unit', + "py.test", + "--quiet", + "--cov=google.cloud", + "--cov=tests.unit", + "--cov-append", + "--cov-config=.coveragerc", + "--cov-report=", + "--cov-fail-under=100", + os.path.join("tests", "unit"), + *session.posargs, ) -@nox.session(python=['2.7', '3.5', '3.6', '3.7']) +@nox.session(python=["2.7", "3.5", "3.6", "3.7"]) def unit(session): """Run the unit test suite.""" default(session) -@nox.session(python=['2.7', '3.6']) +@nox.session(python=["2.7", "3.7"]) def system(session): """Run the system test suite.""" - - # Sanity check: Only run system tests if the environment variable is set. - if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''): - session.skip('Credentials must be set via environment variable.') + system_test_path = os.path.join("tests", "system.py") + system_test_folder_path = os.path.join("tests", "system") + # Sanity check: Only run tests if the environment variable is set. + if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): + session.skip("Credentials must be set via environment variable") + + system_test_exists = os.path.exists(system_test_path) + system_test_folder_exists = os.path.exists(system_test_folder_path) + # Sanity check: only run tests if found. + if not system_test_exists and not system_test_folder_exists: + session.skip("System tests were not found") # Use pre-release gRPC for system tests. - session.install('--pre', 'grpcio') + session.install("--pre", "grpcio") - # Install all test dependencies, then install local packages in-place. - session.install('mock', 'pytest') + # Install all test dependencies, then install this package into the + # virtualenv's dist-packages. + session.install("mock", "pytest") for local_dep in LOCAL_DEPS: - session.install('-e', local_dep) - session.install('-e', '../test_utils/') - session.install('-e', '.') + session.install("-e", local_dep) + session.install("-e", "../test_utils/") + session.install("-e", ".") # Run py.test against the system tests. - session.run('py.test', '--quiet', 'tests/system.py') + if system_test_exists: + session.run("py.test", "--quiet", system_test_path, *session.posargs) + if system_test_folder_exists: + session.run("py.test", "--quiet", system_test_folder_path, *session.posargs) -@nox.session(python='3.6') +@nox.session(python="3.7") def cover(session): """Run the final coverage report. This outputs the coverage report aggregating coverage from the unit test runs (not system test runs), and then erases coverage data. """ - session.install('coverage', 'pytest-cov') - session.run('coverage', 'report', '--show-missing', '--fail-under=100') - session.run('coverage', 'erase') + session.install("coverage", "pytest-cov") + session.run("coverage", "report", "--show-missing", "--fail-under=100") + + session.run("coverage", "erase") From ac5b0b2daaec509f1c7ecc7321efa2f315ebe478 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Fri, 8 Mar 2019 17:21:44 -0800 Subject: [PATCH 2/8] generate v3alpha1 --- .../cloud/translate_v3alpha1/__init__.py | 29 + .../translate_v3alpha1/gapic/__init__.py | 0 .../cloud/translate_v3alpha1/gapic/enums.py | 34 + .../gapic/translation_service_client.py | 890 ++++ .../translation_service_client_config.py | 63 + .../gapic/transports/__init__.py | 0 .../translation_service_grpc_transport.py | 221 + .../translate_v3alpha1/proto/__init__.py | 0 .../proto/translation_service_pb2.py | 3618 +++++++++++++++++ .../proto/translation_service_pb2_grpc.py | 179 + .../google/cloud/translate_v3alpha1/types.py | 44 + translate/synth.metadata | 39 + translate/synth.py | 47 + ...est_translation_service_client_v3alpha1.py | 455 +++ 14 files changed, 5619 insertions(+) create mode 100644 translate/google/cloud/translate_v3alpha1/__init__.py create mode 100644 translate/google/cloud/translate_v3alpha1/gapic/__init__.py create mode 100644 translate/google/cloud/translate_v3alpha1/gapic/enums.py create mode 100644 translate/google/cloud/translate_v3alpha1/gapic/translation_service_client.py create mode 100644 translate/google/cloud/translate_v3alpha1/gapic/translation_service_client_config.py create mode 100644 translate/google/cloud/translate_v3alpha1/gapic/transports/__init__.py create mode 100644 translate/google/cloud/translate_v3alpha1/gapic/transports/translation_service_grpc_transport.py create mode 100644 translate/google/cloud/translate_v3alpha1/proto/__init__.py create mode 100644 translate/google/cloud/translate_v3alpha1/proto/translation_service_pb2.py create mode 100644 translate/google/cloud/translate_v3alpha1/proto/translation_service_pb2_grpc.py create mode 100644 translate/google/cloud/translate_v3alpha1/types.py create mode 100644 translate/synth.metadata create mode 100644 translate/synth.py create mode 100644 translate/tests/unit/gapic/v3alpha1/test_translation_service_client_v3alpha1.py diff --git a/translate/google/cloud/translate_v3alpha1/__init__.py b/translate/google/cloud/translate_v3alpha1/__init__.py new file mode 100644 index 000000000000..38b8c318af30 --- /dev/null +++ b/translate/google/cloud/translate_v3alpha1/__init__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import absolute_import + +from google.cloud.translation_v3alpha1 import types +from google.cloud.translation_v3alpha1.gapic import enums +from google.cloud.translation_v3alpha1.gapic import translation_service_client + + +class TranslationServiceClient(translation_service_client.TranslationServiceClient): + __doc__ = translation_service_client.TranslationServiceClient.__doc__ + enums = enums + + +__all__ = ("enums", "types", "TranslationServiceClient") diff --git a/translate/google/cloud/translate_v3alpha1/gapic/__init__.py b/translate/google/cloud/translate_v3alpha1/gapic/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/translate/google/cloud/translate_v3alpha1/gapic/enums.py b/translate/google/cloud/translate_v3alpha1/gapic/enums.py new file mode 100644 index 000000000000..d97014f6edad --- /dev/null +++ b/translate/google/cloud/translate_v3alpha1/gapic/enums.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Wrappers for protocol buffer enum types.""" + +import enum + + +class Glossary(object): + class GlossaryType(enum.IntEnum): + """ + Glossary type. + + Attributes: + GLOSSARY_TYPE_UNSPECIFIED (int): Invalid. + UNIDIRECTIONAL (int): A single language pair e.g., CSV file with source=>target mapping. + EQUIVALENT_TERMS_SET (int): Any language pair from a set of supported languages e.g., GTT glossaries. + """ + + GLOSSARY_TYPE_UNSPECIFIED = 0 + UNIDIRECTIONAL = 1 + EQUIVALENT_TERMS_SET = 2 diff --git a/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client.py b/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client.py new file mode 100644 index 000000000000..d70866f19e72 --- /dev/null +++ b/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client.py @@ -0,0 +1,890 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Accesses the google.cloud.translation.v3alpha1 TranslationService API.""" + +import functools +import pkg_resources +import warnings + +from google.oauth2 import service_account +import google.api_core.gapic_v1.client_info +import google.api_core.gapic_v1.config +import google.api_core.gapic_v1.method +import google.api_core.grpc_helpers +import google.api_core.operation +import google.api_core.operations_v1 +import google.api_core.page_iterator +import google.api_core.path_template +import google.api_core.protobuf_helpers +import grpc + +from google.cloud.translation_v3alpha1.gapic import enums +from google.cloud.translation_v3alpha1.gapic import translation_service_client_config +from google.cloud.translation_v3alpha1.gapic.transports import ( + translation_service_grpc_transport, +) +from google.cloud.translation_v3alpha1.proto import translation_service_pb2 +from google.cloud.translation_v3alpha1.proto import translation_service_pb2_grpc +from google.longrunning import operations_pb2 + +_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( + "google-cloud-translate" +).version + + +class TranslationServiceClient(object): + """Provides natural language translation operations.""" + + SERVICE_ADDRESS = "translate.googleapis.com:443" + """The default address of the service.""" + + # The name of the interface for this client. This is the key used to + # find the method configuration in the client_config dictionary. + _INTERFACE_NAME = "google.cloud.translation.v3alpha1.TranslationService" + + @classmethod + def from_service_account_file(cls, filename, *args, **kwargs): + """Creates an instance of this client using the provided credentials + file. + + Args: + filename (str): The path to the service account private key json + file. + args: Additional arguments to pass to the constructor. + kwargs: Additional arguments to pass to the constructor. + + Returns: + TranslationServiceClient: The constructed client. + """ + credentials = service_account.Credentials.from_service_account_file(filename) + kwargs["credentials"] = credentials + return cls(*args, **kwargs) + + from_service_account_json = from_service_account_file + + @classmethod + def location_path(cls, project, location): + """Return a fully-qualified location string.""" + return google.api_core.path_template.expand( + "projects/{project}/locations/{location}", + project=project, + location=location, + ) + + @classmethod + def glossary_path(cls, project, location, glossary): + """Return a fully-qualified glossary string.""" + return google.api_core.path_template.expand( + "projects/{project}/locations/{location}/glossaries/{glossary}", + project=project, + location=location, + glossary=glossary, + ) + + @classmethod + def model_path_path(cls, project, location, model_path): + """Return a fully-qualified model_path string.""" + return google.api_core.path_template.expand( + "projects/{project}/locations/{location}/models/{model_path=**}", + project=project, + location=location, + model_path=model_path, + ) + + def __init__( + self, + transport=None, + channel=None, + credentials=None, + client_config=None, + client_info=None, + ): + """Constructor. + + Args: + transport (Union[~.TranslationServiceGrpcTransport, + Callable[[~.Credentials, type], ~.TranslationServiceGrpcTransport]): A transport + instance, responsible for actually making the API calls. + The default transport uses the gRPC protocol. + This argument may also be a callable which returns a + transport instance. Callables will be sent the credentials + as the first argument and the default transport class as + the second argument. + channel (grpc.Channel): DEPRECATED. A ``Channel`` instance + through which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. + credentials (google.auth.credentials.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If none + are specified, the client will attempt to ascertain the + credentials from the environment. + This argument is mutually exclusive with providing a + transport instance to ``transport``; doing so will raise + an exception. + client_config (dict): DEPRECATED. A dictionary of call options for + each method. If not specified, the default configuration is used. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + """ + # Raise deprecation warnings for things we want to go away. + if client_config is not None: + warnings.warn( + "The `client_config` argument is deprecated.", + PendingDeprecationWarning, + stacklevel=2, + ) + else: + client_config = translation_service_client_config.config + + if channel: + warnings.warn( + "The `channel` argument is deprecated; use " "`transport` instead.", + PendingDeprecationWarning, + stacklevel=2, + ) + + # Instantiate the transport. + # The transport is responsible for handling serialization and + # deserialization and actually sending data to the service. + if transport: + if callable(transport): + self.transport = transport( + credentials=credentials, + default_class=translation_service_grpc_transport.TranslationServiceGrpcTransport, + ) + else: + if credentials: + raise ValueError( + "Received both a transport instance and " + "credentials; these are mutually exclusive." + ) + self.transport = transport + else: + self.transport = translation_service_grpc_transport.TranslationServiceGrpcTransport( + address=self.SERVICE_ADDRESS, channel=channel, credentials=credentials + ) + + if client_info is None: + client_info = google.api_core.gapic_v1.client_info.ClientInfo( + gapic_version=_GAPIC_LIBRARY_VERSION + ) + else: + client_info.gapic_version = _GAPIC_LIBRARY_VERSION + self._client_info = client_info + + # Parse out the default settings for retry and timeout for each RPC + # from the client configuration. + # (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] + ) + + # Save a dictionary of cached API call functions. + # These are the actual callables which invoke the proper + # transport methods, wrapped with `wrap_method` to add retry, + # timeout, and the like. + self._inner_api_calls = {} + + # Service calls + def translate_text( + self, + target_language_code, + content=None, + mime_type=None, + source_language_code=None, + target_language_codes=None, + model=None, + glossary_config=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Translates input text, returning translated text. + + Example: + >>> from google.cloud import translation_v3alpha1 + >>> + >>> client = translation_v3alpha1.TranslationServiceClient() + >>> + >>> # TODO: Initialize `target_language_code`: + >>> target_language_code = '' + >>> + >>> response = client.translate_text(target_language_code) + + Args: + 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. + content (str): Required. The content of the input in string format. + We recommend to use shorter string (<=10k characters. i.e. Unicode + codepoints). + Please use BatchTranslateText for larger text. + mime_type (str): Optional. The format of the source text e.g., "text/html", "text/plain". + If left blank, the MIME type is assumed to be "text/html". + source_language_code (str): Optional. The BCP-47 language code of the input text if + known, e.g. "en-US" or "sr-Latn". Supported language codes are listed in + Language Support. If the source language is not specified, the API will + attempt to identify the source language automatically and return it within + the response. + target_language_codes (list[str]): *DEPRECATED* The BCP-47 language codes to use for translation of the + input text, set to one of the language codes listed in Language Support. + Repeat if input must be translated to multiple languages. + model (str): Optional. The ``model`` type requested for this translation. + + The format depends on model type: 1. Custom models: + /projects/{project-id}/locations/{location-id}/models/{model-id}. 2. + General (built-in) models: + /projects/{project-id}/locations/{location-id}/models/general/nmt + /projects/{project-id}/locations/{location-id}/models/general/base + + For global (non-regionalized) requests, use {location-id} 'global'. For + example, /projects/{project-id}/locations/global/models/general/nmt + + If missing, the system will decide the best model to use. + glossary_config (Union[dict, ~google.cloud.translation_v3alpha1.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. Glossary needs to be in the same region + as the model, otherwise error 400 is returned. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.translation_v3alpha1.types.TranslateTextGlossaryConfig` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will not + be retried. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.translation_v3alpha1.types.TranslateTextResponse` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "translate_text" not in self._inner_api_calls: + self._inner_api_calls[ + "translate_text" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.translate_text, + default_retry=self._method_configs["TranslateText"].retry, + default_timeout=self._method_configs["TranslateText"].timeout, + client_info=self._client_info, + ) + + # Sanity check: We have some fields which are mutually exclusive; + # raise ValueError if more than one is sent. + google.api_core.protobuf_helpers.check_oneof(content=content) + + request = translation_service_pb2.TranslateTextRequest( + target_language_code=target_language_code, + content=content, + mime_type=mime_type, + source_language_code=source_language_code, + target_language_codes=target_language_codes, + model=model, + glossary_config=glossary_config, + ) + return self._inner_api_calls["translate_text"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def detect_language( + self, + name, + content=None, + mime_type=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Detects the language of text within a request. + + Example: + >>> from google.cloud import translation_v3alpha1 + >>> + >>> client = translation_v3alpha1.TranslationServiceClient() + >>> + >>> name = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> response = client.detect_language(name) + + Args: + name (str): Optional. Used for making regionalized calls. + Format: /projects/{project-id}/locations/{location-id}. + For global calls, use /projects/{project-id}/locations/global. + If missing, the call is treated as a global call. + content (str): The content of the input in string format. + mime_type (str): Optional. The format of the source text e.g., "text/html", "text/plain". + If left blank, the MIME type is assumed to be "text/html" for inline + requests, or will be automatically determined from the uploaded content's + MIME type. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will not + be retried. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.translation_v3alpha1.types.DetectLanguageResponse` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "detect_language" not in self._inner_api_calls: + self._inner_api_calls[ + "detect_language" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.detect_language, + default_retry=self._method_configs["DetectLanguage"].retry, + default_timeout=self._method_configs["DetectLanguage"].timeout, + client_info=self._client_info, + ) + + # Sanity check: We have some fields which are mutually exclusive; + # raise ValueError if more than one is sent. + google.api_core.protobuf_helpers.check_oneof(content=content) + + request = translation_service_pb2.DetectLanguageRequest( + name=name, content=content, mime_type=mime_type + ) + return self._inner_api_calls["detect_language"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def get_supported_languages( + self, + name, + display_language_code=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Returns a list of supported languages for translation. + + Example: + >>> from google.cloud import translation_v3alpha1 + >>> + >>> client = translation_v3alpha1.TranslationServiceClient() + >>> + >>> name = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> response = client.get_supported_languages(name) + + Args: + name (str): Optional. The ``name`` can be in one of two formats: 1. Location: + 'projects/*/locations/*'. Returns all languages supported by Cloud + Translation API. 2. Model name: 'projects/*/locations/*/models/\*\*'. + Returns languages supported by the specified model. If missing, case 1 + is used. + display_language_code (str): Optional. The language to use to return localized, human readable names + of supported languages. If missing, default language is ENGLISH. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will not + be retried. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.translation_v3alpha1.types.SupportedLanguages` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_supported_languages" not in self._inner_api_calls: + self._inner_api_calls[ + "get_supported_languages" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_supported_languages, + default_retry=self._method_configs["GetSupportedLanguages"].retry, + default_timeout=self._method_configs["GetSupportedLanguages"].timeout, + client_info=self._client_info, + ) + + request = translation_service_pb2.GetSupportedLanguagesRequest( + name=name, display_language_code=display_language_code + ) + return self._inner_api_calls["get_supported_languages"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def batch_translate_text( + self, + parent, + target_language_codes, + input_configs, + output_config, + source_language_code=None, + models=None, + glossaries=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Translates 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 may still be available on + the specified output location. + + Example: + >>> from google.cloud import translation_v3alpha1 + >>> + >>> client = translation_v3alpha1.TranslationServiceClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> # TODO: Initialize `target_language_codes`: + >>> target_language_codes = [] + >>> + >>> # TODO: Initialize `input_configs`: + >>> input_configs = [] + >>> + >>> # TODO: Initialize `output_config`: + >>> output_config = {} + >>> + >>> response = client.batch_translate_text(parent, target_language_codes, input_configs, output_config) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() + + Args: + parent (str): Optional. Only used when making regionalized call. + Format: + /projects/{project-id}/locations/{location-id}. + + Only custom models/glossaries within the same location-id can be used. + Otherwise 400 is returned. + target_language_codes (list[str]): Required. Specify up to 10 language codes here. + input_configs (list[Union[dict, ~google.cloud.translation_v3alpha1.types.InputConfig]]): Required. Input configurations. + The total number of files matched should be <= 1000. + The total content size should be <= 100M Unicode codepoints. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.translation_v3alpha1.types.InputConfig` + output_config (Union[dict, ~google.cloud.translation_v3alpha1.types.OutputConfig]): Required. Output configuration. + If 2 input configs match to the same file (i.e. same input path), + we don't generate output for duplicate inputs. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.translation_v3alpha1.types.OutputConfig` + source_language_code (str): Optional. Source language code. + If missing, source language is identified automatically. + models (dict[str -> str]): 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 a custom model built by AutoML. + + The value format depends on model type: + 1. Custom models: + /projects/{project-id}/locations/{location-id}/models/{model-id}. + 2. General (built-in) models: + /projects/{project-id}/locations/{location-id}/models/general/nmt + /projects/{project-id}/locations/{location-id}/models/general/base + + If the map is empty or a specific model is + not requested for a language pair, then default google model is used. + glossaries (dict[str -> Union[dict, ~google.cloud.translation_v3alpha1.types.TranslateTextGlossaryConfig]]): Optional. Glossaries to be applied for translation. + It is keyed by target language code. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.translation_v3alpha1.types.TranslateTextGlossaryConfig` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will not + be retried. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.translation_v3alpha1.types._OperationFuture` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "batch_translate_text" not in self._inner_api_calls: + self._inner_api_calls[ + "batch_translate_text" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.batch_translate_text, + default_retry=self._method_configs["BatchTranslateText"].retry, + default_timeout=self._method_configs["BatchTranslateText"].timeout, + client_info=self._client_info, + ) + + request = translation_service_pb2.BatchTranslateTextRequest( + parent=parent, + target_language_codes=target_language_codes, + input_configs=input_configs, + output_config=output_config, + source_language_code=source_language_code, + models=models, + glossaries=glossaries, + ) + operation = self._inner_api_calls["batch_translate_text"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + translation_service_pb2.BatchTranslateResponse, + metadata_type=translation_service_pb2.BatchTranslateMetadata, + ) + + def create_glossary( + self, + parent, + glossary, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Creates a glossary and returns the long running operation. Returns + NOT\_FOUND, if the project does not exist. + + Example: + >>> from google.cloud import translation_v3alpha1 + >>> + >>> client = translation_v3alpha1.TranslationServiceClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> # TODO: Initialize `glossary`: + >>> glossary = {} + >>> + >>> response = client.create_glossary(parent, glossary) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() + + Args: + parent (str): Required. The project name. + glossary (Union[dict, ~google.cloud.translation_v3alpha1.types.Glossary]): Required. The glossary to create. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.translation_v3alpha1.types.Glossary` + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will not + be retried. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.translation_v3alpha1.types._OperationFuture` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "create_glossary" not in self._inner_api_calls: + self._inner_api_calls[ + "create_glossary" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.create_glossary, + default_retry=self._method_configs["CreateGlossary"].retry, + default_timeout=self._method_configs["CreateGlossary"].timeout, + client_info=self._client_info, + ) + + request = translation_service_pb2.CreateGlossaryRequest( + parent=parent, glossary=glossary + ) + operation = self._inner_api_calls["create_glossary"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + translation_service_pb2.Glossary, + metadata_type=translation_service_pb2.CreateGlossaryMetadata, + ) + + def list_glossaries( + self, + parent, + page_size=None, + filter_=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists glossaries in a project. Returns NOT\_FOUND, if the project does + not exist. + + Example: + >>> from google.cloud import translation_v3alpha1 + >>> + >>> client = translation_v3alpha1.TranslationServiceClient() + >>> + >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> + >>> # Iterate over all results + >>> for element in client.list_glossaries(parent): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_glossaries(parent).pages: + ... for element in page: + ... # process element + ... pass + + Args: + parent (str): Required. The name of the project to list all of the glossaries from. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + filter_ (str): Optional. Filter specifying constraints of a list operation. For + example, ``tags.glossary_name="products*"``. If missing, no filtering is + performed. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will not + be retried. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.gax.PageIterator` instance. By default, this + is an iterable of :class:`~google.cloud.translation_v3alpha1.types.Glossary` instances. + This object can also be configured to iterate over the pages + of the response through the `options` parameter. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_glossaries" not in self._inner_api_calls: + self._inner_api_calls[ + "list_glossaries" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_glossaries, + default_retry=self._method_configs["ListGlossaries"].retry, + default_timeout=self._method_configs["ListGlossaries"].timeout, + client_info=self._client_info, + ) + + request = translation_service_pb2.ListGlossariesRequest( + parent=parent, page_size=page_size, filter=filter_ + ) + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_glossaries"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="glossaries", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + + def get_glossary( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Gets a glossary. Returns NOT\_FOUND, if the glossary or the project do + not exist. + + Example: + >>> from google.cloud import translation_v3alpha1 + >>> + >>> client = translation_v3alpha1.TranslationServiceClient() + >>> + >>> name = client.glossary_path('[PROJECT]', '[LOCATION]', '[GLOSSARY]') + >>> + >>> response = client.get_glossary(name) + + Args: + name (str): Required. The name of the glossary to retrieve. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will not + be retried. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.translation_v3alpha1.types.Glossary` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_glossary" not in self._inner_api_calls: + self._inner_api_calls[ + "get_glossary" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_glossary, + default_retry=self._method_configs["GetGlossary"].retry, + default_timeout=self._method_configs["GetGlossary"].timeout, + client_info=self._client_info, + ) + + request = translation_service_pb2.GetGlossaryRequest(name=name) + return self._inner_api_calls["get_glossary"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + + def delete_glossary( + self, + name, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Deletes a glossary, or cancels glossary construction if the glossary + isn't created yet. Returns NOT\_FOUND, if the glossary or the project do + not exist. + + Example: + >>> from google.cloud import translation_v3alpha1 + >>> + >>> client = translation_v3alpha1.TranslationServiceClient() + >>> + >>> name = client.glossary_path('[PROJECT]', '[LOCATION]', '[GLOSSARY]') + >>> + >>> response = client.delete_glossary(name) + >>> + >>> def callback(operation_future): + ... # Handle result. + ... result = operation_future.result() + >>> + >>> response.add_done_callback(callback) + >>> + >>> # Handle metadata. + >>> metadata = response.metadata() + + Args: + name (str): Required. The name of the glossary to delete. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will not + be retried. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.translation_v3alpha1.types._OperationFuture` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "delete_glossary" not in self._inner_api_calls: + self._inner_api_calls[ + "delete_glossary" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.delete_glossary, + default_retry=self._method_configs["DeleteGlossary"].retry, + default_timeout=self._method_configs["DeleteGlossary"].timeout, + client_info=self._client_info, + ) + + request = translation_service_pb2.DeleteGlossaryRequest(name=name) + operation = self._inner_api_calls["delete_glossary"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + return google.api_core.operation.from_gapic( + operation, + self.transport._operations_client, + translation_service_pb2.DeleteGlossaryResponse, + metadata_type=translation_service_pb2.DeleteGlossaryMetadata, + ) diff --git a/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client_config.py b/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client_config.py new file mode 100644 index 000000000000..ebc9c6c1d332 --- /dev/null +++ b/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client_config.py @@ -0,0 +1,63 @@ +config = { + "interfaces": { + "google.cloud.translation.v3alpha1.TranslationService": { + "retry_codes": { + "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], + "non_idempotent": [], + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000, + } + }, + "methods": { + "TranslateText": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "DetectLanguage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "GetSupportedLanguages": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "BatchTranslateText": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "CreateGlossary": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default", + }, + "ListGlossaries": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "GetGlossary": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + "DeleteGlossary": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default", + }, + }, + } + } +} diff --git a/translate/google/cloud/translate_v3alpha1/gapic/transports/__init__.py b/translate/google/cloud/translate_v3alpha1/gapic/transports/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/translate/google/cloud/translate_v3alpha1/gapic/transports/translation_service_grpc_transport.py b/translate/google/cloud/translate_v3alpha1/gapic/transports/translation_service_grpc_transport.py new file mode 100644 index 000000000000..b3efd5cf8c49 --- /dev/null +++ b/translate/google/cloud/translate_v3alpha1/gapic/transports/translation_service_grpc_transport.py @@ -0,0 +1,221 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import google.api_core.grpc_helpers +import google.api_core.operations_v1 + +from google.cloud.translation_v3alpha1.proto import translation_service_pb2_grpc + + +class TranslationServiceGrpcTransport(object): + """gRPC transport class providing stubs for + google.cloud.translation.v3alpha1 TranslationService API. + + The transport provides access to the raw gRPC stubs, + which can be used to take advantage of advanced + features of gRPC. + """ + + # The scopes needed to make gRPC calls to all of the methods defined + # in this service. + _OAUTH_SCOPES = ( + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation", + ) + + def __init__( + self, channel=None, credentials=None, address="translate.googleapis.com:443" + ): + """Instantiate the transport class. + + Args: + channel (grpc.Channel): A ``Channel`` instance through + which to make calls. This argument is mutually exclusive + with ``credentials``; providing both will raise an exception. + credentials (google.auth.credentials.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If none + are specified, the client will attempt to ascertain the + credentials from the environment. + address (str): The address where the service is hosted. + """ + # If both `channel` and `credentials` are specified, raise an + # 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." + ) + + # Create the channel. + if channel is None: + channel = self.create_channel(address=address, credentials=credentials) + + self._channel = channel + + # gRPC uses objects called "stubs" that are bound to the + # channel and provide a basic method for each RPC. + self._stubs = { + "translation_service_stub": translation_service_pb2_grpc.TranslationServiceStub( + channel + ) + } + + # Because this API includes a method that returns a + # long-running operation (proto: google.longrunning.Operation), + # instantiate an LRO client. + self._operations_client = google.api_core.operations_v1.OperationsClient( + channel + ) + + @classmethod + def create_channel(cls, address="translate.googleapis.com:443", credentials=None): + """Create and return a gRPC channel object. + + Args: + address (str): The host for the channel to use. + credentials (~.Credentials): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If + none are specified, the client will attempt to ascertain + the credentials from the environment. + + Returns: + grpc.Channel: A gRPC channel object. + """ + return google.api_core.grpc_helpers.create_channel( + address, credentials=credentials, scopes=cls._OAUTH_SCOPES + ) + + @property + def channel(self): + """The gRPC channel used by the transport. + + Returns: + grpc.Channel: A gRPC channel object. + """ + return self._channel + + @property + def translate_text(self): + """Return the gRPC stub for :meth:`TranslationServiceClient.translate_text`. + + Translates input text, returning translated text. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["translation_service_stub"].TranslateText + + @property + def detect_language(self): + """Return the gRPC stub for :meth:`TranslationServiceClient.detect_language`. + + Detects the language of text within a request. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["translation_service_stub"].DetectLanguage + + @property + def get_supported_languages(self): + """Return the gRPC stub for :meth:`TranslationServiceClient.get_supported_languages`. + + Returns a list of supported languages for translation. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["translation_service_stub"].GetSupportedLanguages + + @property + def batch_translate_text(self): + """Return the gRPC stub for :meth:`TranslationServiceClient.batch_translate_text`. + + Translates 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 may still be available on + the specified output location. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["translation_service_stub"].BatchTranslateText + + @property + 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 does not exist. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["translation_service_stub"].CreateGlossary + + @property + def list_glossaries(self): + """Return the gRPC stub for :meth:`TranslationServiceClient.list_glossaries`. + + Lists glossaries in a project. Returns NOT\_FOUND, if the project does + not exist. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["translation_service_stub"].ListGlossaries + + @property + def get_glossary(self): + """Return the gRPC stub for :meth:`TranslationServiceClient.get_glossary`. + + Gets a glossary. Returns NOT\_FOUND, if the glossary or the project do + not exist. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["translation_service_stub"].GetGlossary + + @property + 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 or the project do + not exist. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["translation_service_stub"].DeleteGlossary diff --git a/translate/google/cloud/translate_v3alpha1/proto/__init__.py b/translate/google/cloud/translate_v3alpha1/proto/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/translate/google/cloud/translate_v3alpha1/proto/translation_service_pb2.py b/translate/google/cloud/translate_v3alpha1/proto/translation_service_pb2.py new file mode 100644 index 000000000000..68d339837ae4 --- /dev/null +++ b/translate/google/cloud/translate_v3alpha1/proto/translation_service_pb2.py @@ -0,0 +1,3618 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/translation_v3alpha1/proto/translation_service.proto + +import sys + +_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.longrunning import ( + operations_pb2 as google_dot_longrunning_dot_operations__pb2, +) +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor.FileDescriptor( + name="google/cloud/translation_v3alpha1/proto/translation_service.proto", + package="google.cloud.translation.v3alpha1", + syntax="proto3", + serialized_options=_b( + "\n%com.google.cloud.translation.v3alpha1B\027TranslationServiceProtoP\001ZLgoogle.golang.org/genproto/googleapis/cloud/translation/v3alpha1;translation\370\001\001" + ), + serialized_pb=_b( + '\nAgoogle/cloud/translation_v3alpha1/proto/translation_service.proto\x12!google.cloud.translation.v3alpha1\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto"D\n\x1bTranslateTextGlossaryConfig\x12\x10\n\x08glossary\x18\x01 \x01(\t\x12\x13\n\x0bignore_case\x18\x02 \x01(\x08"\x8d\x02\n\x14TranslateTextRequest\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x1c\n\x14source_language_code\x18\x04 \x01(\t\x12!\n\x15target_language_codes\x18\x05 \x03(\tB\x02\x18\x01\x12\x1c\n\x14target_language_code\x18\x08 \x01(\t\x12\r\n\x05model\x18\x06 \x01(\t\x12W\n\x0fglossary_config\x18\x07 \x01(\x0b\x32>.google.cloud.translation.v3alpha1.TranslateTextGlossaryConfigB\x08\n\x06source"\x95\x03\n\x15TranslateTextResponse\x12\x64\n\x0ctranslations\x18\x01 \x03(\x0b\x32J.google.cloud.translation.v3alpha1.TranslateTextResponse.TranslationsEntryB\x02\x18\x01\x12\x43\n\x0btranslation\x18\x04 \x01(\x0b\x32..google.cloud.translation.v3alpha1.Translation\x12\x1e\n\x16\x64\x65tected_language_code\x18\x02 \x01(\t\x12L\n\x14glossary_translation\x18\x03 \x01(\x0b\x32..google.cloud.translation.v3alpha1.Translation\x1a\x63\n\x11TranslationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.translation.v3alpha1.Translation:\x02\x38\x01"\x8e\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12W\n\x0fglossary_config\x18\x03 \x01(\x0b\x32>.google.cloud.translation.v3alpha1.TranslateTextGlossaryConfig"U\n\x15\x44\x65tectLanguageRequest\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\tB\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\x46\n\tlanguages\x18\x01 \x03(\x0b\x32\x33.google.cloud.translation.v3alpha1.DetectedLanguage"K\n\x1cGetSupportedLanguagesRequest\x12\x1d\n\x15\x64isplay_language_code\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t"]\n\x12SupportedLanguages\x12G\n\tlanguages\x18\x01 \x03(\x0b\x32\x34.google.cloud.translation.v3alpha1.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"n\n\x0bInputConfig\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x42\n\ngcs_source\x18\x02 \x01(\x0b\x32,.google.cloud.translation.v3alpha1.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"k\n\x0cOutputConfig\x12L\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x31.google.cloud.translation.v3alpha1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xd5\x04\n\x19\x42\x61tchTranslateTextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1d\n\x15target_language_codes\x18\x03 \x03(\t\x12X\n\x06models\x18\x04 \x03(\x0b\x32H.google.cloud.translation.v3alpha1.BatchTranslateTextRequest.ModelsEntry\x12\x45\n\rinput_configs\x18\x05 \x03(\x0b\x32..google.cloud.translation.v3alpha1.InputConfig\x12\x46\n\routput_config\x18\x06 \x01(\x0b\x32/.google.cloud.translation.v3alpha1.OutputConfig\x12`\n\nglossaries\x18\x07 \x03(\x0b\x32L.google.cloud.translation.v3alpha1.BatchTranslateTextRequest.GlossariesEntry\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aq\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.translation.v3alpha1.TranslateTextGlossaryConfig:\x02\x38\x01"\xd5\x02\n\x16\x42\x61tchTranslateMetadata\x12N\n\x05state\x18\x01 \x01(\x0e\x32?.google.cloud.translation.v3alpha1.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"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nSUCCESSFUL\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"c\n\x13GlossaryInputConfig\x12\x42\n\ngcs_source\x18\x01 \x01(\x0b\x32,.google.cloud.translation.v3alpha1.GcsSourceH\x00\x42\x08\n\x06source"\xbb\x05\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x46\n\x04type\x18\x02 \x01(\x0e\x32\x38.google.cloud.translation.v3alpha1.Glossary.GlossaryType\x12U\n\rlanguage_pair\x18\x03 \x01(\x0b\x32<.google.cloud.translation.v3alpha1.Glossary.LanguageCodePairH\x00\x12Z\n\x12language_codes_set\x18\x04 \x01(\x0b\x32<.google.cloud.translation.v3alpha1.Glossary.LanguageCodesSetH\x00\x12L\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.translation.v3alpha1.GlossaryInputConfig\x12\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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"[\n\x0cGlossaryType\x12\x1d\n\x19GLOSSARY_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUNIDIRECTIONAL\x10\x01\x12\x18\n\x14\x45QUIVALENT_TERMS_SET\x10\x02\x42\x0b\n\tlanguages"f\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12=\n\x08glossary\x18\x02 \x01(\x0b\x32+.google.cloud.translation.v3alpha1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"r\n\x16ListGlossariesResponse\x12?\n\nglossaries\x18\x01 \x03(\x0b\x32+.google.cloud.translation.v3alpha1.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8f\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x05state\x18\x02 \x01(\x0e\x32?.google.cloud.translation.v3alpha1.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nSUCCESSFUL\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x8f\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x05state\x18\x02 \x01(\x0e\x32?.google.cloud.translation.v3alpha1.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nSUCCESSFUL\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\xe4\x0e\n\x12TranslationService\x12\xab\x02\n\rTranslateText\x12\x37.google.cloud.translation.v3alpha1.TranslateTextRequest\x1a\x38.google.cloud.translation.v3alpha1.TranslateTextResponse"\xa6\x01\x82\xd3\xe4\x93\x02\x9f\x01"@/v3alpha1/{model=projects/*/locations/*/models/**}:translateText:\x01*Z""\x1d/v3alpha1/documents:translate:\x01*Z4"//v3alpha1/{model=projects/*/models/*}:translate:\x01*\x12\xcc\x02\n\x0e\x44\x65tectLanguage\x12\x38.google.cloud.translation.v3alpha1.DetectLanguageRequest\x1a\x39.google.cloud.translation.v3alpha1.DetectLanguageResponse"\xc4\x01\x82\xd3\xe4\x93\x02\xbd\x01"6/v3alpha1/{name=projects/*/locations/*}:detectLanguage:\x01*ZW"R/v3alpha1/{name=projects/*/locations/*/models/language-detection/*}:detectLanguage:\x01*Z\'""/v3alpha1/documents:detectLanguage:\x01*\x12\xbd\x02\n\x15GetSupportedLanguages\x12?.google.cloud.translation.v3alpha1.GetSupportedLanguagesRequest\x1a\x35.google.cloud.translation.v3alpha1.SupportedLanguages"\xab\x01\x82\xd3\xe4\x93\x02\xa4\x01\x12:/v3alpha1/{name=projects/*/locations/*}/supportedLanguagesZF\x12\x44/v3alpha1/{name=projects/*/locations/*/models/**}/supportedLanguagesZ\x1e\x12\x1c/v3alpha1/supportedLanguages\x12\xba\x01\n\x12\x42\x61tchTranslateText\x12<.google.cloud.translation.v3alpha1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"G\x82\xd3\xe4\x93\x02\x41" Date: Fri, 8 Mar 2019 17:32:58 -0800 Subject: [PATCH 3/8] generate v3beta1 --- .../cloud/translate_v3alpha1/gapic/enums.py | 34 - .../__init__.py | 8 +- .../gapic/__init__.py | 0 .../gapic/translation_service_client.py | 284 ++-- .../translation_service_client_config.py | 2 +- .../gapic/transports/__init__.py | 0 .../translation_service_grpc_transport.py | 31 +- .../proto/__init__.py | 0 .../proto/translation_service_pb2.py | 1165 ++++++++--------- .../proto/translation_service_pb2_grpc.py | 99 +- .../types.py | 4 +- translate/synth.metadata | 6 +- translate/synth.py | 4 +- ...est_translation_service_client_v3beta1.py} | 95 +- 14 files changed, 788 insertions(+), 944 deletions(-) delete mode 100644 translate/google/cloud/translate_v3alpha1/gapic/enums.py rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/__init__.py (75%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/gapic/__init__.py (100%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/gapic/translation_service_client.py (78%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/gapic/translation_service_client_config.py (97%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/gapic/transports/__init__.py (100%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/gapic/transports/translation_service_grpc_transport.py (89%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/proto/__init__.py (100%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/proto/translation_service_pb2.py (67%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/proto/translation_service_pb2_grpc.py (63%) rename translate/google/cloud/{translate_v3alpha1 => translate_v3beta1}/types.py (90%) rename translate/tests/unit/gapic/{v3alpha1/test_translation_service_client_v3alpha1.py => v3beta1/test_translation_service_client_v3beta1.py} (83%) diff --git a/translate/google/cloud/translate_v3alpha1/gapic/enums.py b/translate/google/cloud/translate_v3alpha1/gapic/enums.py deleted file mode 100644 index d97014f6edad..000000000000 --- a/translate/google/cloud/translate_v3alpha1/gapic/enums.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""Wrappers for protocol buffer enum types.""" - -import enum - - -class Glossary(object): - class GlossaryType(enum.IntEnum): - """ - Glossary type. - - Attributes: - GLOSSARY_TYPE_UNSPECIFIED (int): Invalid. - UNIDIRECTIONAL (int): A single language pair e.g., CSV file with source=>target mapping. - EQUIVALENT_TERMS_SET (int): Any language pair from a set of supported languages e.g., GTT glossaries. - """ - - GLOSSARY_TYPE_UNSPECIFIED = 0 - UNIDIRECTIONAL = 1 - EQUIVALENT_TERMS_SET = 2 diff --git a/translate/google/cloud/translate_v3alpha1/__init__.py b/translate/google/cloud/translate_v3beta1/__init__.py similarity index 75% rename from translate/google/cloud/translate_v3alpha1/__init__.py rename to translate/google/cloud/translate_v3beta1/__init__.py index 38b8c318af30..47f805155ac6 100644 --- a/translate/google/cloud/translate_v3alpha1/__init__.py +++ b/translate/google/cloud/translate_v3beta1/__init__.py @@ -16,14 +16,12 @@ from __future__ import absolute_import -from google.cloud.translation_v3alpha1 import types -from google.cloud.translation_v3alpha1.gapic import enums -from google.cloud.translation_v3alpha1.gapic import translation_service_client +from google.cloud.translation_v3beta1 import types +from google.cloud.translation_v3beta1.gapic import translation_service_client class TranslationServiceClient(translation_service_client.TranslationServiceClient): __doc__ = translation_service_client.TranslationServiceClient.__doc__ - enums = enums -__all__ = ("enums", "types", "TranslationServiceClient") +__all__ = ("types", "TranslationServiceClient") diff --git a/translate/google/cloud/translate_v3alpha1/gapic/__init__.py b/translate/google/cloud/translate_v3beta1/gapic/__init__.py similarity index 100% rename from translate/google/cloud/translate_v3alpha1/gapic/__init__.py rename to translate/google/cloud/translate_v3beta1/gapic/__init__.py diff --git a/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client.py b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py similarity index 78% rename from translate/google/cloud/translate_v3alpha1/gapic/translation_service_client.py rename to translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py index d70866f19e72..fbd66ad66c74 100644 --- a/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client.py +++ b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py @@ -13,7 +13,7 @@ # 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. -"""Accesses the google.cloud.translation.v3alpha1 TranslationService API.""" +"""Accesses the google.cloud.translation.v3beta1 TranslationService API.""" import functools import pkg_resources @@ -31,13 +31,12 @@ import google.api_core.protobuf_helpers import grpc -from google.cloud.translation_v3alpha1.gapic import enums -from google.cloud.translation_v3alpha1.gapic import translation_service_client_config -from google.cloud.translation_v3alpha1.gapic.transports import ( +from google.cloud.translation_v3beta1.gapic import translation_service_client_config +from google.cloud.translation_v3beta1.gapic.transports import ( translation_service_grpc_transport, ) -from google.cloud.translation_v3alpha1.proto import translation_service_pb2 -from google.cloud.translation_v3alpha1.proto import translation_service_pb2_grpc +from google.cloud.translation_v3beta1.proto import translation_service_pb2 +from google.cloud.translation_v3beta1.proto import translation_service_pb2_grpc from google.longrunning import operations_pb2 _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( @@ -53,7 +52,7 @@ class TranslationServiceClient(object): # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = "google.cloud.translation.v3alpha1.TranslationService" + _INTERFACE_NAME = "google.cloud.translation.v3beta1.TranslationService" @classmethod def from_service_account_file(cls, filename, *args, **kwargs): @@ -94,16 +93,6 @@ def glossary_path(cls, project, location, glossary): glossary=glossary, ) - @classmethod - def model_path_path(cls, project, location, model_path): - """Return a fully-qualified model_path string.""" - return google.api_core.path_template.expand( - "projects/{project}/locations/{location}/models/{model_path=**}", - project=project, - location=location, - model_path=model_path, - ) - def __init__( self, transport=None, @@ -205,11 +194,11 @@ def __init__( # Service calls def translate_text( self, + contents, target_language_code, - content=None, mime_type=None, source_language_code=None, - target_language_codes=None, + parent=None, model=None, glossary_config=None, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -217,52 +206,57 @@ def translate_text( metadata=None, ): """ - Translates input text, returning translated text. + Translates input text and returns translated text. Example: - >>> from google.cloud import translation_v3alpha1 + >>> from google.cloud import translation_v3beta1 + >>> + >>> client = translation_v3beta1.TranslationServiceClient() >>> - >>> client = translation_v3alpha1.TranslationServiceClient() + >>> # TODO: Initialize `contents`: + >>> contents = [] >>> >>> # TODO: Initialize `target_language_code`: >>> target_language_code = '' >>> - >>> response = client.translate_text(target_language_code) + >>> response = client.translate_text(contents, target_language_code) Args: + contents (list[str]): Required. The content of the input in string format. + We recommend the total contents to be less than 30k codepoints. + Please 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. - content (str): Required. The content of the input in string format. - We recommend to use shorter string (<=10k characters. i.e. Unicode - codepoints). - Please use BatchTranslateText for larger text. - mime_type (str): Optional. The format of the source text e.g., "text/html", "text/plain". - If left blank, the MIME type is assumed to be "text/html". + mime_type (str): Optional. The format of the source text, for example, "text/html", + "text/plain". If left blank, the MIME type is assumed to be "text/html". source_language_code (str): Optional. The BCP-47 language code of the input text if - known, e.g. "en-US" or "sr-Latn". Supported language codes are listed in - Language Support. If the source language is not specified, the API will - attempt to identify the source language automatically and return it within - the response. - target_language_codes (list[str]): *DEPRECATED* The BCP-47 language codes to use for translation of the - input text, set to one of the language codes listed in Language Support. - Repeat if input must be translated to multiple languages. + known, 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 + the source language within the response. + parent (str): Optional. Only used when making regionalized call. + Format: + projects/{project-id}/locations/{location-id}. + + Only custom model/glossary within the same location-id can be used. + Otherwise 400 is returned. model (str): Optional. The ``model`` type requested for this translation. The format depends on model type: 1. Custom models: - /projects/{project-id}/locations/{location-id}/models/{model-id}. 2. + projects/{project-id}/locations/{location-id}/models/{model-id}. 2. General (built-in) models: - /projects/{project-id}/locations/{location-id}/models/general/nmt - /projects/{project-id}/locations/{location-id}/models/general/base + projects/{project-id}/locations/{location-id}/models/general/nmt + projects/{project-id}/locations/{location-id}/models/general/base For global (non-regionalized) requests, use {location-id} 'global'. For - example, /projects/{project-id}/locations/global/models/general/nmt + example, projects/{project-id}/locations/global/models/general/nmt - If missing, the system will decide the best model to use. - glossary_config (Union[dict, ~google.cloud.translation_v3alpha1.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. Glossary needs to be in the same region - as the model, otherwise error 400 is returned. + If missing, the system decides which google base model to use. + glossary_config (Union[dict, ~google.cloud.translation_v3beta1.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. The glossary needs to be in the same + region as the model, otherwise an INVALID\_ARGUMENT error is returned. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3alpha1.types.TranslateTextGlossaryConfig` + message :class:`~google.cloud.translation_v3beta1.types.TranslateTextGlossaryConfig` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -273,7 +267,7 @@ def translate_text( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3alpha1.types.TranslateTextResponse` instance. + A :class:`~google.cloud.translation_v3beta1.types.TranslateTextResponse` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -293,16 +287,12 @@ def translate_text( client_info=self._client_info, ) - # Sanity check: We have some fields which are mutually exclusive; - # raise ValueError if more than one is sent. - google.api_core.protobuf_helpers.check_oneof(content=content) - request = translation_service_pb2.TranslateTextRequest( + contents=contents, target_language_code=target_language_code, - content=content, mime_type=mime_type, source_language_code=source_language_code, - target_language_codes=target_language_codes, + parent=parent, model=model, glossary_config=glossary_config, ) @@ -312,7 +302,8 @@ def translate_text( def detect_language( self, - name, + parent=None, + model=None, content=None, mime_type=None, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -323,24 +314,25 @@ def detect_language( Detects the language of text within a request. Example: - >>> from google.cloud import translation_v3alpha1 + >>> from google.cloud import translation_v3beta1 >>> - >>> client = translation_v3alpha1.TranslationServiceClient() + >>> client = translation_v3beta1.TranslationServiceClient() >>> - >>> name = client.location_path('[PROJECT]', '[LOCATION]') - >>> - >>> response = client.detect_language(name) + >>> response = client.detect_language() Args: - name (str): Optional. Used for making regionalized calls. - Format: /projects/{project-id}/locations/{location-id}. - For global calls, use /projects/{project-id}/locations/global. - If missing, the call is treated as a global call. - content (str): The content of the input in string format. - mime_type (str): Optional. The format of the source text e.g., "text/html", "text/plain". - If left blank, the MIME type is assumed to be "text/html" for inline - requests, or will be automatically determined from the uploaded content's - MIME type. + parent (str): Optional. Only used when making regionalized call. + Format: + projects/{project-id}/locations/{location-id}. + + Only custom model within the same location-id can be used. + Otherwise 400 is returned. + model (str): Optional. The language detection model to be used. + projects/{project-id}/locations/{location-id}/models/language-detection/{model-id} + If not specified, default will be used. + content (str): The content of the input stored as a string. + mime_type (str): Optional. The format of the source text, for example, "text/html", + "text/plain". If left blank, the MIME type is assumed to be "text/html". retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -351,7 +343,7 @@ def detect_language( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3alpha1.types.DetectLanguageResponse` instance. + A :class:`~google.cloud.translation_v3beta1.types.DetectLanguageResponse` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -376,7 +368,7 @@ def detect_language( google.api_core.protobuf_helpers.check_oneof(content=content) request = translation_service_pb2.DetectLanguageRequest( - name=name, content=content, mime_type=mime_type + parent=parent, model=model, content=content, mime_type=mime_type ) return self._inner_api_calls["detect_language"]( request, retry=retry, timeout=timeout, metadata=metadata @@ -384,8 +376,9 @@ def detect_language( def get_supported_languages( self, - name, + parent=None, display_language_code=None, + model=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -394,22 +387,31 @@ def get_supported_languages( Returns a list of supported languages for translation. Example: - >>> from google.cloud import translation_v3alpha1 - >>> - >>> client = translation_v3alpha1.TranslationServiceClient() + >>> from google.cloud import translation_v3beta1 >>> - >>> name = client.location_path('[PROJECT]', '[LOCATION]') + >>> client = translation_v3beta1.TranslationServiceClient() >>> - >>> response = client.get_supported_languages(name) + >>> response = client.get_supported_languages() Args: - name (str): Optional. The ``name`` can be in one of two formats: 1. Location: - 'projects/*/locations/*'. Returns all languages supported by Cloud - Translation API. 2. Model name: 'projects/*/locations/*/models/\*\*'. - Returns languages supported by the specified model. If missing, case 1 - is used. + parent (str): Optional. Used for making regionalized calls. + Format: projects/{project-id}/locations/{location-id}. + For global calls, use projects/{project-id}/locations/global. + If missing, the call is treated as a global call. + + Only custom model within the same location-id can be used. + Otherwise 400 is returned. display_language_code (str): Optional. The language to use to return localized, human readable names of supported languages. If missing, default language is ENGLISH. + model (str): Optional. Get supported languages of this model. + The format depends on model type: + 1. Custom models: + projects/{project-id}/locations/{location-id}/models/{model-id}. + 2. General (built-in) models: + projects/{project-id}/locations/{location-id}/models/general/nmt + projects/{project-id}/locations/{location-id}/models/general/base + Returns languages supported by the specified model. + If missing, we get supported languages of Google general NMT model. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -420,7 +422,7 @@ def get_supported_languages( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3alpha1.types.SupportedLanguages` instance. + A :class:`~google.cloud.translation_v3beta1.types.SupportedLanguages` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -441,7 +443,7 @@ def get_supported_languages( ) request = translation_service_pb2.GetSupportedLanguagesRequest( - name=name, display_language_code=display_language_code + parent=parent, display_language_code=display_language_code, model=model ) return self._inner_api_calls["get_supported_languages"]( request, retry=retry, timeout=timeout, metadata=metadata @@ -449,11 +451,11 @@ def get_supported_languages( def batch_translate_text( self, - parent, + source_language_code, target_language_codes, input_configs, output_config, - source_language_code=None, + parent=None, models=None, glossaries=None, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -461,17 +463,21 @@ def batch_translate_text( metadata=None, ): """ - Translates 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 may still be available on - the specified output location. + 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 call returns immediately and you can + use google.longrunning.Operation.name to poll the status of the call. Example: - >>> from google.cloud import translation_v3alpha1 + >>> from google.cloud import translation_v3beta1 >>> - >>> client = translation_v3alpha1.TranslationServiceClient() + >>> client = translation_v3beta1.TranslationServiceClient() >>> - >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> # TODO: Initialize `source_language_code`: + >>> source_language_code = '' >>> >>> # TODO: Initialize `target_language_codes`: >>> target_language_codes = [] @@ -482,7 +488,7 @@ def batch_translate_text( >>> # TODO: Initialize `output_config`: >>> output_config = {} >>> - >>> response = client.batch_translate_text(parent, target_language_codes, input_configs, output_config) + >>> response = client.batch_translate_text(source_language_code, target_language_codes, input_configs, output_config) >>> >>> def callback(operation_future): ... # Handle result. @@ -494,45 +500,45 @@ def batch_translate_text( >>> metadata = response.metadata() Args: - parent (str): Optional. Only used when making regionalized call. - Format: - /projects/{project-id}/locations/{location-id}. - - Only custom models/glossaries within the same location-id can be used. - Otherwise 400 is returned. + source_language_code (str): Required. Source language code. target_language_codes (list[str]): Required. Specify up to 10 language codes here. - input_configs (list[Union[dict, ~google.cloud.translation_v3alpha1.types.InputConfig]]): Required. Input configurations. + input_configs (list[Union[dict, ~google.cloud.translation_v3beta1.types.InputConfig]]): Required. Input configurations. The total number of files matched should be <= 1000. The total content size should be <= 100M Unicode codepoints. + The files must use UTF-8 encoding. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3alpha1.types.InputConfig` - output_config (Union[dict, ~google.cloud.translation_v3alpha1.types.OutputConfig]): Required. Output configuration. - If 2 input configs match to the same file (i.e. same input path), + message :class:`~google.cloud.translation_v3beta1.types.InputConfig` + output_config (Union[dict, ~google.cloud.translation_v3beta1.types.OutputConfig]): Required. Output configuration. + If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3alpha1.types.OutputConfig` - source_language_code (str): Optional. Source language code. - If missing, source language is identified automatically. + message :class:`~google.cloud.translation_v3beta1.types.OutputConfig` + parent (str): Optional. Only used when making regionalized call. + Format: + projects/{project-id}/locations/{location-id}. + + Only custom models/glossaries within the same location-id can be used. + Otherwise 400 is returned. models (dict[str -> str]): 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 a custom model built by AutoML. The value format depends on model type: 1. Custom models: - /projects/{project-id}/locations/{location-id}/models/{model-id}. + projects/{project-id}/locations/{location-id}/models/{model-id}. 2. General (built-in) models: - /projects/{project-id}/locations/{location-id}/models/general/nmt - /projects/{project-id}/locations/{location-id}/models/general/base + projects/{project-id}/locations/{location-id}/models/general/nmt + projects/{project-id}/locations/{location-id}/models/general/base If the map is empty or a specific model is not requested for a language pair, then default google model is used. - glossaries (dict[str -> Union[dict, ~google.cloud.translation_v3alpha1.types.TranslateTextGlossaryConfig]]): Optional. Glossaries to be applied for translation. - It is keyed by target language code. + glossaries (dict[str -> Union[dict, ~google.cloud.translation_v3beta1.types.TranslateTextGlossaryConfig]]): Optional. Glossaries to be applied for translation. + It's keyed by target language code. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3alpha1.types.TranslateTextGlossaryConfig` + message :class:`~google.cloud.translation_v3beta1.types.TranslateTextGlossaryConfig` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -543,7 +549,7 @@ def batch_translate_text( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3alpha1.types._OperationFuture` instance. + A :class:`~google.cloud.translation_v3beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -564,11 +570,11 @@ def batch_translate_text( ) request = translation_service_pb2.BatchTranslateTextRequest( - parent=parent, + source_language_code=source_language_code, target_language_codes=target_language_codes, input_configs=input_configs, output_config=output_config, - source_language_code=source_language_code, + parent=parent, models=models, glossaries=glossaries, ) @@ -591,13 +597,13 @@ def create_glossary( metadata=None, ): """ - Creates a glossary and returns the long running operation. Returns - NOT\_FOUND, if the project does not exist. + Creates a glossary and returns the long-running operation. Returns + NOT\_FOUND, if the project doesn't exist. Example: - >>> from google.cloud import translation_v3alpha1 + >>> from google.cloud import translation_v3beta1 >>> - >>> client = translation_v3alpha1.TranslationServiceClient() + >>> client = translation_v3beta1.TranslationServiceClient() >>> >>> parent = client.location_path('[PROJECT]', '[LOCATION]') >>> @@ -617,10 +623,10 @@ def create_glossary( Args: parent (str): Required. The project name. - glossary (Union[dict, ~google.cloud.translation_v3alpha1.types.Glossary]): Required. The glossary to create. + glossary (Union[dict, ~google.cloud.translation_v3beta1.types.Glossary]): Required. The glossary to create. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3alpha1.types.Glossary` + message :class:`~google.cloud.translation_v3beta1.types.Glossary` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -631,7 +637,7 @@ def create_glossary( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3alpha1.types._OperationFuture` instance. + A :class:`~google.cloud.translation_v3beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -666,7 +672,7 @@ def create_glossary( def list_glossaries( self, - parent, + parent=None, page_size=None, filter_=None, retry=google.api_core.gapic_v1.method.DEFAULT, @@ -674,18 +680,16 @@ def list_glossaries( metadata=None, ): """ - Lists glossaries in a project. Returns NOT\_FOUND, if the project does - not exist. + Lists glossaries in a project. Returns NOT\_FOUND, if the project + doesn't exist. Example: - >>> from google.cloud import translation_v3alpha1 - >>> - >>> client = translation_v3alpha1.TranslationServiceClient() + >>> from google.cloud import translation_v3beta1 >>> - >>> parent = client.location_path('[PROJECT]', '[LOCATION]') + >>> client = translation_v3beta1.TranslationServiceClient() >>> >>> # Iterate over all results - >>> for element in client.list_glossaries(parent): + >>> for element in client.list_glossaries(): ... # process element ... pass >>> @@ -693,13 +697,13 @@ def list_glossaries( >>> # Alternatively: >>> >>> # Iterate over results one page at a time - >>> for page in client.list_glossaries(parent).pages: + >>> for page in client.list_glossaries().pages: ... for element in page: ... # process element ... pass Args: - parent (str): Required. The name of the project to list all of the glossaries from. + parent (str): Required. The name of the project from which to list all of the glossaries. page_size (int): The maximum number of resources contained in the underlying API response. If page streaming is performed per- resource, this parameter does not affect the return value. If page @@ -719,7 +723,7 @@ def list_glossaries( Returns: A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.translation_v3alpha1.types.Glossary` instances. + is an iterable of :class:`~google.cloud.translation_v3beta1.types.Glossary` instances. This object can also be configured to iterate over the pages of the response through the `options` parameter. @@ -767,13 +771,12 @@ def get_glossary( metadata=None, ): """ - Gets a glossary. Returns NOT\_FOUND, if the glossary or the project do - not exist. + Gets a glossary. Returns NOT\_FOUND, if the glossary doesn't exist. Example: - >>> from google.cloud import translation_v3alpha1 + >>> from google.cloud import translation_v3beta1 >>> - >>> client = translation_v3alpha1.TranslationServiceClient() + >>> client = translation_v3beta1.TranslationServiceClient() >>> >>> name = client.glossary_path('[PROJECT]', '[LOCATION]', '[GLOSSARY]') >>> @@ -791,7 +794,7 @@ def get_glossary( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3alpha1.types.Glossary` instance. + A :class:`~google.cloud.translation_v3beta1.types.Glossary` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -825,13 +828,12 @@ def delete_glossary( ): """ Deletes a glossary, or cancels glossary construction if the glossary - isn't created yet. Returns NOT\_FOUND, if the glossary or the project do - not exist. + isn't created yet. Returns NOT\_FOUND, if the glossary doesn't exist. Example: - >>> from google.cloud import translation_v3alpha1 + >>> from google.cloud import translation_v3beta1 >>> - >>> client = translation_v3alpha1.TranslationServiceClient() + >>> client = translation_v3beta1.TranslationServiceClient() >>> >>> name = client.glossary_path('[PROJECT]', '[LOCATION]', '[GLOSSARY]') >>> @@ -858,7 +860,7 @@ def delete_glossary( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3alpha1.types._OperationFuture` instance. + A :class:`~google.cloud.translation_v3beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request diff --git a/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client_config.py b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py similarity index 97% rename from translate/google/cloud/translate_v3alpha1/gapic/translation_service_client_config.py rename to translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py index ebc9c6c1d332..21b7872180e8 100644 --- a/translate/google/cloud/translate_v3alpha1/gapic/translation_service_client_config.py +++ b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py @@ -1,6 +1,6 @@ config = { "interfaces": { - "google.cloud.translation.v3alpha1.TranslationService": { + "google.cloud.translation.v3beta1.TranslationService": { "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], diff --git a/translate/google/cloud/translate_v3alpha1/gapic/transports/__init__.py b/translate/google/cloud/translate_v3beta1/gapic/transports/__init__.py similarity index 100% rename from translate/google/cloud/translate_v3alpha1/gapic/transports/__init__.py rename to translate/google/cloud/translate_v3beta1/gapic/transports/__init__.py diff --git a/translate/google/cloud/translate_v3alpha1/gapic/transports/translation_service_grpc_transport.py b/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py similarity index 89% rename from translate/google/cloud/translate_v3alpha1/gapic/transports/translation_service_grpc_transport.py rename to translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py index b3efd5cf8c49..c5e694518dc4 100644 --- a/translate/google/cloud/translate_v3alpha1/gapic/transports/translation_service_grpc_transport.py +++ b/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py @@ -17,12 +17,12 @@ import google.api_core.grpc_helpers import google.api_core.operations_v1 -from google.cloud.translation_v3alpha1.proto import translation_service_pb2_grpc +from google.cloud.translation_v3beta1.proto import translation_service_pb2_grpc class TranslationServiceGrpcTransport(object): """gRPC transport class providing stubs for - google.cloud.translation.v3alpha1 TranslationService API. + google.cloud.translation.v3beta1 TranslationService API. The transport provides access to the raw gRPC stubs, which can be used to take advantage of advanced @@ -112,7 +112,7 @@ def channel(self): def translate_text(self): """Return the gRPC stub for :meth:`TranslationServiceClient.translate_text`. - Translates input text, returning translated text. + Translates input text and returns translated text. Returns: Callable: A callable which accepts the appropriate @@ -151,10 +151,13 @@ def get_supported_languages(self): def batch_translate_text(self): """Return the gRPC stub for :meth:`TranslationServiceClient.batch_translate_text`. - Translates 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 may still be available on - the specified output location. + 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 call returns immediately and you can + use google.longrunning.Operation.name to poll the status of the call. Returns: Callable: A callable which accepts the appropriate @@ -167,8 +170,8 @@ def batch_translate_text(self): 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 does not exist. + Creates a glossary and returns the long-running operation. Returns + NOT\_FOUND, if the project doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -181,8 +184,8 @@ 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 does - not exist. + Lists glossaries in a project. Returns NOT\_FOUND, if the project + doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -195,8 +198,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 or the project do - not exist. + Gets a glossary. Returns NOT\_FOUND, if the glossary doesn't exist. Returns: Callable: A callable which accepts the appropriate @@ -210,8 +212,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 or the project do - not 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/translate/google/cloud/translate_v3alpha1/proto/__init__.py b/translate/google/cloud/translate_v3beta1/proto/__init__.py similarity index 100% rename from translate/google/cloud/translate_v3alpha1/proto/__init__.py rename to translate/google/cloud/translate_v3beta1/proto/__init__.py diff --git a/translate/google/cloud/translate_v3alpha1/proto/translation_service_pb2.py b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py similarity index 67% rename from translate/google/cloud/translate_v3alpha1/proto/translation_service_pb2.py rename to translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py index 68d339837ae4..3806fe1bfe97 100644 --- a/translate/google/cloud/translate_v3alpha1/proto/translation_service_pb2.py +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translation_v3alpha1/proto/translation_service.proto +# source: google/cloud/translation_v3beta1/proto/translation_service.proto import sys @@ -18,24 +18,22 @@ from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, ) -from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/translation_v3alpha1/proto/translation_service.proto", - package="google.cloud.translation.v3alpha1", + name="google/cloud/translation_v3beta1/proto/translation_service.proto", + package="google.cloud.translation.v3beta1", syntax="proto3", serialized_options=_b( - "\n%com.google.cloud.translation.v3alpha1B\027TranslationServiceProtoP\001ZLgoogle.golang.org/genproto/googleapis/cloud/translation/v3alpha1;translation\370\001\001" + "\n$com.google.cloud.translation.v3beta1B\027TranslationServiceProtoP\001ZKgoogle.golang.org/genproto/googleapis/cloud/translation/v3beta1;translation\370\001\001" ), serialized_pb=_b( - '\nAgoogle/cloud/translation_v3alpha1/proto/translation_service.proto\x12!google.cloud.translation.v3alpha1\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto"D\n\x1bTranslateTextGlossaryConfig\x12\x10\n\x08glossary\x18\x01 \x01(\t\x12\x13\n\x0bignore_case\x18\x02 \x01(\x08"\x8d\x02\n\x14TranslateTextRequest\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x1c\n\x14source_language_code\x18\x04 \x01(\t\x12!\n\x15target_language_codes\x18\x05 \x03(\tB\x02\x18\x01\x12\x1c\n\x14target_language_code\x18\x08 \x01(\t\x12\r\n\x05model\x18\x06 \x01(\t\x12W\n\x0fglossary_config\x18\x07 \x01(\x0b\x32>.google.cloud.translation.v3alpha1.TranslateTextGlossaryConfigB\x08\n\x06source"\x95\x03\n\x15TranslateTextResponse\x12\x64\n\x0ctranslations\x18\x01 \x03(\x0b\x32J.google.cloud.translation.v3alpha1.TranslateTextResponse.TranslationsEntryB\x02\x18\x01\x12\x43\n\x0btranslation\x18\x04 \x01(\x0b\x32..google.cloud.translation.v3alpha1.Translation\x12\x1e\n\x16\x64\x65tected_language_code\x18\x02 \x01(\t\x12L\n\x14glossary_translation\x18\x03 \x01(\x0b\x32..google.cloud.translation.v3alpha1.Translation\x1a\x63\n\x11TranslationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.translation.v3alpha1.Translation:\x02\x38\x01"\x8e\x01\n\x0bTranslation\x12\x17\n\x0ftranslated_text\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12W\n\x0fglossary_config\x18\x03 \x01(\x0b\x32>.google.cloud.translation.v3alpha1.TranslateTextGlossaryConfig"U\n\x15\x44\x65tectLanguageRequest\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\tB\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\x46\n\tlanguages\x18\x01 \x03(\x0b\x32\x33.google.cloud.translation.v3alpha1.DetectedLanguage"K\n\x1cGetSupportedLanguagesRequest\x12\x1d\n\x15\x64isplay_language_code\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t"]\n\x12SupportedLanguages\x12G\n\tlanguages\x18\x01 \x03(\x0b\x32\x34.google.cloud.translation.v3alpha1.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"n\n\x0bInputConfig\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x42\n\ngcs_source\x18\x02 \x01(\x0b\x32,.google.cloud.translation.v3alpha1.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"k\n\x0cOutputConfig\x12L\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32\x31.google.cloud.translation.v3alpha1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xd5\x04\n\x19\x42\x61tchTranslateTextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1d\n\x15target_language_codes\x18\x03 \x03(\t\x12X\n\x06models\x18\x04 \x03(\x0b\x32H.google.cloud.translation.v3alpha1.BatchTranslateTextRequest.ModelsEntry\x12\x45\n\rinput_configs\x18\x05 \x03(\x0b\x32..google.cloud.translation.v3alpha1.InputConfig\x12\x46\n\routput_config\x18\x06 \x01(\x0b\x32/.google.cloud.translation.v3alpha1.OutputConfig\x12`\n\nglossaries\x18\x07 \x03(\x0b\x32L.google.cloud.translation.v3alpha1.BatchTranslateTextRequest.GlossariesEntry\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aq\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12M\n\x05value\x18\x02 \x01(\x0b\x32>.google.cloud.translation.v3alpha1.TranslateTextGlossaryConfig:\x02\x38\x01"\xd5\x02\n\x16\x42\x61tchTranslateMetadata\x12N\n\x05state\x18\x01 \x01(\x0e\x32?.google.cloud.translation.v3alpha1.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"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nSUCCESSFUL\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"c\n\x13GlossaryInputConfig\x12\x42\n\ngcs_source\x18\x01 \x01(\x0b\x32,.google.cloud.translation.v3alpha1.GcsSourceH\x00\x42\x08\n\x06source"\xbb\x05\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x46\n\x04type\x18\x02 \x01(\x0e\x32\x38.google.cloud.translation.v3alpha1.Glossary.GlossaryType\x12U\n\rlanguage_pair\x18\x03 \x01(\x0b\x32<.google.cloud.translation.v3alpha1.Glossary.LanguageCodePairH\x00\x12Z\n\x12language_codes_set\x18\x04 \x01(\x0b\x32<.google.cloud.translation.v3alpha1.Glossary.LanguageCodesSetH\x00\x12L\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x36.google.cloud.translation.v3alpha1.GlossaryInputConfig\x12\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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"[\n\x0cGlossaryType\x12\x1d\n\x19GLOSSARY_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eUNIDIRECTIONAL\x10\x01\x12\x18\n\x14\x45QUIVALENT_TERMS_SET\x10\x02\x42\x0b\n\tlanguages"f\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12=\n\x08glossary\x18\x02 \x01(\x0b\x32+.google.cloud.translation.v3alpha1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"r\n\x16ListGlossariesResponse\x12?\n\nglossaries\x18\x01 \x03(\x0b\x32+.google.cloud.translation.v3alpha1.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8f\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x05state\x18\x02 \x01(\x0e\x32?.google.cloud.translation.v3alpha1.CreateGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nSUCCESSFUL\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nCANCELLING\x10\x04\x12\r\n\tCANCELLED\x10\x05"\x8f\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12N\n\x05state\x18\x02 \x01(\x0e\x32?.google.cloud.translation.v3alpha1.DeleteGlossaryMetadata.State\x12/\n\x0bsubmit_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x0e\n\nSUCCESSFUL\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\xe4\x0e\n\x12TranslationService\x12\xab\x02\n\rTranslateText\x12\x37.google.cloud.translation.v3alpha1.TranslateTextRequest\x1a\x38.google.cloud.translation.v3alpha1.TranslateTextResponse"\xa6\x01\x82\xd3\xe4\x93\x02\x9f\x01"@/v3alpha1/{model=projects/*/locations/*/models/**}:translateText:\x01*Z""\x1d/v3alpha1/documents:translate:\x01*Z4"//v3alpha1/{model=projects/*/models/*}:translate:\x01*\x12\xcc\x02\n\x0e\x44\x65tectLanguage\x12\x38.google.cloud.translation.v3alpha1.DetectLanguageRequest\x1a\x39.google.cloud.translation.v3alpha1.DetectLanguageResponse"\xc4\x01\x82\xd3\xe4\x93\x02\xbd\x01"6/v3alpha1/{name=projects/*/locations/*}:detectLanguage:\x01*ZW"R/v3alpha1/{name=projects/*/locations/*/models/language-detection/*}:detectLanguage:\x01*Z\'""/v3alpha1/documents:detectLanguage:\x01*\x12\xbd\x02\n\x15GetSupportedLanguages\x12?.google.cloud.translation.v3alpha1.GetSupportedLanguagesRequest\x1a\x35.google.cloud.translation.v3alpha1.SupportedLanguages"\xab\x01\x82\xd3\xe4\x93\x02\xa4\x01\x12:/v3alpha1/{name=projects/*/locations/*}/supportedLanguagesZF\x12\x44/v3alpha1/{name=projects/*/locations/*/models/**}/supportedLanguagesZ\x1e\x12\x1c/v3alpha1/supportedLanguages\x12\xba\x01\n\x12\x42\x61tchTranslateText\x12<.google.cloud.translation.v3alpha1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"G\x82\xd3\xe4\x93\x02\x41".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"\x93\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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(\tB\x0b\n\tlanguages"e\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3beta1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"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\x80\x0c\n\x12TranslationService\x12\xc3\x01\n\rTranslateText\x12\x36.google.cloud.translation.v3beta1.TranslateTextRequest\x1a\x37.google.cloud.translation.v3beta1.TranslateTextResponse"A\x82\xd3\xe4\x93\x02;"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*\x12\xc7\x01\n\x0e\x44\x65tectLanguage\x12\x37.google.cloud.translation.v3beta1.DetectLanguageRequest\x1a\x38.google.cloud.translation.v3beta1.DetectLanguageResponse"B\x82\xd3\xe4\x93\x02<"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*\x12\xd2\x01\n\x15GetSupportedLanguages\x12>.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest\x1a\x34.google.cloud.translation.v3beta1.SupportedLanguages"C\x82\xd3\xe4\x93\x02=\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguages\x12\xb8\x01\n\x12\x42\x61tchTranslateText\x12;.google.cloud.translation.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"F\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xaf\x01\n\x0e\x43reateGlossary\x12\x37.google.cloud.translation.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xc0\x01\n\x0eListGlossaries\x12\x37.google.cloud.translation.v3beta1.ListGlossariesRequest\x1a\x38.google.cloud.translation.v3beta1.ListGlossariesResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\x12\xac\x01\n\x0bGetGlossary\x12\x34.google.cloud.translation.v3beta1.GetGlossaryRequest\x1a*.google.cloud.translation.v3beta1.Glossary";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\x12\xa5\x01\n\x0e\x44\x65leteGlossary\x12\x37.google.cloud.translation.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation";\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}B\x91\x01\n$com.google.cloud.translation.v3beta1B\x17TranslationServiceProtoP\x01ZKgoogle.golang.org/genproto/googleapis/cloud/translation/v3beta1;translation\xf8\x01\x01\x62\x06proto3' ), dependencies=[ google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_longrunning_dot_operations__pb2.DESCRIPTOR, - google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, ], ) @@ -43,7 +41,7 @@ _BATCHTRANSLATEMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translation.v3alpha1.BatchTranslateMetadata.State", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -58,7 +56,7 @@ name="RUNNING", index=1, number=1, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( - name="SUCCESSFUL", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( name="FAILED", index=3, number=3, serialized_options=None, type=None @@ -72,45 +70,14 @@ ], containing_type=None, serialized_options=None, - serialized_start=2800, - serialized_end=2902, + serialized_start=2558, + serialized_end=2659, ) _sym_db.RegisterEnumDescriptor(_BATCHTRANSLATEMETADATA_STATE) -_GLOSSARY_GLOSSARYTYPE = _descriptor.EnumDescriptor( - name="GlossaryType", - full_name="google.cloud.translation.v3alpha1.Glossary.GlossaryType", - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name="GLOSSARY_TYPE_UNSPECIFIED", - index=0, - number=0, - serialized_options=None, - type=None, - ), - _descriptor.EnumValueDescriptor( - name="UNIDIRECTIONAL", index=1, number=1, serialized_options=None, type=None - ), - _descriptor.EnumValueDescriptor( - name="EQUIVALENT_TERMS_SET", - index=2, - number=2, - serialized_options=None, - type=None, - ), - ], - containing_type=None, - serialized_options=None, - serialized_start=3807, - serialized_end=3898, -) -_sym_db.RegisterEnumDescriptor(_GLOSSARY_GLOSSARYTYPE) - _CREATEGLOSSARYMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translation.v3alpha1.CreateGlossaryMetadata.State", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -125,7 +92,7 @@ name="RUNNING", index=1, number=1, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( - name="SUCCESSFUL", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( name="FAILED", index=3, number=3, serialized_options=None, type=None @@ -139,14 +106,14 @@ ], containing_type=None, serialized_options=None, - serialized_start=2800, - serialized_end=2902, + serialized_start=2558, + serialized_end=2659, ) _sym_db.RegisterEnumDescriptor(_CREATEGLOSSARYMETADATA_STATE) _DELETEGLOSSARYMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryMetadata.State", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -161,7 +128,7 @@ name="RUNNING", index=1, number=1, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( - name="SUCCESSFUL", index=2, number=2, serialized_options=None, type=None + name="SUCCEEDED", index=2, number=2, serialized_options=None, type=None ), _descriptor.EnumValueDescriptor( name="FAILED", index=3, number=3, serialized_options=None, type=None @@ -175,22 +142,22 @@ ], containing_type=None, serialized_options=None, - serialized_start=2800, - serialized_end=2902, + serialized_start=2558, + serialized_end=2659, ) _sym_db.RegisterEnumDescriptor(_DELETEGLOSSARYMETADATA_STATE) _TRANSLATETEXTGLOSSARYCONFIG = _descriptor.Descriptor( name="TranslateTextGlossaryConfig", - full_name="google.cloud.translation.v3alpha1.TranslateTextGlossaryConfig", + full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="glossary", - full_name="google.cloud.translation.v3alpha1.TranslateTextGlossaryConfig.glossary", + full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig.glossary", index=0, number=1, type=9, @@ -208,7 +175,7 @@ ), _descriptor.FieldDescriptor( name="ignore_case", - full_name="google.cloud.translation.v3alpha1.TranslateTextGlossaryConfig.ignore_case", + full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig.ignore_case", index=1, number=2, type=8, @@ -233,28 +200,28 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=233, - serialized_end=301, + serialized_start=202, + serialized_end=270, ) _TRANSLATETEXTREQUEST = _descriptor.Descriptor( name="TranslateTextRequest", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="content", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest.content", + name="contents", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.contents", index=0, number=1, type=9, cpp_type=9, - label=1, + label=3, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -265,7 +232,7 @@ ), _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest.mime_type", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.mime_type", index=1, number=3, type=9, @@ -283,7 +250,7 @@ ), _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest.source_language_code", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.source_language_code", index=2, number=4, type=9, @@ -300,26 +267,26 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="target_language_codes", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest.target_language_codes", + name="target_language_code", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.target_language_code", index=3, number=5, type=9, cpp_type=9, - label=3, + label=1, has_default_value=False, - default_value=[], + default_value=_b("").decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=None, file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="target_language_code", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest.target_language_code", + name="parent", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.parent", index=4, number=8, type=9, @@ -337,7 +304,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest.model", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.model", index=5, number=6, type=9, @@ -355,7 +322,7 @@ ), _descriptor.FieldDescriptor( name="glossary_config", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest.glossary_config", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.glossary_config", index=6, number=7, type=11, @@ -379,37 +346,29 @@ is_extendable=False, syntax="proto3", extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name="source", - full_name="google.cloud.translation.v3alpha1.TranslateTextRequest.source", - index=0, - containing_type=None, - fields=[], - ) - ], - serialized_start=304, - serialized_end=573, + oneofs=[], + serialized_start=273, + serialized_end=511, ) -_TRANSLATETEXTRESPONSE_TRANSLATIONSENTRY = _descriptor.Descriptor( - name="TranslationsEntry", - full_name="google.cloud.translation.v3alpha1.TranslateTextResponse.TranslationsEntry", +_TRANSLATETEXTRESPONSE = _descriptor.Descriptor( + name="TranslateTextResponse", + full_name="google.cloud.translation.v3beta1.TranslateTextResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="key", - full_name="google.cloud.translation.v3alpha1.TranslateTextResponse.TranslationsEntry.key", + name="translations", + full_name="google.cloud.translation.v3beta1.TranslateTextResponse.translations", index=0, number=1, - type=9, - cpp_type=9, - label=1, + type=11, + cpp_type=10, + label=3, has_default_value=False, - default_value=_b("").decode("utf-8"), + default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -419,15 +378,15 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="value", - full_name="google.cloud.translation.v3alpha1.TranslateTextResponse.TranslationsEntry.value", + name="glossary_translations", + full_name="google.cloud.translation.v3beta1.TranslateTextResponse.glossary_translations", index=1, - number=2, + number=3, type=11, cpp_type=10, - label=1, + label=3, has_default_value=False, - default_value=None, + default_value=[], message_type=None, enum_type=None, containing_type=None, @@ -440,50 +399,51 @@ extensions=[], nested_types=[], enum_types=[], - serialized_options=_b("8\001"), + serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=882, - serialized_end=981, + serialized_start=514, + serialized_end=684, ) -_TRANSLATETEXTRESPONSE = _descriptor.Descriptor( - name="TranslateTextResponse", - full_name="google.cloud.translation.v3alpha1.TranslateTextResponse", + +_TRANSLATION = _descriptor.Descriptor( + name="Translation", + full_name="google.cloud.translation.v3beta1.Translation", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="translations", - full_name="google.cloud.translation.v3alpha1.TranslateTextResponse.translations", + name="translated_text", + full_name="google.cloud.translation.v3beta1.Translation.translated_text", index=0, number=1, - type=11, - cpp_type=10, - label=3, + type=9, + cpp_type=9, + label=1, has_default_value=False, - default_value=[], + default_value=_b("").decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=_b("\030\001"), + serialized_options=None, file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="translation", - full_name="google.cloud.translation.v3alpha1.TranslateTextResponse.translation", + name="model", + full_name="google.cloud.translation.v3beta1.Translation.model", index=1, - number=4, - type=11, - cpp_type=10, + number=2, + type=9, + cpp_type=9, label=1, has_default_value=False, - default_value=None, + default_value=_b("").decode("utf-8"), message_type=None, enum_type=None, containing_type=None, @@ -494,9 +454,9 @@ ), _descriptor.FieldDescriptor( name="detected_language_code", - full_name="google.cloud.translation.v3alpha1.TranslateTextResponse.detected_language_code", + full_name="google.cloud.translation.v3beta1.Translation.detected_language_code", index=2, - number=2, + number=4, type=9, cpp_type=9, label=1, @@ -511,8 +471,8 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="glossary_translation", - full_name="google.cloud.translation.v3alpha1.TranslateTextResponse.glossary_translation", + name="glossary_config", + full_name="google.cloud.translation.v3beta1.Translation.glossary_config", index=3, number=3, type=11, @@ -530,30 +490,30 @@ ), ], extensions=[], - nested_types=[_TRANSLATETEXTRESPONSE_TRANSLATIONSENTRY], + nested_types=[], enum_types=[], serialized_options=None, is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=576, - serialized_end=981, + serialized_start=687, + serialized_end=860, ) -_TRANSLATION = _descriptor.Descriptor( - name="Translation", - full_name="google.cloud.translation.v3alpha1.Translation", +_DETECTLANGUAGEREQUEST = _descriptor.Descriptor( + name="DetectLanguageRequest", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="translated_text", - full_name="google.cloud.translation.v3alpha1.Translation.translated_text", + name="parent", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.parent", index=0, - number=1, + number=5, type=9, cpp_type=9, label=1, @@ -569,65 +529,8 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translation.v3alpha1.Translation.model", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.model", index=1, - number=2, - type=9, - cpp_type=9, - label=1, - has_default_value=False, - default_value=_b("").decode("utf-8"), - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - _descriptor.FieldDescriptor( - name="glossary_config", - full_name="google.cloud.translation.v3alpha1.Translation.glossary_config", - index=2, - number=3, - type=11, - cpp_type=10, - label=1, - has_default_value=False, - default_value=None, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), - ], - extensions=[], - nested_types=[], - enum_types=[], - serialized_options=None, - is_extendable=False, - syntax="proto3", - extension_ranges=[], - oneofs=[], - serialized_start=984, - serialized_end=1126, -) - - -_DETECTLANGUAGEREQUEST = _descriptor.Descriptor( - name="DetectLanguageRequest", - full_name="google.cloud.translation.v3alpha1.DetectLanguageRequest", - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name="name", - full_name="google.cloud.translation.v3alpha1.DetectLanguageRequest.name", - index=0, number=4, type=9, cpp_type=9, @@ -644,8 +547,8 @@ ), _descriptor.FieldDescriptor( name="content", - full_name="google.cloud.translation.v3alpha1.DetectLanguageRequest.content", - index=1, + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.content", + index=2, number=1, type=9, cpp_type=9, @@ -662,8 +565,8 @@ ), _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translation.v3alpha1.DetectLanguageRequest.mime_type", - index=2, + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.mime_type", + index=3, number=3, type=9, cpp_type=9, @@ -689,27 +592,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translation.v3alpha1.DetectLanguageRequest.source", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=1128, - serialized_end=1213, + serialized_start=862, + serialized_end=964, ) _DETECTEDLANGUAGE = _descriptor.Descriptor( name="DetectedLanguage", - full_name="google.cloud.translation.v3alpha1.DetectedLanguage", + full_name="google.cloud.translation.v3beta1.DetectedLanguage", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_code", - full_name="google.cloud.translation.v3alpha1.DetectedLanguage.language_code", + full_name="google.cloud.translation.v3beta1.DetectedLanguage.language_code", index=0, number=1, type=9, @@ -727,7 +630,7 @@ ), _descriptor.FieldDescriptor( name="confidence", - full_name="google.cloud.translation.v3alpha1.DetectedLanguage.confidence", + full_name="google.cloud.translation.v3beta1.DetectedLanguage.confidence", index=1, number=2, type=2, @@ -752,21 +655,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1215, - serialized_end=1276, + serialized_start=966, + serialized_end=1027, ) _DETECTLANGUAGERESPONSE = _descriptor.Descriptor( name="DetectLanguageResponse", - full_name="google.cloud.translation.v3alpha1.DetectLanguageResponse", + full_name="google.cloud.translation.v3beta1.DetectLanguageResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="languages", - full_name="google.cloud.translation.v3alpha1.DetectLanguageResponse.languages", + full_name="google.cloud.translation.v3beta1.DetectLanguageResponse.languages", index=0, number=1, type=11, @@ -791,23 +694,23 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1278, - serialized_end=1374, + serialized_start=1029, + serialized_end=1124, ) _GETSUPPORTEDLANGUAGESREQUEST = _descriptor.Descriptor( name="GetSupportedLanguagesRequest", - full_name="google.cloud.translation.v3alpha1.GetSupportedLanguagesRequest", + full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( - name="display_language_code", - full_name="google.cloud.translation.v3alpha1.GetSupportedLanguagesRequest.display_language_code", + name="parent", + full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.parent", index=0, - number=1, + number=3, type=9, cpp_type=9, label=1, @@ -822,9 +725,27 @@ file=DESCRIPTOR, ), _descriptor.FieldDescriptor( - name="name", - full_name="google.cloud.translation.v3alpha1.GetSupportedLanguagesRequest.name", + name="display_language_code", + full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.display_language_code", index=1, + number=1, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="model", + full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.model", + index=2, number=2, type=9, cpp_type=9, @@ -848,21 +769,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1376, - serialized_end=1451, + serialized_start=1126, + serialized_end=1218, ) _SUPPORTEDLANGUAGES = _descriptor.Descriptor( name="SupportedLanguages", - full_name="google.cloud.translation.v3alpha1.SupportedLanguages", + full_name="google.cloud.translation.v3beta1.SupportedLanguages", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="languages", - full_name="google.cloud.translation.v3alpha1.SupportedLanguages.languages", + full_name="google.cloud.translation.v3beta1.SupportedLanguages.languages", index=0, number=1, type=11, @@ -887,21 +808,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1453, - serialized_end=1546, + serialized_start=1220, + serialized_end=1312, ) _SUPPORTEDLANGUAGE = _descriptor.Descriptor( name="SupportedLanguage", - full_name="google.cloud.translation.v3alpha1.SupportedLanguage", + full_name="google.cloud.translation.v3beta1.SupportedLanguage", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_code", - full_name="google.cloud.translation.v3alpha1.SupportedLanguage.language_code", + full_name="google.cloud.translation.v3beta1.SupportedLanguage.language_code", index=0, number=1, type=9, @@ -919,7 +840,7 @@ ), _descriptor.FieldDescriptor( name="display_name", - full_name="google.cloud.translation.v3alpha1.SupportedLanguage.display_name", + full_name="google.cloud.translation.v3beta1.SupportedLanguage.display_name", index=1, number=2, type=9, @@ -937,7 +858,7 @@ ), _descriptor.FieldDescriptor( name="support_source", - full_name="google.cloud.translation.v3alpha1.SupportedLanguage.support_source", + full_name="google.cloud.translation.v3beta1.SupportedLanguage.support_source", index=2, number=3, type=8, @@ -955,7 +876,7 @@ ), _descriptor.FieldDescriptor( name="support_target", - full_name="google.cloud.translation.v3alpha1.SupportedLanguage.support_target", + full_name="google.cloud.translation.v3beta1.SupportedLanguage.support_target", index=3, number=4, type=8, @@ -980,21 +901,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1548, - serialized_end=1660, + serialized_start=1314, + serialized_end=1426, ) _GCSSOURCE = _descriptor.Descriptor( name="GcsSource", - full_name="google.cloud.translation.v3alpha1.GcsSource", + full_name="google.cloud.translation.v3beta1.GcsSource", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="input_uri", - full_name="google.cloud.translation.v3alpha1.GcsSource.input_uri", + full_name="google.cloud.translation.v3beta1.GcsSource.input_uri", index=0, number=1, type=9, @@ -1019,21 +940,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1662, - serialized_end=1692, + serialized_start=1428, + serialized_end=1458, ) _INPUTCONFIG = _descriptor.Descriptor( name="InputConfig", - full_name="google.cloud.translation.v3alpha1.InputConfig", + full_name="google.cloud.translation.v3beta1.InputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translation.v3alpha1.InputConfig.mime_type", + full_name="google.cloud.translation.v3beta1.InputConfig.mime_type", index=0, number=1, type=9, @@ -1051,7 +972,7 @@ ), _descriptor.FieldDescriptor( name="gcs_source", - full_name="google.cloud.translation.v3alpha1.InputConfig.gcs_source", + full_name="google.cloud.translation.v3beta1.InputConfig.gcs_source", index=1, number=2, type=11, @@ -1078,27 +999,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translation.v3alpha1.InputConfig.source", + full_name="google.cloud.translation.v3beta1.InputConfig.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=1694, - serialized_end=1804, + serialized_start=1460, + serialized_end=1569, ) _GCSDESTINATION = _descriptor.Descriptor( name="GcsDestination", - full_name="google.cloud.translation.v3alpha1.GcsDestination", + full_name="google.cloud.translation.v3beta1.GcsDestination", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="output_uri_prefix", - full_name="google.cloud.translation.v3alpha1.GcsDestination.output_uri_prefix", + full_name="google.cloud.translation.v3beta1.GcsDestination.output_uri_prefix", index=0, number=1, type=9, @@ -1123,21 +1044,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1806, - serialized_end=1849, + serialized_start=1571, + serialized_end=1614, ) _OUTPUTCONFIG = _descriptor.Descriptor( name="OutputConfig", - full_name="google.cloud.translation.v3alpha1.OutputConfig", + full_name="google.cloud.translation.v3beta1.OutputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", - full_name="google.cloud.translation.v3alpha1.OutputConfig.gcs_destination", + full_name="google.cloud.translation.v3beta1.OutputConfig.gcs_destination", index=0, number=1, type=11, @@ -1164,27 +1085,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="destination", - full_name="google.cloud.translation.v3alpha1.OutputConfig.destination", + full_name="google.cloud.translation.v3beta1.OutputConfig.destination", index=0, containing_type=None, fields=[], ) ], - serialized_start=1851, - serialized_end=1958, + serialized_start=1616, + serialized_end=1722, ) _BATCHTRANSLATETEXTREQUEST_MODELSENTRY = _descriptor.Descriptor( name="ModelsEntry", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.ModelsEntry", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="key", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.ModelsEntry.key", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry.key", index=0, number=1, type=9, @@ -1202,7 +1123,7 @@ ), _descriptor.FieldDescriptor( name="value", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.ModelsEntry.value", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry.value", index=1, number=2, type=9, @@ -1227,20 +1148,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2398, - serialized_end=2443, + serialized_start=2158, + serialized_end=2203, ) _BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY = _descriptor.Descriptor( name="GlossariesEntry", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.GlossariesEntry", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="key", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.GlossariesEntry.key", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry.key", index=0, number=1, type=9, @@ -1258,7 +1179,7 @@ ), _descriptor.FieldDescriptor( name="value", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.GlossariesEntry.value", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry.value", index=1, number=2, type=11, @@ -1283,20 +1204,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2445, - serialized_end=2558, + serialized_start=2205, + serialized_end=2317, ) _BATCHTRANSLATETEXTREQUEST = _descriptor.Descriptor( name="BatchTranslateTextRequest", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.parent", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.parent", index=0, number=1, type=9, @@ -1314,7 +1235,7 @@ ), _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.source_language_code", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.source_language_code", index=1, number=2, type=9, @@ -1332,7 +1253,7 @@ ), _descriptor.FieldDescriptor( name="target_language_codes", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.target_language_codes", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.target_language_codes", index=2, number=3, type=9, @@ -1350,7 +1271,7 @@ ), _descriptor.FieldDescriptor( name="models", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.models", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.models", index=3, number=4, type=11, @@ -1368,7 +1289,7 @@ ), _descriptor.FieldDescriptor( name="input_configs", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.input_configs", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.input_configs", index=4, number=5, type=11, @@ -1386,7 +1307,7 @@ ), _descriptor.FieldDescriptor( name="output_config", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.output_config", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.output_config", index=5, number=6, type=11, @@ -1404,7 +1325,7 @@ ), _descriptor.FieldDescriptor( name="glossaries", - full_name="google.cloud.translation.v3alpha1.BatchTranslateTextRequest.glossaries", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.glossaries", index=6, number=7, type=11, @@ -1432,21 +1353,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1961, - serialized_end=2558, + serialized_start=1725, + serialized_end=2317, ) _BATCHTRANSLATEMETADATA = _descriptor.Descriptor( name="BatchTranslateMetadata", - full_name="google.cloud.translation.v3alpha1.BatchTranslateMetadata", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translation.v3alpha1.BatchTranslateMetadata.state", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.state", index=0, number=1, type=14, @@ -1464,7 +1385,7 @@ ), _descriptor.FieldDescriptor( name="translated_characters", - full_name="google.cloud.translation.v3alpha1.BatchTranslateMetadata.translated_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.translated_characters", index=1, number=2, type=3, @@ -1482,7 +1403,7 @@ ), _descriptor.FieldDescriptor( name="failed_characters", - full_name="google.cloud.translation.v3alpha1.BatchTranslateMetadata.failed_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.failed_characters", index=2, number=3, type=3, @@ -1500,7 +1421,7 @@ ), _descriptor.FieldDescriptor( name="total_characters", - full_name="google.cloud.translation.v3alpha1.BatchTranslateMetadata.total_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.total_characters", index=3, number=4, type=3, @@ -1518,7 +1439,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3alpha1.BatchTranslateMetadata.submit_time", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.submit_time", index=4, number=5, type=11, @@ -1543,21 +1464,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2561, - serialized_end=2902, + serialized_start=2320, + serialized_end=2659, ) _BATCHTRANSLATERESPONSE = _descriptor.Descriptor( name="BatchTranslateResponse", - full_name="google.cloud.translation.v3alpha1.BatchTranslateResponse", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="total_characters", - full_name="google.cloud.translation.v3alpha1.BatchTranslateResponse.total_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.total_characters", index=0, number=1, type=3, @@ -1575,7 +1496,7 @@ ), _descriptor.FieldDescriptor( name="translated_characters", - full_name="google.cloud.translation.v3alpha1.BatchTranslateResponse.translated_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.translated_characters", index=1, number=2, type=3, @@ -1593,7 +1514,7 @@ ), _descriptor.FieldDescriptor( name="failed_characters", - full_name="google.cloud.translation.v3alpha1.BatchTranslateResponse.failed_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.failed_characters", index=2, number=3, type=3, @@ -1611,7 +1532,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3alpha1.BatchTranslateResponse.submit_time", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.submit_time", index=3, number=4, type=11, @@ -1629,7 +1550,7 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translation.v3alpha1.BatchTranslateResponse.end_time", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.end_time", index=4, number=5, type=11, @@ -1654,21 +1575,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2905, - serialized_end=3108, + serialized_start=2662, + serialized_end=2865, ) _GLOSSARYINPUTCONFIG = _descriptor.Descriptor( name="GlossaryInputConfig", - full_name="google.cloud.translation.v3alpha1.GlossaryInputConfig", + full_name="google.cloud.translation.v3beta1.GlossaryInputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="gcs_source", - full_name="google.cloud.translation.v3alpha1.GlossaryInputConfig.gcs_source", + full_name="google.cloud.translation.v3beta1.GlossaryInputConfig.gcs_source", index=0, number=1, type=11, @@ -1695,27 +1616,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translation.v3alpha1.GlossaryInputConfig.source", + full_name="google.cloud.translation.v3beta1.GlossaryInputConfig.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=3110, - serialized_end=3209, + serialized_start=2867, + serialized_end=2965, ) _GLOSSARY_LANGUAGECODEPAIR = _descriptor.Descriptor( name="LanguageCodePair", - full_name="google.cloud.translation.v3alpha1.Glossary.LanguageCodePair", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translation.v3alpha1.Glossary.LanguageCodePair.source_language_code", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair.source_language_code", index=0, number=1, type=9, @@ -1733,7 +1654,7 @@ ), _descriptor.FieldDescriptor( name="target_language_code", - full_name="google.cloud.translation.v3alpha1.Glossary.LanguageCodePair.target_language_code", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair.target_language_code", index=1, number=2, type=9, @@ -1758,20 +1679,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3683, - serialized_end=3761, + serialized_start=3364, + serialized_end=3442, ) _GLOSSARY_LANGUAGECODESSET = _descriptor.Descriptor( name="LanguageCodesSet", - full_name="google.cloud.translation.v3alpha1.Glossary.LanguageCodesSet", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodesSet", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_codes", - full_name="google.cloud.translation.v3alpha1.Glossary.LanguageCodesSet.language_codes", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodesSet.language_codes", index=0, number=1, type=9, @@ -1796,20 +1717,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3763, - serialized_end=3805, + serialized_start=3444, + serialized_end=3486, ) _GLOSSARY = _descriptor.Descriptor( name="Glossary", - full_name="google.cloud.translation.v3alpha1.Glossary", + full_name="google.cloud.translation.v3beta1.Glossary", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3alpha1.Glossary.name", + full_name="google.cloud.translation.v3beta1.Glossary.name", index=0, number=1, type=9, @@ -1825,28 +1746,10 @@ serialized_options=None, file=DESCRIPTOR, ), - _descriptor.FieldDescriptor( - name="type", - full_name="google.cloud.translation.v3alpha1.Glossary.type", - index=1, - number=2, - type=14, - cpp_type=8, - label=1, - has_default_value=False, - default_value=0, - message_type=None, - enum_type=None, - containing_type=None, - is_extension=False, - extension_scope=None, - serialized_options=None, - file=DESCRIPTOR, - ), _descriptor.FieldDescriptor( name="language_pair", - full_name="google.cloud.translation.v3alpha1.Glossary.language_pair", - index=2, + full_name="google.cloud.translation.v3beta1.Glossary.language_pair", + index=1, number=3, type=11, cpp_type=10, @@ -1863,8 +1766,8 @@ ), _descriptor.FieldDescriptor( name="language_codes_set", - full_name="google.cloud.translation.v3alpha1.Glossary.language_codes_set", - index=3, + full_name="google.cloud.translation.v3beta1.Glossary.language_codes_set", + index=2, number=4, type=11, cpp_type=10, @@ -1881,8 +1784,8 @@ ), _descriptor.FieldDescriptor( name="input_config", - full_name="google.cloud.translation.v3alpha1.Glossary.input_config", - index=4, + full_name="google.cloud.translation.v3beta1.Glossary.input_config", + index=3, number=5, type=11, cpp_type=10, @@ -1899,8 +1802,8 @@ ), _descriptor.FieldDescriptor( name="entry_count", - full_name="google.cloud.translation.v3alpha1.Glossary.entry_count", - index=5, + full_name="google.cloud.translation.v3beta1.Glossary.entry_count", + index=4, number=6, type=5, cpp_type=1, @@ -1917,8 +1820,8 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3alpha1.Glossary.submit_time", - index=6, + full_name="google.cloud.translation.v3beta1.Glossary.submit_time", + index=5, number=7, type=11, cpp_type=10, @@ -1935,8 +1838,8 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translation.v3alpha1.Glossary.end_time", - index=7, + full_name="google.cloud.translation.v3beta1.Glossary.end_time", + index=6, number=8, type=11, cpp_type=10, @@ -1954,7 +1857,7 @@ ], extensions=[], nested_types=[_GLOSSARY_LANGUAGECODEPAIR, _GLOSSARY_LANGUAGECODESSET], - enum_types=[_GLOSSARY_GLOSSARYTYPE], + enum_types=[], serialized_options=None, is_extendable=False, syntax="proto3", @@ -1962,27 +1865,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="languages", - full_name="google.cloud.translation.v3alpha1.Glossary.languages", + full_name="google.cloud.translation.v3beta1.Glossary.languages", index=0, containing_type=None, fields=[], ) ], - serialized_start=3212, - serialized_end=3911, + serialized_start=2968, + serialized_end=3499, ) _CREATEGLOSSARYREQUEST = _descriptor.Descriptor( name="CreateGlossaryRequest", - full_name="google.cloud.translation.v3alpha1.CreateGlossaryRequest", + full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3alpha1.CreateGlossaryRequest.parent", + full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest.parent", index=0, number=1, type=9, @@ -2000,7 +1903,7 @@ ), _descriptor.FieldDescriptor( name="glossary", - full_name="google.cloud.translation.v3alpha1.CreateGlossaryRequest.glossary", + full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest.glossary", index=1, number=2, type=11, @@ -2025,21 +1928,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3913, - serialized_end=4015, + serialized_start=3501, + serialized_end=3602, ) _GETGLOSSARYREQUEST = _descriptor.Descriptor( name="GetGlossaryRequest", - full_name="google.cloud.translation.v3alpha1.GetGlossaryRequest", + full_name="google.cloud.translation.v3beta1.GetGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3alpha1.GetGlossaryRequest.name", + full_name="google.cloud.translation.v3beta1.GetGlossaryRequest.name", index=0, number=1, type=9, @@ -2064,21 +1967,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4017, - serialized_end=4051, + serialized_start=3604, + serialized_end=3638, ) _DELETEGLOSSARYREQUEST = _descriptor.Descriptor( name="DeleteGlossaryRequest", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryRequest", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryRequest.name", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryRequest.name", index=0, number=1, type=9, @@ -2103,21 +2006,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4053, - serialized_end=4090, + serialized_start=3640, + serialized_end=3677, ) _LISTGLOSSARIESREQUEST = _descriptor.Descriptor( name="ListGlossariesRequest", - full_name="google.cloud.translation.v3alpha1.ListGlossariesRequest", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3alpha1.ListGlossariesRequest.parent", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.parent", index=0, number=1, type=9, @@ -2135,7 +2038,7 @@ ), _descriptor.FieldDescriptor( name="page_size", - full_name="google.cloud.translation.v3alpha1.ListGlossariesRequest.page_size", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.page_size", index=1, number=2, type=5, @@ -2153,7 +2056,7 @@ ), _descriptor.FieldDescriptor( name="page_token", - full_name="google.cloud.translation.v3alpha1.ListGlossariesRequest.page_token", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.page_token", index=2, number=3, type=9, @@ -2171,7 +2074,7 @@ ), _descriptor.FieldDescriptor( name="filter", - full_name="google.cloud.translation.v3alpha1.ListGlossariesRequest.filter", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.filter", index=3, number=4, type=9, @@ -2196,21 +2099,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4092, - serialized_end=4186, + serialized_start=3679, + serialized_end=3773, ) _LISTGLOSSARIESRESPONSE = _descriptor.Descriptor( name="ListGlossariesResponse", - full_name="google.cloud.translation.v3alpha1.ListGlossariesResponse", + full_name="google.cloud.translation.v3beta1.ListGlossariesResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="glossaries", - full_name="google.cloud.translation.v3alpha1.ListGlossariesResponse.glossaries", + full_name="google.cloud.translation.v3beta1.ListGlossariesResponse.glossaries", index=0, number=1, type=11, @@ -2228,7 +2131,7 @@ ), _descriptor.FieldDescriptor( name="next_page_token", - full_name="google.cloud.translation.v3alpha1.ListGlossariesResponse.next_page_token", + full_name="google.cloud.translation.v3beta1.ListGlossariesResponse.next_page_token", index=1, number=2, type=9, @@ -2253,21 +2156,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4188, - serialized_end=4302, + serialized_start=3775, + serialized_end=3888, ) _CREATEGLOSSARYMETADATA = _descriptor.Descriptor( name="CreateGlossaryMetadata", - full_name="google.cloud.translation.v3alpha1.CreateGlossaryMetadata", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3alpha1.CreateGlossaryMetadata.name", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.name", index=0, number=1, type=9, @@ -2285,7 +2188,7 @@ ), _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translation.v3alpha1.CreateGlossaryMetadata.state", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.state", index=1, number=2, type=14, @@ -2303,7 +2206,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3alpha1.CreateGlossaryMetadata.submit_time", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.submit_time", index=2, number=3, type=11, @@ -2328,21 +2231,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4305, - serialized_end=4576, + serialized_start=3891, + serialized_end=4160, ) _DELETEGLOSSARYMETADATA = _descriptor.Descriptor( name="DeleteGlossaryMetadata", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryMetadata", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryMetadata.name", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.name", index=0, number=1, type=9, @@ -2360,7 +2263,7 @@ ), _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryMetadata.state", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.state", index=1, number=2, type=14, @@ -2378,7 +2281,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryMetadata.submit_time", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.submit_time", index=2, number=3, type=11, @@ -2403,21 +2306,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4579, - serialized_end=4850, + serialized_start=4163, + serialized_end=4432, ) _DELETEGLOSSARYRESPONSE = _descriptor.Descriptor( name="DeleteGlossaryResponse", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryResponse", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryResponse.name", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.name", index=0, number=1, type=9, @@ -2435,7 +2338,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryResponse.submit_time", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.submit_time", index=1, number=2, type=11, @@ -2453,7 +2356,7 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translation.v3alpha1.DeleteGlossaryResponse.end_time", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.end_time", index=2, number=3, type=11, @@ -2478,29 +2381,16 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4853, - serialized_end=4986, + serialized_start=4435, + serialized_end=4568, ) _TRANSLATETEXTREQUEST.fields_by_name[ "glossary_config" ].message_type = _TRANSLATETEXTGLOSSARYCONFIG -_TRANSLATETEXTREQUEST.oneofs_by_name["source"].fields.append( - _TRANSLATETEXTREQUEST.fields_by_name["content"] -) -_TRANSLATETEXTREQUEST.fields_by_name[ - "content" -].containing_oneof = _TRANSLATETEXTREQUEST.oneofs_by_name["source"] -_TRANSLATETEXTRESPONSE_TRANSLATIONSENTRY.fields_by_name[ - "value" -].message_type = _TRANSLATION -_TRANSLATETEXTRESPONSE_TRANSLATIONSENTRY.containing_type = _TRANSLATETEXTRESPONSE -_TRANSLATETEXTRESPONSE.fields_by_name[ - "translations" -].message_type = _TRANSLATETEXTRESPONSE_TRANSLATIONSENTRY -_TRANSLATETEXTRESPONSE.fields_by_name["translation"].message_type = _TRANSLATION +_TRANSLATETEXTRESPONSE.fields_by_name["translations"].message_type = _TRANSLATION _TRANSLATETEXTRESPONSE.fields_by_name[ - "glossary_translation" + "glossary_translations" ].message_type = _TRANSLATION _TRANSLATION.fields_by_name[ "glossary_config" @@ -2562,7 +2452,6 @@ ].containing_oneof = _GLOSSARYINPUTCONFIG.oneofs_by_name["source"] _GLOSSARY_LANGUAGECODEPAIR.containing_type = _GLOSSARY _GLOSSARY_LANGUAGECODESSET.containing_type = _GLOSSARY -_GLOSSARY.fields_by_name["type"].enum_type = _GLOSSARY_GLOSSARYTYPE _GLOSSARY.fields_by_name["language_pair"].message_type = _GLOSSARY_LANGUAGECODEPAIR _GLOSSARY.fields_by_name["language_codes_set"].message_type = _GLOSSARY_LANGUAGECODESSET _GLOSSARY.fields_by_name["input_config"].message_type = _GLOSSARYINPUTCONFIG @@ -2572,7 +2461,6 @@ _GLOSSARY.fields_by_name[ "end_time" ].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP -_GLOSSARY_GLOSSARYTYPE.containing_type = _GLOSSARY _GLOSSARY.oneofs_by_name["languages"].fields.append( _GLOSSARY.fields_by_name["language_pair"] ) @@ -2647,21 +2535,20 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATETEXTGLOSSARYCONFIG, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __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. Attributes: glossary: - Required. The glossary to be used for this translation. It - should be in this format: projects/\ - */locations/*/glossaries/\* + Required. Specifies the glossary used for this translation. + Use this format: projects/\ */locations/*/glossaries/\* ignore_case: - Optional. Indicates whether we should do case-insensitive + Optional. Indicates whether we should do a case-insensitive match. Default value is false if missing. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.TranslateTextGlossaryConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextGlossaryConfig) ), ) _sym_db.RegisterMessage(TranslateTextGlossaryConfig) @@ -2671,53 +2558,52 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATETEXTREQUEST, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The request message for synchronous translation. Attributes: - source: - The source of the text to translate. - content: + contents: Required. The content of the input in string format. We - recommend to use shorter string (<=10k characters. i.e. - Unicode codepoints). Please use BatchTranslateText for larger - text. + recommend the total contents to be less than 30k codepoints. + Please use BatchTranslateText for larger text. mime_type: - Optional. The format of the source text e.g., "text/html", - "text/plain". If left blank, the MIME type is assumed to be - "text/html". + Optional. The format of the source text, for example, + "text/html", "text/plain". If left blank, the MIME type is + assumed to be "text/html". source_language_code: Optional. The BCP-47 language code of the input text if known, - e.g. "en-US" or "sr-Latn". Supported language codes are listed - in Language Support. If the source language is not specified, - the API will attempt to identify the source language - automatically and return it within the response. - target_language_codes: - *DEPRECATED* The BCP-47 language codes to use for translation - of the input text, set to one of the language codes listed in - Language Support. Repeat if input must be translated to - multiple languages. + 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 the source language within the + response. target_language_code: 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: + Optional. Only used when making regionalized call. Format: + projects/{project-id}/locations/{location-id}. Only custom + model/glossary within the same location-id can be used. + Otherwise 400 is returned. model: Optional. The ``model`` type requested for this translation. The format depends on model type: 1. Custom models: - /projects/{project-id}/locations/{location-id}/models/{model- - id}. 2. General (built-in) models: /projects/{project- + projects/{project-id}/locations/{location-id}/models/{model- + id}. 2. General (built-in) models: projects/{project- id}/locations/{location-id}/models/general/nmt - /projects/{project-id}/locations/{location- + projects/{project-id}/locations/{location- id}/models/general/base For global (non-regionalized) requests, use {location-id} 'global'. For example, - /projects/{project-id}/locations/global/models/general/nmt If - missing, the system will decide the best model to use. + projects/{project-id}/locations/global/models/general/nmt If + missing, the system decides which google base model to use. glossary_config: - Optional. Glossary to be applied. Glossary needs to be in the - same region as the model, otherwise error 400 is returned. + Optional. Glossary to be applied. The glossary needs to be in + the same region as the model, otherwise an INVALID\_ARGUMENT + error is returned. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.TranslateTextRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextRequest) ), ) _sym_db.RegisterMessage(TranslateTextRequest) @@ -2726,49 +2612,33 @@ "TranslateTextResponse", (_message.Message,), dict( - TranslationsEntry=_reflection.GeneratedProtocolMessageType( - "TranslationsEntry", - (_message.Message,), - dict( - DESCRIPTOR=_TRANSLATETEXTRESPONSE_TRANSLATIONSENTRY, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2" - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.TranslateTextResponse.TranslationsEntry) - ), - ), DESCRIPTOR=_TRANSLATETEXTRESPONSE, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The main language translation response message. Attributes: translations: - *DEPRECATED* Text translation responses keyed by target - language. - translation: - Text translation response with no glossary applied. - detected_language_code: - The BCP-47 language code of source text in the initial - request, detected automatically, if no source language was - passed within the initial request. If the source language was - passed, auto-detection of the language will not occur and this - field will be empty. - glossary_translation: - Text translation response with if glossary is provided in the + Text translation responses with no glossary applied. This + field has the same length as ``contents`` in + TranslateTextRequest. + glossary_translations: + Text translation responses if a glossary is provided in the request. This could be the same as 'translation' above if no - terms apply. + terms apply. This field has the same length as ``contents`` in + TranslateTextRequest. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.TranslateTextResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextResponse) ), ) _sym_db.RegisterMessage(TranslateTextResponse) -_sym_db.RegisterMessage(TranslateTextResponse.TranslationsEntry) Translation = _reflection.GeneratedProtocolMessageType( "Translation", (_message.Message,), dict( DESCRIPTOR=_TRANSLATION, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""A single translation response. @@ -2778,10 +2648,16 @@ model: Only present when ``model`` is present in the request. This is same as ``model`` provided in the request. + detected_language_code: + The BCP-47 language code of source text in the initial + request, detected automatically, if no source language was + passed within the initial request. If the source language was + passed, auto-detection of the language does not occur and this + field will be empty. glossary_config: The ``glossary_config`` used for this translation. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.Translation) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Translation) ), ) _sym_db.RegisterMessage(Translation) @@ -2791,28 +2667,31 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTLANGUAGEREQUEST, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The request message for language detection. Attributes: - name: - Optional. Used for making regionalized calls. Format: - /projects/{project-id}/locations/{location-id}. For global - calls, use /projects/{project-id}/locations/global. If - missing, the call is treated as a global call. + parent: + Optional. Only used when making regionalized call. Format: + projects/{project-id}/locations/{location-id}. Only custom + model within the same location-id can be used. Otherwise 400 + is returned. + model: + Optional. The language detection model to be used. + projects/{project-id}/locations/{location-id}/models/language- + detection/{model-id} If not specified, default will be used. source: - Required. The source of the document to detect language of: a - string containing the content or a Google Cloud Storage URI. + Required. The source of the document from which to detect the + language. content: - The content of the input in string format. + The content of the input stored as a string. mime_type: - Optional. The format of the source text e.g., "text/html", - "text/plain". If left blank, the MIME type is assumed to be - "text/html" for inline requests, or will be automatically - determined from the uploaded content's MIME type. + Optional. The format of the source text, for example, + "text/html", "text/plain". If left blank, the MIME type is + assumed to be "text/html". """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.DetectLanguageRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageRequest) ), ) _sym_db.RegisterMessage(DetectLanguageRequest) @@ -2822,7 +2701,7 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTEDLANGUAGE, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The response message for language detection. @@ -2833,7 +2712,7 @@ confidence: The confidence of the detection result for this language. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.DetectedLanguage) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectedLanguage) ), ) _sym_db.RegisterMessage(DetectedLanguage) @@ -2843,7 +2722,7 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTLANGUAGERESPONSE, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The response message for language detection. @@ -2852,7 +2731,7 @@ A list of detected languages sorted by detection confidence in descending order. The most probable language first. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.DetectLanguageResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageResponse) ), ) _sym_db.RegisterMessage(DetectLanguageResponse) @@ -2862,23 +2741,33 @@ (_message.Message,), dict( DESCRIPTOR=_GETSUPPORTEDLANGUAGESREQUEST, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The request message for discovering supported languages. Attributes: + parent: + Optional. Used for making regionalized calls. Format: + projects/{project-id}/locations/{location-id}. For global + calls, use projects/{project-id}/locations/global. If missing, + the call is treated as a global call. Only custom model + within the same location-id can be used. Otherwise 400 is + returned. display_language_code: Optional. The language to use to return localized, human readable names of supported languages. If missing, default language is ENGLISH. - name: - Optional. The ``name`` can be in one of two formats: 1. - Location: 'projects/*/locations/*'. Returns all languages - supported by Cloud Translation API. 2. Model name: - 'projects/*/locations/*/models/\*\*'. Returns languages - supported by the specified model. If missing, case 1 is used. + model: + Optional. Get supported languages of this model. The format + depends on model type: 1. Custom models: projects/{project- + id}/locations/{location-id}/models/{model-id}. 2. General + (built-in) models: projects/{project-id}/locations/{location- + id}/models/general/nmt projects/{project- + id}/locations/{location-id}/models/general/base Returns + languages supported by the specified model. If missing, we get + supported languages of Google general NMT model. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.GetSupportedLanguagesRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetSupportedLanguagesRequest) ), ) _sym_db.RegisterMessage(GetSupportedLanguagesRequest) @@ -2888,16 +2777,16 @@ (_message.Message,), dict( DESCRIPTOR=_SUPPORTEDLANGUAGES, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The response message for discovering supported languages. Attributes: languages: - A list of supported language responses. This list will contain - an entry for each language supported by the Translation API. + A list of supported language responses. This list contains an + entry for each language the Translation API supports. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.SupportedLanguages) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguages) ), ) _sym_db.RegisterMessage(SupportedLanguages) @@ -2907,7 +2796,7 @@ (_message.Message,), dict( DESCRIPTOR=_SUPPORTEDLANGUAGE, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""A single supported language response corresponds to information related to one supported language. @@ -2915,9 +2804,9 @@ Attributes: language_code: Supported language code, generally consisting of its ISO 639-1 - identifier e.g., 'en', 'ja'. In certain cases, BCP-47 codes - including language + region identifiers are returned (e.g. - 'zh-TW' and 'zh-CH') + 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') display_name: Human readable name of the language localized in the display language specified in the request. @@ -2926,7 +2815,7 @@ support_target: Can be used as target language. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.SupportedLanguage) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguage) ), ) _sym_db.RegisterMessage(SupportedLanguage) @@ -2936,7 +2825,7 @@ (_message.Message,), dict( DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The GCS location for the input content. @@ -2945,7 +2834,7 @@ Required. Source data URI. For example, ``gs://my_bucket/my_object``. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.GcsSource) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsSource) ), ) _sym_db.RegisterMessage(GcsSource) @@ -2955,33 +2844,33 @@ (_message.Message,), dict( DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Input configuration. Attributes: mime_type: - Optional. Can be "text/plain" or "text/html". If missing, we - will use file extension to decide mime type. If the extension - is .html, "text/html" is used. Otherwise, "plain/text" is - used. + 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: Required. Google Cloud Storage location for the source input. - This can be a single file (e.g., ``gs://translation- - test/input.tsv``) or a wildcard (e.g., ``gs://translation- - test/*``). If a file extension is ``.csv``/``.tsv``, it can - contain either one or two columns. The first column (optional) - is the id of the text request. If the first column is missing, - we will use the row number (0-based) from the input file as ID - in the output file. The second column is the actual text to be - translated. We recommend each row to be <= 10K Unicode - codepoints. Otherwise an error might be returned. The other - supported file extension is ``.txt``, which is treated as a - single large chunk of text. + This can be a single file (for example, ``gs://translation- + test/input.tsv``) or a wildcard (for example, + ``gs://translation-test/*``). If a file extension is ``.tsv``, + it can contain either one or two columns. The first column + (optional) is the id of the text request. If the first column + is missing, we use the row number (0-based) from the input + file as the ID in the output file. The second column is the + actual text to be translated. We recommend each row be <= 10K + Unicode codepoints, otherwise an error might be returned. 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.v3alpha1.InputConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.InputConfig) ), ) _sym_db.RegisterMessage(InputConfig) @@ -2991,64 +2880,17 @@ (_message.Message,), dict( DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The GCS location for the output content Attributes: output_uri_prefix: - Required. must be no files under 'output\_uri\_prefix'. + Required. There must be no files under 'output\_uri\_prefix'. 'output\_uri\_prefix' must end with "/". Otherwise error 400 - will be returned. For every single input file (e.g. - gs://a/b/c.[extension]), we generate at most 2 \* n output - files. (n is the # of target\_language\_codes in the - BatchTranslateTextRequest). Output files (csv/tsv) generated - are compliant with RFC 4180 except that record delimiters are - ':raw-latex:`\n`' instead of ':raw-latex:`\r`:raw-latex:`\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' (e.g. - 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\_f - ile,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 explained below) errors\_file contains the errors - during processing of the file. (details explained below). Both - translations\_file and errors\_file could be empty strings if - we have no content to output. Once a row is present in - index.csv, the input/output matching will never change. - Callers should also expect all the content in input\_file are - processed and ready to be consumed (i.e. 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 csv/tsv, the output has the following columns: Column 1: ID - of the request provided in the input, if it is not provided in - the input, then the input row number is used (0-based). Column - 2: source sentence. Column 3: translation without applying - glossary. Empty string if there is an error. Column 4 (only - present if glossary is provided in the request): translation - after applying glossary. Empty string if there is an error - applying glossary. Could be same string as column 3 if there - is no glossary applies. If input file extension is a txt, the - translation is directly written to the output file. The - format of translations\_file (for target language code 'trg') - is: gs://translation\_test/a\_b\_c\_'trg'\_errors.[extension] - If the input file extension is tsv/csv, translations\_file has - the following Column 1: ID of the request provided in the - input, if it is 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 glossary is provided in the request): Error - when applying glossary. If the input file extension is txt, - the errors\_file contains at most 2 lines. The first line - contains the error details when translating the input without - using glossary. The second line (if glossary is provided in - the input) contains the error when applying glossary. + is returned. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.GcsDestination) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsDestination) ), ) _sym_db.RegisterMessage(GcsDestination) @@ -3058,7 +2900,7 @@ (_message.Message,), dict( DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Output configuration. @@ -3066,9 +2908,63 @@ destination: Required. The destination of output. gcs_destination: - Google Cloud Storage destination for output content. + 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). + Output files (tsv) generated are compliant with RFC 4180 + except that record delimiters are ':raw-latex:`\n`' instead of + ':raw-latex:`\r`:raw-latex:`\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- + 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,glossary\_errors\_file are always + empty string if 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 has 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 + 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] """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.OutputConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.OutputConfig) ), ) _sym_db.RegisterMessage(OutputConfig) @@ -3082,8 +2978,8 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_MODELSENTRY, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2" - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.BatchTranslateTextRequest.ModelsEntry) + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry) ), ), GlossariesEntry=_reflection.GeneratedProtocolMessageType( @@ -3091,24 +2987,23 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2" - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.BatchTranslateTextRequest.GlossariesEntry) + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry) ), ), DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The batch translation request. Attributes: parent: Optional. Only used when making regionalized call. Format: - /projects/{project-id}/locations/{location-id}. Only custom + projects/{project-id}/locations/{location-id}. Only custom models/glossaries within the same location-id can be used. Otherwise 400 is returned. source_language_code: - Optional. Source language code. If missing, source language is - identified automatically. + Required. Source language code. target_language_codes: Required. Specify up to 10 language codes here. models: @@ -3116,26 +3011,26 @@ target language code. Map's value is model name. Value can be a built-in general model, or a custom model built by AutoML. The value format depends on model type: 1. Custom models: - /projects/{project-id}/locations/{location-id}/models/{model- - id}. 2. General (built-in) models: /projects/{project- + projects/{project-id}/locations/{location-id}/models/{model- + id}. 2. General (built-in) models: projects/{project- id}/locations/{location-id}/models/general/nmt - /projects/{project-id}/locations/{location- + projects/{project-id}/locations/{location- id}/models/general/base If the map is empty or a specific model is not requested for a language pair, then default google model is used. input_configs: Required. Input configurations. The total number of files matched should be <= 1000. The total content size should be <= - 100M Unicode codepoints. + 100M Unicode codepoints. The files must use UTF-8 encoding. output_config: Required. Output configuration. If 2 input configs match to - the same file (i.e. same input path), we don't generate output - for duplicate inputs. + 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 is - keyed by target language code. + Optional. Glossaries to be applied for translation. It's keyed + by target language code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.BatchTranslateTextRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest) ), ) _sym_db.RegisterMessage(BatchTranslateTextRequest) @@ -3147,7 +3042,7 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATEMETADATA, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""State metadata for the batch translation operation. @@ -3161,11 +3056,14 @@ Number of characters that have failed to process so far (Unicode codepoints). total_characters: - Total number of characters (Unicode codepoints). + Total number of characters (Unicode codepoints). This is the + total number of codepoints from input files times the number + of target languages. It appears here shortly after the call is + submitted. submit_time: Time when the operation was submitted. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.BatchTranslateMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateMetadata) ), ) _sym_db.RegisterMessage(BatchTranslateMetadata) @@ -3175,7 +3073,7 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATERESPONSE, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __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 @@ -3198,7 +3096,7 @@ g.Operation.done][google.longrunning.Operation.done] is set to true. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.BatchTranslateResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateResponse) ), ) _sym_db.RegisterMessage(BatchTranslateResponse) @@ -3208,7 +3106,7 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARYINPUTCONFIG, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Input configuration for glossaries. @@ -3224,8 +3122,8 @@ glossaries: - TSV/CSV (``.tsv``/``.csv``): 2 column file, tab- or comma-separated. The first column is source text. The second column is target text. The file must not contain - headers i.e., the first row is data, not column names. - - TMX (``.tmx``): TMX file with parallel data defining + headers. That is, the first row is data, not column names. + - TMX (``.tmx``): TMX file with parallel data defining source/target term pairs. For ``EQUIVALENT_TERMS_SET`` glossaries: - CSV (``.csv``): Multi-column CSV file defining equivalent glossary terms in multiple languages. The format @@ -3233,7 +3131,7 @@ here: ``https://support.google.com/translatortoolkit/answer /6306379?hl=en``. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.GlossaryInputConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GlossaryInputConfig) ), ) _sym_db.RegisterMessage(GlossaryInputConfig) @@ -3247,21 +3145,21 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARY_LANGUAGECODEPAIR, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Used with UNIDIRECTIONAL. Attributes: source_language_code: - Required. The BCP-47 language code of the input text e.g., - "en-US". Expected to be an exact match for + Required. The BCP-47 language code of the input text, for + 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 - e.g., "zh-CN". Expected to be an exact match for + Required. The BCP-47 language code for translation output, for + example, "zh-CN". Expected to be an exact match for GlossaryTerm.language\_code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.Glossary.LanguageCodePair) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodePair) ), ), LanguageCodesSet=_reflection.GeneratedProtocolMessageType( @@ -3269,7 +3167,7 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARY_LANGUAGECODESSET, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Used with EQUIVALENT\_TERMS\_SET. @@ -3280,11 +3178,11 @@ entries. Expected to be an exact match for GlossaryTerm.language\_code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.Glossary.LanguageCodesSet) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodesSet) ), ), DESCRIPTOR=_GLOSSARY, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Represents a glossary built from user provided data. @@ -3293,8 +3191,6 @@ Required. The resource name of the glossary. Glossary names have the form ``projects/{project-id}/locations/{location- id}/glossaries/{glossary-id}``. - type: - Required. Glossary type. languages: Languages supported by the glossary. language_pair: @@ -3311,7 +3207,7 @@ end_time: Output only. When the glossary creation was finished. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.Glossary) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary) ), ) _sym_db.RegisterMessage(Glossary) @@ -3323,7 +3219,7 @@ (_message.Message,), dict( DESCRIPTOR=_CREATEGLOSSARYREQUEST, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Request message for CreateGlossary. @@ -3333,7 +3229,7 @@ glossary: Required. The glossary to create. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.CreateGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryRequest) ), ) _sym_db.RegisterMessage(CreateGlossaryRequest) @@ -3343,7 +3239,7 @@ (_message.Message,), dict( DESCRIPTOR=_GETGLOSSARYREQUEST, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Request message for GetGlossary. @@ -3351,7 +3247,7 @@ name: Required. The name of the glossary to retrieve. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.GetGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetGlossaryRequest) ), ) _sym_db.RegisterMessage(GetGlossaryRequest) @@ -3361,7 +3257,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYREQUEST, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Request message for DeleteGlossary. @@ -3369,7 +3265,7 @@ name: Required. The name of the glossary to delete. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.DeleteGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryRequest) ), ) _sym_db.RegisterMessage(DeleteGlossaryRequest) @@ -3379,18 +3275,18 @@ (_message.Message,), dict( DESCRIPTOR=_LISTGLOSSARIESREQUEST, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Request message for ListGlossaries. Attributes: parent: - Required. The name of the project to list all of the - glossaries from. + Required. The name of the project from which to list all of + the glossaries. page_size: Optional. Requested page size. The server may return fewer - glossaries than requested. If unspecified, the server will - pick an appropriate default. + glossaries than requested. If unspecified, the server picks an + appropriate default. page_token: Optional. A token identifying a page of results the server should return. Typically, this is the value of @@ -3402,7 +3298,7 @@ For example, ``tags.glossary_name="products*"``. If missing, no filtering is performed. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.ListGlossariesRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesRequest) ), ) _sym_db.RegisterMessage(ListGlossariesRequest) @@ -3412,7 +3308,7 @@ (_message.Message,), dict( DESCRIPTOR=_LISTGLOSSARIESRESPONSE, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Response message for ListGlossaries. @@ -3425,7 +3321,7 @@ call to ``ListGlossaries`` method to retrieve the next page of results. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.ListGlossariesResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesResponse) ), ) _sym_db.RegisterMessage(ListGlossariesResponse) @@ -3435,7 +3331,7 @@ (_message.Message,), dict( DESCRIPTOR=_CREATEGLOSSARYMETADATA, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __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. @@ -3443,13 +3339,13 @@ Attributes: name: - The name of the glossary that is getting created. + The name of the glossary that is being created. state: The current state of the glossary creation operation. submit_time: The time when the operation was submitted to the server. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.CreateGlossaryMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryMetadata) ), ) _sym_db.RegisterMessage(CreateGlossaryMetadata) @@ -3459,7 +3355,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYMETADATA, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __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. @@ -3467,13 +3363,13 @@ Attributes: name: - The name of the glossary that is getting deleted. + The name of the glossary that is being deleted. state: The current state of the glossary deletion operation. submit_time: The time when the operation was submitted to the server. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.DeleteGlossaryMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryMetadata) ), ) _sym_db.RegisterMessage(DeleteGlossaryMetadata) @@ -3483,7 +3379,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYRESPONSE, - __module__="google.cloud.translation_v3alpha1.proto.translation_service_pb2", + __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. @@ -3499,114 +3395,111 @@ ngrunning.Operation.done][google.longrunning.Operation.done] is set to true. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3alpha1.DeleteGlossaryResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryResponse) ), ) _sym_db.RegisterMessage(DeleteGlossaryResponse) DESCRIPTOR._options = None -_TRANSLATETEXTREQUEST.fields_by_name["target_language_codes"]._options = None -_TRANSLATETEXTRESPONSE_TRANSLATIONSENTRY._options = None -_TRANSLATETEXTRESPONSE.fields_by_name["translations"]._options = None _BATCHTRANSLATETEXTREQUEST_MODELSENTRY._options = None _BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY._options = None _TRANSLATIONSERVICE = _descriptor.ServiceDescriptor( name="TranslationService", - full_name="google.cloud.translation.v3alpha1.TranslationService", + full_name="google.cloud.translation.v3beta1.TranslationService", file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=4989, - serialized_end=6881, + serialized_start=4571, + serialized_end=6107, methods=[ _descriptor.MethodDescriptor( name="TranslateText", - full_name="google.cloud.translation.v3alpha1.TranslationService.TranslateText", + full_name="google.cloud.translation.v3beta1.TranslationService.TranslateText", index=0, containing_service=None, input_type=_TRANSLATETEXTREQUEST, output_type=_TRANSLATETEXTRESPONSE, serialized_options=_b( - '\202\323\344\223\002\237\001"@/v3alpha1/{model=projects/*/locations/*/models/**}:translateText:\001*Z""\035/v3alpha1/documents:translate:\001*Z4"//v3alpha1/{model=projects/*/models/*}:translate:\001*' + '\202\323\344\223\002;"6/v3beta1/{parent=projects/*/locations/*}:translateText:\001*' ), ), _descriptor.MethodDescriptor( name="DetectLanguage", - full_name="google.cloud.translation.v3alpha1.TranslationService.DetectLanguage", + full_name="google.cloud.translation.v3beta1.TranslationService.DetectLanguage", index=1, containing_service=None, input_type=_DETECTLANGUAGEREQUEST, output_type=_DETECTLANGUAGERESPONSE, serialized_options=_b( - '\202\323\344\223\002\275\001"6/v3alpha1/{name=projects/*/locations/*}:detectLanguage:\001*ZW"R/v3alpha1/{name=projects/*/locations/*/models/language-detection/*}:detectLanguage:\001*Z\'""/v3alpha1/documents:detectLanguage:\001*' + '\202\323\344\223\002<"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\001*' ), ), _descriptor.MethodDescriptor( name="GetSupportedLanguages", - full_name="google.cloud.translation.v3alpha1.TranslationService.GetSupportedLanguages", + full_name="google.cloud.translation.v3beta1.TranslationService.GetSupportedLanguages", index=2, containing_service=None, input_type=_GETSUPPORTEDLANGUAGESREQUEST, output_type=_SUPPORTEDLANGUAGES, serialized_options=_b( - "\202\323\344\223\002\244\001\022:/v3alpha1/{name=projects/*/locations/*}/supportedLanguagesZF\022D/v3alpha1/{name=projects/*/locations/*/models/**}/supportedLanguagesZ\036\022\034/v3alpha1/supportedLanguages" + "\202\323\344\223\002=\022;/v3beta1/{parent=projects/*/locations/*}/supportedLanguages" ), ), _descriptor.MethodDescriptor( name="BatchTranslateText", - full_name="google.cloud.translation.v3alpha1.TranslationService.BatchTranslateText", + full_name="google.cloud.translation.v3beta1.TranslationService.BatchTranslateText", index=3, containing_service=None, input_type=_BATCHTRANSLATETEXTREQUEST, output_type=google_dot_longrunning_dot_operations__pb2._OPERATION, serialized_options=_b( - '\202\323\344\223\002A" Date: Mon, 11 Mar 2019 15:11:02 -0700 Subject: [PATCH 4/8] renamed package/client name and regen'd --- synth.metadata | 2 +- translate/synth.metadata | 10 +----- ...test_translation_service_client_v3beta1.py | 36 +++++++++---------- 3 files changed, 20 insertions(+), 28 deletions(-) diff --git a/synth.metadata b/synth.metadata index 70c9209c2478..00d0c95474b7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,3 +1,3 @@ { - "updateTime": "2019-02-25T21:49:12.469250Z" + "updateTime": "2019-03-11T17:47:38.167682Z" } \ No newline at end of file diff --git a/translate/synth.metadata b/translate/synth.metadata index 6ffcb86521e6..3039c11143d9 100644 --- a/translate/synth.metadata +++ b/translate/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-03-09T01:31:05.291163Z", + "updateTime": "2019-03-11T20:20:50.145940Z", "sources": [ { "generator": { @@ -8,14 +8,6 @@ "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" } }, - { - "git": { - "name": "googleapis-private", - "remote": "https://github.com/googleapis/googleapis-private.git", - "sha": "ca04a5b18b870e8c3a68407040c857daa5f6f782", - "internalRef": "237542887" - } - }, { "template": { "name": "python_library", diff --git a/translate/tests/unit/gapic/v3beta1/test_translation_service_client_v3beta1.py b/translate/tests/unit/gapic/v3beta1/test_translation_service_client_v3beta1.py index 4ec362cee0f7..d6685704991e 100644 --- a/translate/tests/unit/gapic/v3beta1/test_translation_service_client_v3beta1.py +++ b/translate/tests/unit/gapic/v3beta1/test_translation_service_client_v3beta1.py @@ -20,8 +20,8 @@ from google.rpc import status_pb2 -from google.cloud import translation_v3beta1 -from google.cloud.translation_v3beta1.proto import translation_service_pb2 +from google.cloud import translate_v3beta1 +from google.cloud.translate_v3beta1.proto import translation_service_pb2 from google.longrunning import operations_pb2 @@ -74,7 +74,7 @@ def test_translate_text(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup Request contents = [] @@ -96,7 +96,7 @@ def test_translate_text_exception(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup request contents = [] @@ -117,7 +117,7 @@ def test_detect_language(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() response = client.detect_language() assert expected_response == response @@ -133,7 +133,7 @@ def test_detect_language_exception(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() with pytest.raises(CustomException): client.detect_language() @@ -150,7 +150,7 @@ def test_get_supported_languages(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() response = client.get_supported_languages() assert expected_response == response @@ -166,7 +166,7 @@ def test_get_supported_languages_exception(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() with pytest.raises(CustomException): client.get_supported_languages() @@ -194,7 +194,7 @@ def test_batch_translate_text(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup Request source_language_code = "sourceLanguageCode1687263568" @@ -231,7 +231,7 @@ def test_batch_translate_text_exception(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup Request source_language_code = "sourceLanguageCode1687263568" @@ -261,7 +261,7 @@ def test_create_glossary(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup Request parent = client.location_path("[PROJECT]", "[LOCATION]") @@ -291,7 +291,7 @@ def test_create_glossary_exception(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup Request parent = client.location_path("[PROJECT]", "[LOCATION]") @@ -319,7 +319,7 @@ def test_list_glossaries(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() paged_list_response = client.list_glossaries() resources = list(paged_list_response) @@ -337,7 +337,7 @@ def test_list_glossaries_exception(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() paged_list_response = client.list_glossaries() with pytest.raises(CustomException): @@ -355,7 +355,7 @@ def test_get_glossary(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup Request name = client.glossary_path("[PROJECT]", "[LOCATION]", "[GLOSSARY]") @@ -374,7 +374,7 @@ def test_get_glossary_exception(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup request name = client.glossary_path("[PROJECT]", "[LOCATION]", "[GLOSSARY]") @@ -399,7 +399,7 @@ def test_delete_glossary(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup Request name = client.glossary_path("[PROJECT]", "[LOCATION]", "[GLOSSARY]") @@ -426,7 +426,7 @@ def test_delete_glossary_exception(self): patch = mock.patch("google.api_core.grpc_helpers.create_channel") with patch as create_channel: create_channel.return_value = channel - client = translation_v3beta1.TranslationServiceClient() + client = translate_v3beta1.TranslationServiceClient() # Setup Request name = client.glossary_path("[PROJECT]", "[LOCATION]", "[GLOSSARY]") From ee5b0c4e1494612154ebc0fb4ca2e613a69296d2 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Wed, 13 Mar 2019 16:16:53 -0700 Subject: [PATCH 5/8] Update translate to use 'translate' as the name --- .../cloud/translate_v3beta1/__init__.py | 4 +- .../gapic/translation_service_client.py | 76 +- .../translation_service_grpc_transport.py | 2 +- .../proto/translation_service.proto | 736 ++++++++++++++++++ .../google/cloud/translate_v3beta1/types.py | 4 +- translate/synth.metadata | 6 +- translate/synth.py | 3 +- 7 files changed, 784 insertions(+), 47 deletions(-) create mode 100644 translate/google/cloud/translate_v3beta1/proto/translation_service.proto diff --git a/translate/google/cloud/translate_v3beta1/__init__.py b/translate/google/cloud/translate_v3beta1/__init__.py index 47f805155ac6..13626b5fa2f0 100644 --- a/translate/google/cloud/translate_v3beta1/__init__.py +++ b/translate/google/cloud/translate_v3beta1/__init__.py @@ -16,8 +16,8 @@ from __future__ import absolute_import -from google.cloud.translation_v3beta1 import types -from google.cloud.translation_v3beta1.gapic import translation_service_client +from google.cloud.translate_v3beta1 import types +from google.cloud.translate_v3beta1.gapic import translation_service_client class TranslationServiceClient(translation_service_client.TranslationServiceClient): diff --git a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py index fbd66ad66c74..133a4743d66f 100644 --- a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py +++ b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py @@ -31,12 +31,12 @@ import google.api_core.protobuf_helpers import grpc -from google.cloud.translation_v3beta1.gapic import translation_service_client_config -from google.cloud.translation_v3beta1.gapic.transports import ( +from google.cloud.translate_v3beta1.gapic import translation_service_client_config +from google.cloud.translate_v3beta1.gapic.transports import ( translation_service_grpc_transport, ) -from google.cloud.translation_v3beta1.proto import translation_service_pb2 -from google.cloud.translation_v3beta1.proto import translation_service_pb2_grpc +from google.cloud.translate_v3beta1.proto import translation_service_pb2 +from google.cloud.translate_v3beta1.proto import translation_service_pb2_grpc from google.longrunning import operations_pb2 _GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution( @@ -209,9 +209,9 @@ def translate_text( Translates input text and returns translated text. Example: - >>> from google.cloud import translation_v3beta1 + >>> from google.cloud import translate_v3beta1 >>> - >>> client = translation_v3beta1.TranslationServiceClient() + >>> client = translate_v3beta1.TranslationServiceClient() >>> >>> # TODO: Initialize `contents`: >>> contents = [] @@ -252,11 +252,11 @@ def translate_text( example, 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.translation_v3beta1.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. The glossary needs to be in the same + glossary_config (Union[dict, ~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig]): Optional. Glossary to be applied. The glossary needs to be in the same region as the model, otherwise an INVALID\_ARGUMENT error is returned. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3beta1.types.TranslateTextGlossaryConfig` + message :class:`~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -267,7 +267,7 @@ def translate_text( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3beta1.types.TranslateTextResponse` instance. + A :class:`~google.cloud.translate_v3beta1.types.TranslateTextResponse` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -314,9 +314,9 @@ def detect_language( Detects the language of text within a request. Example: - >>> from google.cloud import translation_v3beta1 + >>> from google.cloud import translate_v3beta1 >>> - >>> client = translation_v3beta1.TranslationServiceClient() + >>> client = translate_v3beta1.TranslationServiceClient() >>> >>> response = client.detect_language() @@ -343,7 +343,7 @@ def detect_language( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3beta1.types.DetectLanguageResponse` instance. + A :class:`~google.cloud.translate_v3beta1.types.DetectLanguageResponse` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -387,9 +387,9 @@ def get_supported_languages( Returns a list of supported languages for translation. Example: - >>> from google.cloud import translation_v3beta1 + >>> from google.cloud import translate_v3beta1 >>> - >>> client = translation_v3beta1.TranslationServiceClient() + >>> client = translate_v3beta1.TranslationServiceClient() >>> >>> response = client.get_supported_languages() @@ -422,7 +422,7 @@ def get_supported_languages( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3beta1.types.SupportedLanguages` instance. + A :class:`~google.cloud.translate_v3beta1.types.SupportedLanguages` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -472,9 +472,9 @@ def batch_translate_text( use google.longrunning.Operation.name to poll the status of the call. Example: - >>> from google.cloud import translation_v3beta1 + >>> from google.cloud import translate_v3beta1 >>> - >>> client = translation_v3beta1.TranslationServiceClient() + >>> client = translate_v3beta1.TranslationServiceClient() >>> >>> # TODO: Initialize `source_language_code`: >>> source_language_code = '' @@ -502,19 +502,19 @@ def batch_translate_text( Args: source_language_code (str): Required. Source language code. target_language_codes (list[str]): Required. Specify up to 10 language codes here. - input_configs (list[Union[dict, ~google.cloud.translation_v3beta1.types.InputConfig]]): Required. Input configurations. + input_configs (list[Union[dict, ~google.cloud.translate_v3beta1.types.InputConfig]]): Required. Input configurations. The total number of files matched should be <= 1000. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3beta1.types.InputConfig` - output_config (Union[dict, ~google.cloud.translation_v3beta1.types.OutputConfig]): Required. Output configuration. + message :class:`~google.cloud.translate_v3beta1.types.InputConfig` + output_config (Union[dict, ~google.cloud.translate_v3beta1.types.OutputConfig]): Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3beta1.types.OutputConfig` + message :class:`~google.cloud.translate_v3beta1.types.OutputConfig` parent (str): Optional. Only used when making regionalized call. Format: projects/{project-id}/locations/{location-id}. @@ -534,11 +534,11 @@ def batch_translate_text( If the map is empty or a specific model is not requested for a language pair, then default google model is used. - glossaries (dict[str -> Union[dict, ~google.cloud.translation_v3beta1.types.TranslateTextGlossaryConfig]]): Optional. Glossaries to be applied for translation. + glossaries (dict[str -> Union[dict, ~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig]]): Optional. Glossaries to be applied for translation. It's keyed by target language code. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3beta1.types.TranslateTextGlossaryConfig` + message :class:`~google.cloud.translate_v3beta1.types.TranslateTextGlossaryConfig` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -549,7 +549,7 @@ def batch_translate_text( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3beta1.types._OperationFuture` instance. + A :class:`~google.cloud.translate_v3beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -601,9 +601,9 @@ def create_glossary( NOT\_FOUND, if the project doesn't exist. Example: - >>> from google.cloud import translation_v3beta1 + >>> from google.cloud import translate_v3beta1 >>> - >>> client = translation_v3beta1.TranslationServiceClient() + >>> client = translate_v3beta1.TranslationServiceClient() >>> >>> parent = client.location_path('[PROJECT]', '[LOCATION]') >>> @@ -623,10 +623,10 @@ def create_glossary( Args: parent (str): Required. The project name. - glossary (Union[dict, ~google.cloud.translation_v3beta1.types.Glossary]): Required. The glossary to create. + glossary (Union[dict, ~google.cloud.translate_v3beta1.types.Glossary]): Required. The glossary to create. If a dict is provided, it must be of the same form as the protobuf - message :class:`~google.cloud.translation_v3beta1.types.Glossary` + message :class:`~google.cloud.translate_v3beta1.types.Glossary` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -637,7 +637,7 @@ def create_glossary( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3beta1.types._OperationFuture` instance. + A :class:`~google.cloud.translate_v3beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -684,9 +684,9 @@ def list_glossaries( doesn't exist. Example: - >>> from google.cloud import translation_v3beta1 + >>> from google.cloud import translate_v3beta1 >>> - >>> client = translation_v3beta1.TranslationServiceClient() + >>> client = translate_v3beta1.TranslationServiceClient() >>> >>> # Iterate over all results >>> for element in client.list_glossaries(): @@ -723,7 +723,7 @@ def list_glossaries( Returns: A :class:`~google.gax.PageIterator` instance. By default, this - is an iterable of :class:`~google.cloud.translation_v3beta1.types.Glossary` instances. + is an iterable of :class:`~google.cloud.translate_v3beta1.types.Glossary` instances. This object can also be configured to iterate over the pages of the response through the `options` parameter. @@ -774,9 +774,9 @@ def get_glossary( Gets a glossary. Returns NOT\_FOUND, if the glossary doesn't exist. Example: - >>> from google.cloud import translation_v3beta1 + >>> from google.cloud import translate_v3beta1 >>> - >>> client = translation_v3beta1.TranslationServiceClient() + >>> client = translate_v3beta1.TranslationServiceClient() >>> >>> name = client.glossary_path('[PROJECT]', '[LOCATION]', '[GLOSSARY]') >>> @@ -794,7 +794,7 @@ def get_glossary( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3beta1.types.Glossary` instance. + A :class:`~google.cloud.translate_v3beta1.types.Glossary` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request @@ -831,9 +831,9 @@ def delete_glossary( isn't created yet. Returns NOT\_FOUND, if the glossary doesn't exist. Example: - >>> from google.cloud import translation_v3beta1 + >>> from google.cloud import translate_v3beta1 >>> - >>> client = translation_v3beta1.TranslationServiceClient() + >>> client = translate_v3beta1.TranslationServiceClient() >>> >>> name = client.glossary_path('[PROJECT]', '[LOCATION]', '[GLOSSARY]') >>> @@ -860,7 +860,7 @@ def delete_glossary( that is provided to the method. Returns: - A :class:`~google.cloud.translation_v3beta1.types._OperationFuture` instance. + A :class:`~google.cloud.translate_v3beta1.types._OperationFuture` instance. Raises: google.api_core.exceptions.GoogleAPICallError: If the request diff --git a/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py b/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py index c5e694518dc4..8b00b7ed7398 100644 --- a/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py +++ b/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py @@ -17,7 +17,7 @@ import google.api_core.grpc_helpers import google.api_core.operations_v1 -from google.cloud.translation_v3beta1.proto import translation_service_pb2_grpc +from google.cloud.translate_v3beta1.proto import translation_service_pb2_grpc class TranslationServiceGrpcTransport(object): diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service.proto b/translate/google/cloud/translate_v3beta1/proto/translation_service.proto new file mode 100644 index 000000000000..6294f7def899 --- /dev/null +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service.proto @@ -0,0 +1,736 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.cloud.translation.v3beta1; + +import "google/api/annotations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/cloud/translation/v3beta1;translation"; +option java_multiple_files = true; +option java_outer_classname = "TranslationServiceProto"; +option java_package = "com.google.cloud.translation.v3beta1"; +// Proto file for the Cloud Translation API (v3beta1). + +// Provides natural language translation operations. +service TranslationService { + // Translates input text and returns translated text. + rpc TranslateText(TranslateTextRequest) returns (TranslateTextResponse) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*}:translateText" + body: "*" + }; + } + + // Detects the language of text within a request. + rpc DetectLanguage(DetectLanguageRequest) returns (DetectLanguageResponse) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*}:detectLanguage" + body: "*" + }; + } + + // Returns a list of supported languages for translation. + rpc GetSupportedLanguages(GetSupportedLanguagesRequest) returns (SupportedLanguages) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*}/supportedLanguages" + }; + } + + // 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 call returns immediately and you can + // use google.longrunning.Operation.name to poll the status of the call. + rpc BatchTranslateText(BatchTranslateTextRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*}:batchTranslateText" + body: "*" + }; + } + + // Creates a glossary and returns the long-running operation. Returns + // NOT_FOUND, if the project doesn't exist. + rpc CreateGlossary(CreateGlossaryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*}/glossaries" + body: "glossary" + }; + } + + // Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't + // exist. + rpc ListGlossaries(ListGlossariesRequest) returns (ListGlossariesResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*}/glossaries" + }; + } + + // Gets a glossary. Returns NOT_FOUND, if the glossary doesn't + // exist. + rpc GetGlossary(GetGlossaryRequest) returns (Glossary) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/glossaries/*}" + }; + } + + // Deletes a glossary, or cancels glossary construction + // if the glossary isn't created yet. + // Returns NOT_FOUND, if the glossary doesn't exist. + rpc DeleteGlossary(DeleteGlossaryRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v3beta1/{name=projects/*/locations/*/glossaries/*}" + }; + } +} + +// Configures which glossary should be used for a specific target language, +// and defines options for applying that glossary. +message TranslateTextGlossaryConfig { + // Required. Specifies the glossary used for this translation. Use + // this format: projects/*/locations/*/glossaries/* + string glossary = 1; + + // Optional. Indicates whether we should do a case-insensitive match. + // Default value is false if missing. + bool ignore_case = 2; +} + +// The request message for synchronous translation. +message TranslateTextRequest { + // Required. The content of the input in string format. + // We recommend the total contents to be less than 30k codepoints. + // Please use BatchTranslateText for larger text. + repeated string contents = 1; + + // Optional. The format of the source text, for example, "text/html", + // "text/plain". If left blank, the MIME type is assumed to be "text/html". + string mime_type = 3; + + // 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 specified, the API + // attempts to identify the source language automatically and returns the + // the source language within the response. + string source_language_code = 4; + + // 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. + string target_language_code = 5; + + // Optional. Only used when making regionalized call. + // Format: + // projects/{project-id}/locations/{location-id}. + // + // Only custom model/glossary within the same location-id can be used. + // Otherwise 400 is returned. + string parent = 8; + + // Optional. The `model` type requested for this translation. + // + // The format depends on model type: + // 1. Custom models: + // projects/{project-id}/locations/{location-id}/models/{model-id}. + // 2. General (built-in) models: + // projects/{project-id}/locations/{location-id}/models/general/nmt + // projects/{project-id}/locations/{location-id}/models/general/base + // + // For global (non-regionalized) requests, use {location-id} 'global'. + // For example, + // projects/{project-id}/locations/global/models/general/nmt + // + // If missing, the system decides which google base model to use. + string model = 6; + + // Optional. Glossary to be applied. The glossary needs to be in the same + // region as the model, otherwise an INVALID_ARGUMENT error is returned. + TranslateTextGlossaryConfig glossary_config = 7; +} + +// The main language translation response message. +message TranslateTextResponse { + // Text translation responses with no glossary applied. + // This field has the same length as `contents` in TranslateTextRequest. + repeated Translation translations = 1; + + // Text translation responses if a glossary is provided in the request. + // This could be the same as 'translation' above if no terms apply. + // This field has the same length as `contents` in TranslateTextRequest. + repeated Translation glossary_translations = 3; +} + +// A single translation response. +message Translation { + // Text translated into the target language. + string translated_text = 1; + + // Only present when `model` is present in the request. + // This is same as `model` provided in the request. + string model = 2; + + // The BCP-47 language code of source text in the initial request, detected + // automatically, if no source language was passed within the initial + // request. If the source language was passed, auto-detection of the language + // does not occur and this field will be empty. + string detected_language_code = 4; + + // The `glossary_config` used for this translation. + TranslateTextGlossaryConfig glossary_config = 3; +} + +// The request message for language detection. +message DetectLanguageRequest { + // Optional. Only used when making regionalized call. + // Format: + // projects/{project-id}/locations/{location-id}. + // + // Only custom model within the same location-id can be used. + // Otherwise 400 is returned. + string parent = 5; + + // Optional. The language detection model to be used. + // projects/{project-id}/locations/{location-id}/models/language-detection/{model-id} + // If not specified, default will be used. + string model = 4; + + // Required. The source of the document from which to detect the language. + oneof source { + // The content of the input stored as a string. + string content = 1; + } + + // Optional. The format of the source text, for example, "text/html", + // "text/plain". If left blank, the MIME type is assumed to be "text/html". + string mime_type = 3; +} + +// The response message for language detection. +message DetectedLanguage { + // The BCP-47 language code of source content in the request, detected + // automatically. + string language_code = 1; + + // The confidence of the detection result for this language. + float confidence = 2; +} + +// The response message for language detection. +message DetectLanguageResponse { + // A list of detected languages sorted by detection confidence in descending + // order. The most probable language first. + repeated DetectedLanguage languages = 1; +} + +// The request message for discovering supported languages. +message GetSupportedLanguagesRequest { + // Optional. Used for making regionalized calls. + // Format: projects/{project-id}/locations/{location-id}. + // For global calls, use projects/{project-id}/locations/global. + // If missing, the call is treated as a global call. + // + // Only custom model within the same location-id can be used. + // Otherwise 400 is returned. + string parent = 3; + + // Optional. The language to use to return localized, human readable names + // of supported languages. If missing, default language is ENGLISH. + string display_language_code = 1; + + // Optional. Get supported languages of this model. + // The format depends on model type: + // 1. Custom models: + // projects/{project-id}/locations/{location-id}/models/{model-id}. + // 2. General (built-in) models: + // projects/{project-id}/locations/{location-id}/models/general/nmt + // projects/{project-id}/locations/{location-id}/models/general/base + // Returns languages supported by the specified model. + // If missing, we get supported languages of Google general NMT model. + string model = 2; +} + +// The response message for discovering supported languages. +message SupportedLanguages { + // A list of supported language responses. This list contains an entry + // for each language the Translation API supports. + repeated SupportedLanguage languages = 1; +} + +// A single supported language response corresponds to information related +// to one supported language. +message SupportedLanguage { + // Supported language code, generally consisting of its ISO 639-1 + // 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') + string language_code = 1; + + // Human readable name of the language localized in the display language + // specified in the request. + string display_name = 2; + + // Can be used as source language. + bool support_source = 3; + + // Can be used as target language. + bool support_target = 4; +} + +// The GCS location for the input content. +message GcsSource { + // Required. Source data URI. For example, `gs://my_bucket/my_object`. + string input_uri = 1; +} + +// Input configuration. +message InputConfig { + // 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. + string mime_type = 1; + + // Required. Specify the input. + oneof source { + // Required. Google Cloud Storage location for the source input. + // This can be a single file (for example, + // `gs://translation-test/input.tsv`) or a wildcard (for example, + // `gs://translation-test/*`). If a file extension is `.tsv`, it can + // contain either one or two columns. The first column (optional) is the id + // of the text request. If the first column is missing, we use the row + // number (0-based) from the input file as the ID in the output file. The + // second column is the actual text to be + // translated. We recommend each row be <= 10K Unicode codepoints, + // otherwise an error might be returned. + // + // The other supported file extensions are `.txt` or `.html`, which is + // treated as a single large chunk of text. + GcsSource gcs_source = 2; + } +} + +// The GCS location for the output content +message GcsDestination { + // Required. There must be no files under 'output_uri_prefix'. + // 'output_uri_prefix' must end with "/". Otherwise error 400 is returned. + string output_uri_prefix = 1; +} + +// Output configuration. +message OutputConfig { + // Required. The destination of output. + oneof destination { + // 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). + // + // 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 + // 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-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,glossary_errors_file are always empty string + // if 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_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 has 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 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://translation_test/a_b_c_'trg'_glossary_errors.[extension] + GcsDestination gcs_destination = 1; + } +} + +// The batch translation request. +message BatchTranslateTextRequest { + // Optional. Only used when making regionalized call. + // Format: + // projects/{project-id}/locations/{location-id}. + // + // Only custom models/glossaries within the same location-id can be used. + // Otherwise 400 is returned. + string parent = 1; + + // Required. Source language code. + string source_language_code = 2; + + // Required. Specify up to 10 language codes here. + repeated string target_language_codes = 3; + + // 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 a custom model built by AutoML. + // + // The value format depends on model type: + // 1. Custom models: + // projects/{project-id}/locations/{location-id}/models/{model-id}. + // 2. General (built-in) models: + // projects/{project-id}/locations/{location-id}/models/general/nmt + // projects/{project-id}/locations/{location-id}/models/general/base + // + // If the map is empty or a specific model is + // not requested for a language pair, then default google model is used. + map models = 4; + + // Required. Input configurations. + // The total number of files matched should be <= 1000. + // The total content size should be <= 100M Unicode codepoints. + // The files must use UTF-8 encoding. + repeated InputConfig input_configs = 5; + + // Required. Output configuration. + // If 2 input configs match to the same file (that is, same input path), + // we don't generate output for duplicate inputs. + OutputConfig output_config = 6; + + // Optional. Glossaries to be applied for translation. + // It's keyed by target language code. + map glossaries = 7; +} + +// State metadata for the batch translation operation. +message BatchTranslateMetadata { + // State of the job. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is being processed. + RUNNING = 1; + + // The batch is processed, and at least one item has been successfully + // processed. + SUCCEEDED = 2; + + // The batch is done and no item has been successfully processed. + FAILED = 3; + + // Request is in the process of being canceled after caller invoked + // longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4; + + // The batch is done after the user has called the + // longrunning.Operations.CancelOperation. Any records processed before the + // cancel command are output as specified in the request. + CANCELLED = 5; + } + + // The state of the operation. + State state = 1; + + // Number of successfully translated characters so far (Unicode codepoints). + int64 translated_characters = 2; + + // Number of characters that have failed to process so far (Unicode + // codepoints). + int64 failed_characters = 3; + + // Total number of characters (Unicode codepoints). + // This is the total number of codepoints from input files times the number of + // target languages. It appears here shortly after the call is submitted. + int64 total_characters = 4; + + // Time when the operation was submitted. + google.protobuf.Timestamp submit_time = 5; +} + +// Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by +// BatchTranslateText if at least one sentence is translated successfully. +message BatchTranslateResponse { + // Total number of characters (Unicode codepoints). + int64 total_characters = 1; + + // Number of successfully translated characters (Unicode codepoints). + int64 translated_characters = 2; + + // Number of characters that have failed to process (Unicode codepoints). + int64 failed_characters = 3; + + // Time when the operation was submitted. + google.protobuf.Timestamp submit_time = 4; + + // The time when the operation is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + google.protobuf.Timestamp end_time = 5; +} + +// Input configuration for glossaries. +message GlossaryInputConfig { + // Required. Specify the input. + oneof source { + // Required. Google Cloud Storage location of glossary data. + // File format is determined based on file name extension. API 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 column file, tab- or comma-separated. + // The first column is source text. The second column is target text. + // The file must not contain headers. That is, the first row is data, not + // column names. + // + // - TMX (`.tmx`): TMX file with parallel data defining source/target term + // pairs. + // + // For `EQUIVALENT_TERMS_SET` glossaries: + // + // - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms + // in multiple languages. The format is defined for Google Translation + // Toolkit and documented here: + // `https://support.google.com/translatortoolkit/answer/6306379?hl=en`. + GcsSource gcs_source = 1; + } +} + +// Represents a glossary built from user provided data. +message Glossary { + // Used with UNIDIRECTIONAL. + message LanguageCodePair { + // Required. The BCP-47 language code of the input text, for example, + // "en-US". Expected to be an exact match for GlossaryTerm.language_code. + string source_language_code = 1; + + // Required. The BCP-47 language code for translation output, for example, + // "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. + string target_language_code = 2; + } + + // Used with EQUIVALENT_TERMS_SET. + message LanguageCodesSet { + // 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. + repeated string language_codes = 1; + } + + // Required. The resource name of the glossary. Glossary names have the form + // `projects/{project-id}/locations/{location-id}/glossaries/{glossary-id}`. + string name = 1; + + // Languages supported by the glossary. + oneof languages { + // Used with UNIDIRECTIONAL. + LanguageCodePair language_pair = 3; + + // Used with EQUIVALENT_TERMS_SET. + LanguageCodesSet language_codes_set = 4; + } + + // Required. Provides examples to build the glossary from. + // Total glossary must not exceed 10M Unicode codepoints. + GlossaryInputConfig input_config = 5; + + // Output only. The number of entries defined in the glossary. + int32 entry_count = 6; + + // Output only. When CreateGlossary was called. + google.protobuf.Timestamp submit_time = 7; + + // Output only. When the glossary creation was finished. + google.protobuf.Timestamp end_time = 8; +} + +// Request message for CreateGlossary. +message CreateGlossaryRequest { + // Required. The project name. + string parent = 1; + + // Required. The glossary to create. + Glossary glossary = 2; +} + +// Request message for GetGlossary. +message GetGlossaryRequest { + // Required. The name of the glossary to retrieve. + string name = 1; +} + +// Request message for DeleteGlossary. +message DeleteGlossaryRequest { + // Required. The name of the glossary to delete. + string name = 1; +} + +// Request message for ListGlossaries. +message ListGlossariesRequest { + // Required. The name of the project from which to list all of the glossaries. + string parent = 1; + + // Optional. Requested page size. The server may return fewer glossaries than + // requested. If unspecified, the server picks an appropriate default. + int32 page_size = 2; + + // 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 previous call to `ListGlossaries` method. + // The first page is returned if `page_token`is empty or missing. + string page_token = 3; + + // Optional. Filter specifying constraints of a list operation. + // For example, `tags.glossary_name="products*"`. + // If missing, no filtering is performed. + string filter = 4; +} + +// Response message for ListGlossaries. +message ListGlossariesResponse { + // The list of glossaries for a project. + repeated Glossary glossaries = 1; + + // A token to retrieve a page of results. Pass this value in the + // [ListGlossariesRequest.page_token] field in the subsequent call to + // `ListGlossaries` method to retrieve the next page of results. + string next_page_token = 2; +} + +// Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by +// CreateGlossary. +message CreateGlossaryMetadata { + // Enumerates the possible states that the creation request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is being processed. + RUNNING = 1; + + // The glossary has been successfully created. + SUCCEEDED = 2; + + // Failed to create the glossary. + FAILED = 3; + + // Request is in the process of being canceled after caller invoked + // longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4; + + // The glossary creation request has been successfully canceled. + CANCELLED = 5; + } + + // The name of the glossary that is being created. + string name = 1; + + // The current state of the glossary creation operation. + State state = 2; + + // The time when the operation was submitted to the server. + google.protobuf.Timestamp submit_time = 3; +} + +// Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by +// DeleteGlossary. +message DeleteGlossaryMetadata { + // Enumerates the possible states that the creation request can be in. + enum State { + // Invalid. + STATE_UNSPECIFIED = 0; + + // Request is being processed. + RUNNING = 1; + + // The glossary was successfully deleted. + SUCCEEDED = 2; + + // Failed to delete the glossary. + FAILED = 3; + + // Request is in the process of being canceled after caller invoked + // longrunning.Operations.CancelOperation on the request id. + CANCELLING = 4; + + // The glossary deletion request has been successfully canceled. + CANCELLED = 5; + } + + // The name of the glossary that is being deleted. + string name = 1; + + // The current state of the glossary deletion operation. + State state = 2; + + // The time when the operation was submitted to the server. + google.protobuf.Timestamp submit_time = 3; +} + +// Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by +// DeleteGlossary. +message DeleteGlossaryResponse { + // The name of the deleted glossary. + string name = 1; + + // The time when the operation was submitted to the server. + google.protobuf.Timestamp submit_time = 2; + + // The time when the glossary deletion is finished and + // [google.longrunning.Operation.done][google.longrunning.Operation.done] is set to true. + google.protobuf.Timestamp end_time = 3; +} diff --git a/translate/google/cloud/translate_v3beta1/types.py b/translate/google/cloud/translate_v3beta1/types.py index 7e76e7e16f24..959f214f2f2c 100644 --- a/translate/google/cloud/translate_v3beta1/types.py +++ b/translate/google/cloud/translate_v3beta1/types.py @@ -19,7 +19,7 @@ from google.api_core.protobuf_helpers import get_messages -from google.cloud.translation_v3beta1.proto import translation_service_pb2 +from google.cloud.translate_v3beta1.proto import translation_service_pb2 from google.longrunning import operations_pb2 from google.protobuf import any_pb2 from google.protobuf import timestamp_pb2 @@ -37,7 +37,7 @@ names.append(name) for module in _local_modules: for name, message in get_messages(module).items(): - message.__module__ = "google.cloud.translation_v3beta1.types" + message.__module__ = "google.cloud.translate_v3beta1.types" setattr(sys.modules[__name__], name, message) names.append(name) diff --git a/translate/synth.metadata b/translate/synth.metadata index 3039c11143d9..1bf951b7500b 100644 --- a/translate/synth.metadata +++ b/translate/synth.metadata @@ -1,11 +1,11 @@ { - "updateTime": "2019-03-11T20:20:50.145940Z", + "updateTime": "2019-03-13T18:12:17.948288Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.15", - "dockerImage": "googleapis/artman@sha256:9caadfa59d48224cba5f3217eb9d61a155b78ccf31e628abef385bc5b7ed3bd2" + "version": "0.16.17", + "dockerImage": "googleapis/artman@sha256:7231f27272231a884e09edb5953148c85ecd8467780d33c4a35c3e507885715b" } }, { diff --git a/translate/synth.py b/translate/synth.py index f6f8e0e111e2..f8de4e83b987 100644 --- a/translate/synth.py +++ b/translate/synth.py @@ -35,7 +35,8 @@ private=True, ) - s.move(library / f'google/cloud/translation_{version}', f'google/cloud/translate_{version}', excludes=excludes) + #s.move(library / f'google/cloud/translation_{version}', f'google/cloud/translate_{version}', excludes=excludes) + s.move(library / f'google/cloud/translate_{version}', excludes=excludes) s.move(library / 'tests') # ---------------------------------------------------------------------------- From 659ecbcf5744e3475ddc33bc46ba24e458a73716 Mon Sep 17 00:00:00 2001 From: Chris Wilcox Date: Mon, 18 Mar 2019 10:00:56 -0400 Subject: [PATCH 6/8] resynth after proto naming changes --- synth.metadata | 2 +- .../translate_v3beta1/proto/translation_service.proto | 8 ++++++-- .../translate_v3beta1/proto/translation_service_pb2.py | 4 ++-- .../proto/translation_service_pb2_grpc.py | 8 ++++++-- translate/synth.metadata | 10 +++++++++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/synth.metadata b/synth.metadata index 00d0c95474b7..c01baa9e6fa9 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,3 +1,3 @@ { - "updateTime": "2019-03-11T17:47:38.167682Z" + "updateTime": "2019-03-18T13:56:09.030990Z" } \ No newline at end of file diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service.proto b/translate/google/cloud/translate_v3beta1/proto/translation_service.proto index 6294f7def899..e9e65baa35b5 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service.proto +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service.proto @@ -22,10 +22,14 @@ import "google/longrunning/operations.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/cloud/translation/v3beta1;translation"; +option csharp_namespace = "Google.Cloud.Translate.V3Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/translate/v3beta1;translate"; option java_multiple_files = true; option java_outer_classname = "TranslationServiceProto"; -option java_package = "com.google.cloud.translation.v3beta1"; +option java_package = "com.google.cloud.translate.v3beta1"; +option php_namespace = "Google\\Cloud\\Translate\\V3beta1"; +option ruby_package = "Google::Cloud::Translate::V3beta1"; + // Proto file for the Cloud Translation API (v3beta1). // Provides natural language translation operations. diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py index 3806fe1bfe97..d25701491f05 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py @@ -26,10 +26,10 @@ package="google.cloud.translation.v3beta1", syntax="proto3", serialized_options=_b( - "\n$com.google.cloud.translation.v3beta1B\027TranslationServiceProtoP\001ZKgoogle.golang.org/genproto/googleapis/cloud/translation/v3beta1;translation\370\001\001" + '\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#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"D\n\x1bTranslateTextGlossaryConfig\x12\x10\n\x08glossary\x18\x01 \x01(\t\x12\x13\n\x0bignore_case\x18\x02 \x01(\x08"\xee\x01\n\x14TranslateTextRequest\x12\x10\n\x08\x63ontents\x18\x01 \x03(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x1c\n\x14source_language_code\x18\x04 \x01(\t\x12\x1c\n\x14target_language_code\x18\x05 \x01(\t\x12\x0e\n\x06parent\x18\x08 \x01(\t\x12\r\n\x05model\x18\x06 \x01(\t\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig"\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"f\n\x15\x44\x65tectLanguageRequest\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\r\n\x05model\x18\x04 \x01(\t\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\tB\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"\\\n\x1cGetSupportedLanguagesRequest\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1d\n\x15\x64isplay_language_code\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t"\\\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"\x1e\n\tGcsSource\x12\x11\n\tinput_uri\x18\x01 \x01(\t"m\n\x0bInputConfig\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x41\n\ngcs_source\x18\x02 \x01(\x0b\x32+.google.cloud.translation.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"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"\xd0\x04\n\x19\x42\x61tchTranslateTextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1d\n\x15target_language_codes\x18\x03 \x03(\t\x12W\n\x06models\x18\x04 \x03(\x0b\x32G.google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32-.google.cloud.translation.v3beta1.InputConfig\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.translation.v3beta1.OutputConfig\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32K.google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry\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"\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"\x93\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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(\tB\x0b\n\tlanguages"e\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3beta1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"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\x80\x0c\n\x12TranslationService\x12\xc3\x01\n\rTranslateText\x12\x36.google.cloud.translation.v3beta1.TranslateTextRequest\x1a\x37.google.cloud.translation.v3beta1.TranslateTextResponse"A\x82\xd3\xe4\x93\x02;"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*\x12\xc7\x01\n\x0e\x44\x65tectLanguage\x12\x37.google.cloud.translation.v3beta1.DetectLanguageRequest\x1a\x38.google.cloud.translation.v3beta1.DetectLanguageResponse"B\x82\xd3\xe4\x93\x02<"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*\x12\xd2\x01\n\x15GetSupportedLanguages\x12>.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest\x1a\x34.google.cloud.translation.v3beta1.SupportedLanguages"C\x82\xd3\xe4\x93\x02=\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguages\x12\xb8\x01\n\x12\x42\x61tchTranslateText\x12;.google.cloud.translation.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"F\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xaf\x01\n\x0e\x43reateGlossary\x12\x37.google.cloud.translation.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xc0\x01\n\x0eListGlossaries\x12\x37.google.cloud.translation.v3beta1.ListGlossariesRequest\x1a\x38.google.cloud.translation.v3beta1.ListGlossariesResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\x12\xac\x01\n\x0bGetGlossary\x12\x34.google.cloud.translation.v3beta1.GetGlossaryRequest\x1a*.google.cloud.translation.v3beta1.Glossary";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\x12\xa5\x01\n\x0e\x44\x65leteGlossary\x12\x37.google.cloud.translation.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation";\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}B\x91\x01\n$com.google.cloud.translation.v3beta1B\x17TranslationServiceProtoP\x01ZKgoogle.golang.org/genproto/googleapis/cloud/translation/v3beta1;translation\xf8\x01\x01\x62\x06proto3' + '\n@google/cloud/translation_v3beta1/proto/translation_service.proto\x12 google.cloud.translation.v3beta1\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"D\n\x1bTranslateTextGlossaryConfig\x12\x10\n\x08glossary\x18\x01 \x01(\t\x12\x13\n\x0bignore_case\x18\x02 \x01(\x08"\xee\x01\n\x14TranslateTextRequest\x12\x10\n\x08\x63ontents\x18\x01 \x03(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x1c\n\x14source_language_code\x18\x04 \x01(\t\x12\x1c\n\x14target_language_code\x18\x05 \x01(\t\x12\x0e\n\x06parent\x18\x08 \x01(\t\x12\r\n\x05model\x18\x06 \x01(\t\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig"\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"f\n\x15\x44\x65tectLanguageRequest\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\r\n\x05model\x18\x04 \x01(\t\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\tB\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"\\\n\x1cGetSupportedLanguagesRequest\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1d\n\x15\x64isplay_language_code\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t"\\\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"\x1e\n\tGcsSource\x12\x11\n\tinput_uri\x18\x01 \x01(\t"m\n\x0bInputConfig\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x41\n\ngcs_source\x18\x02 \x01(\x0b\x32+.google.cloud.translation.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"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"\xd0\x04\n\x19\x42\x61tchTranslateTextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1d\n\x15target_language_codes\x18\x03 \x03(\t\x12W\n\x06models\x18\x04 \x03(\x0b\x32G.google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32-.google.cloud.translation.v3beta1.InputConfig\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.translation.v3beta1.OutputConfig\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32K.google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry\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"\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"\x93\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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(\tB\x0b\n\tlanguages"e\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3beta1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"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\x80\x0c\n\x12TranslationService\x12\xc3\x01\n\rTranslateText\x12\x36.google.cloud.translation.v3beta1.TranslateTextRequest\x1a\x37.google.cloud.translation.v3beta1.TranslateTextResponse"A\x82\xd3\xe4\x93\x02;"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*\x12\xc7\x01\n\x0e\x44\x65tectLanguage\x12\x37.google.cloud.translation.v3beta1.DetectLanguageRequest\x1a\x38.google.cloud.translation.v3beta1.DetectLanguageResponse"B\x82\xd3\xe4\x93\x02<"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*\x12\xd2\x01\n\x15GetSupportedLanguages\x12>.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest\x1a\x34.google.cloud.translation.v3beta1.SupportedLanguages"C\x82\xd3\xe4\x93\x02=\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguages\x12\xb8\x01\n\x12\x42\x61tchTranslateText\x12;.google.cloud.translation.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"F\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xaf\x01\n\x0e\x43reateGlossary\x12\x37.google.cloud.translation.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xc0\x01\n\x0eListGlossaries\x12\x37.google.cloud.translation.v3beta1.ListGlossariesRequest\x1a\x38.google.cloud.translation.v3beta1.ListGlossariesResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\x12\xac\x01\n\x0bGetGlossary\x12\x34.google.cloud.translation.v3beta1.GetGlossaryRequest\x1a*.google.cloud.translation.v3beta1.Glossary";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\x12\xa5\x01\n\x0e\x44\x65leteGlossary\x12\x37.google.cloud.translation.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation";\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}B\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, diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py index 4a356d1371be..a0754bba9c50 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py @@ -10,7 +10,9 @@ class TranslationServiceStub(object): - """Provides natural language translation operations. + """Proto file for the Cloud Translation API (v3beta1). + + Provides natural language translation operations. """ def __init__(self, channel): @@ -62,7 +64,9 @@ def __init__(self, channel): class TranslationServiceServicer(object): - """Provides natural language translation operations. + """Proto file for the Cloud Translation API (v3beta1). + + Provides natural language translation operations. """ def TranslateText(self, request, context): diff --git a/translate/synth.metadata b/translate/synth.metadata index 1bf951b7500b..6671178626e4 100644 --- a/translate/synth.metadata +++ b/translate/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-03-13T18:12:17.948288Z", + "updateTime": "2019-03-18T14:00:29.165148Z", "sources": [ { "generator": { @@ -8,6 +8,14 @@ "dockerImage": "googleapis/artman@sha256:7231f27272231a884e09edb5953148c85ecd8467780d33c4a35c3e507885715b" } }, + { + "git": { + "name": "googleapis-private", + "remote": "git@github.com:googleapis/googleapis-private.git", + "sha": "86ac90ebcecc95d6310ec7932a8a0f89738c4436", + "internalRef": "238755698" + } + }, { "template": { "name": "python_library", From 0cee20c340b6ca682a3df3a9cb93c8678813e33c Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 21 Mar 2019 12:40:08 -0700 Subject: [PATCH 7/8] Regenerate with updated protos. --- .../gapic/translation_service_client.py | 4 +- .../translation_service_client_config.py | 2 +- .../translation_service_grpc_transport.py | 2 +- .../proto/translation_service.proto | 2 +- .../proto/translation_service_pb2.py | 540 +++++++++--------- .../proto/translation_service_pb2_grpc.py | 74 +-- translate/setup.py | 2 +- translate/synth.metadata | 14 +- 8 files changed, 316 insertions(+), 324 deletions(-) diff --git a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py index 133a4743d66f..d6d7e093807c 100644 --- a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py +++ b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py @@ -13,7 +13,7 @@ # 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. -"""Accesses the google.cloud.translation.v3beta1 TranslationService API.""" +"""Accesses the google.cloud.translate.v3beta1 TranslationService API.""" import functools import pkg_resources @@ -52,7 +52,7 @@ class TranslationServiceClient(object): # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = "google.cloud.translation.v3beta1.TranslationService" + _INTERFACE_NAME = "google.cloud.translate.v3beta1.TranslationService" @classmethod def from_service_account_file(cls, filename, *args, **kwargs): diff --git a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py index 21b7872180e8..a96ffc79a702 100644 --- a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py +++ b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py @@ -1,6 +1,6 @@ config = { "interfaces": { - "google.cloud.translation.v3beta1.TranslationService": { + "google.cloud.translate.v3beta1.TranslationService": { "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], diff --git a/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py b/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py index 8b00b7ed7398..83a547ae7e25 100644 --- a/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py +++ b/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py @@ -22,7 +22,7 @@ class TranslationServiceGrpcTransport(object): """gRPC transport class providing stubs for - google.cloud.translation.v3beta1 TranslationService API. + google.cloud.translate.v3beta1 TranslationService API. The transport provides access to the raw gRPC stubs, which can be used to take advantage of advanced diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service.proto b/translate/google/cloud/translate_v3beta1/proto/translation_service.proto index e9e65baa35b5..6a4b894ccdaa 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service.proto +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service.proto @@ -15,7 +15,7 @@ syntax = "proto3"; -package google.cloud.translation.v3beta1; +package google.cloud.translate.v3beta1; import "google/api/annotations.proto"; import "google/longrunning/operations.proto"; diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py index d25701491f05..f1b782f98cce 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translation_v3beta1/proto/translation_service.proto +# source: google/cloud/translate_v3beta1/proto/translation_service.proto import sys @@ -22,14 +22,14 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/translation_v3beta1/proto/translation_service.proto", - package="google.cloud.translation.v3beta1", + name="google/cloud/translate_v3beta1/proto/translation_service.proto", + package="google.cloud.translate.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#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"D\n\x1bTranslateTextGlossaryConfig\x12\x10\n\x08glossary\x18\x01 \x01(\t\x12\x13\n\x0bignore_case\x18\x02 \x01(\x08"\xee\x01\n\x14TranslateTextRequest\x12\x10\n\x08\x63ontents\x18\x01 \x03(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x1c\n\x14source_language_code\x18\x04 \x01(\t\x12\x1c\n\x14target_language_code\x18\x05 \x01(\t\x12\x0e\n\x06parent\x18\x08 \x01(\t\x12\r\n\x05model\x18\x06 \x01(\t\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig"\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"f\n\x15\x44\x65tectLanguageRequest\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\r\n\x05model\x18\x04 \x01(\t\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\tB\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"\\\n\x1cGetSupportedLanguagesRequest\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1d\n\x15\x64isplay_language_code\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t"\\\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"\x1e\n\tGcsSource\x12\x11\n\tinput_uri\x18\x01 \x01(\t"m\n\x0bInputConfig\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x41\n\ngcs_source\x18\x02 \x01(\x0b\x32+.google.cloud.translation.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"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"\xd0\x04\n\x19\x42\x61tchTranslateTextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1d\n\x15target_language_codes\x18\x03 \x03(\t\x12W\n\x06models\x18\x04 \x03(\x0b\x32G.google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32-.google.cloud.translation.v3beta1.InputConfig\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.translation.v3beta1.OutputConfig\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32K.google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry\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"\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"\x93\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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(\tB\x0b\n\tlanguages"e\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3beta1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"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\x80\x0c\n\x12TranslationService\x12\xc3\x01\n\rTranslateText\x12\x36.google.cloud.translation.v3beta1.TranslateTextRequest\x1a\x37.google.cloud.translation.v3beta1.TranslateTextResponse"A\x82\xd3\xe4\x93\x02;"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*\x12\xc7\x01\n\x0e\x44\x65tectLanguage\x12\x37.google.cloud.translation.v3beta1.DetectLanguageRequest\x1a\x38.google.cloud.translation.v3beta1.DetectLanguageResponse"B\x82\xd3\xe4\x93\x02<"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*\x12\xd2\x01\n\x15GetSupportedLanguages\x12>.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest\x1a\x34.google.cloud.translation.v3beta1.SupportedLanguages"C\x82\xd3\xe4\x93\x02=\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguages\x12\xb8\x01\n\x12\x42\x61tchTranslateText\x12;.google.cloud.translation.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"F\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xaf\x01\n\x0e\x43reateGlossary\x12\x37.google.cloud.translation.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xc0\x01\n\x0eListGlossaries\x12\x37.google.cloud.translation.v3beta1.ListGlossariesRequest\x1a\x38.google.cloud.translation.v3beta1.ListGlossariesResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\x12\xac\x01\n\x0bGetGlossary\x12\x34.google.cloud.translation.v3beta1.GetGlossaryRequest\x1a*.google.cloud.translation.v3beta1.Glossary";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\x12\xa5\x01\n\x0e\x44\x65leteGlossary\x12\x37.google.cloud.translation.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation";\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}B\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' + '\n>google/cloud/translate_v3beta1/proto/translation_service.proto\x12\x1egoogle.cloud.translate.v3beta1\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"D\n\x1bTranslateTextGlossaryConfig\x12\x10\n\x08glossary\x18\x01 \x01(\t\x12\x13\n\x0bignore_case\x18\x02 \x01(\x08"\xec\x01\n\x14TranslateTextRequest\x12\x10\n\x08\x63ontents\x18\x01 \x03(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x1c\n\x14source_language_code\x18\x04 \x01(\t\x12\x1c\n\x14target_language_code\x18\x05 \x01(\t\x12\x0e\n\x06parent\x18\x08 \x01(\t\x12\r\n\x05model\x18\x06 \x01(\t\x12T\n\x0fglossary_config\x18\x07 \x01(\x0b\x32;.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig"\xa6\x01\n\x15TranslateTextResponse\x12\x41\n\x0ctranslations\x18\x01 \x03(\x0b\x32+.google.cloud.translate.v3beta1.Translation\x12J\n\x15glossary_translations\x18\x03 \x03(\x0b\x32+.google.cloud.translate.v3beta1.Translation"\xab\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\x12T\n\x0fglossary_config\x18\x03 \x01(\x0b\x32;.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig"f\n\x15\x44\x65tectLanguageRequest\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\r\n\x05model\x18\x04 \x01(\t\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\tB\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\x43\n\tlanguages\x18\x01 \x03(\x0b\x32\x30.google.cloud.translate.v3beta1.DetectedLanguage"\\\n\x1cGetSupportedLanguagesRequest\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1d\n\x15\x64isplay_language_code\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t"Z\n\x12SupportedLanguages\x12\x44\n\tlanguages\x18\x01 \x03(\x0b\x32\x31.google.cloud.translate.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"\x1e\n\tGcsSource\x12\x11\n\tinput_uri\x18\x01 \x01(\t"k\n\x0bInputConfig\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12?\n\ngcs_source\x18\x02 \x01(\x0b\x32).google.cloud.translate.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"h\n\x0cOutputConfig\x12I\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32..google.cloud.translate.v3beta1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xc6\x04\n\x19\x42\x61tchTranslateTextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1d\n\x15target_language_codes\x18\x03 \x03(\t\x12U\n\x06models\x18\x04 \x03(\x0b\x32\x45.google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry\x12\x42\n\rinput_configs\x18\x05 \x03(\x0b\x32+.google.cloud.translate.v3beta1.InputConfig\x12\x43\n\routput_config\x18\x06 \x01(\x0b\x32,.google.cloud.translate.v3beta1.OutputConfig\x12]\n\nglossaries\x18\x07 \x03(\x0b\x32I.google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1an\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig:\x02\x38\x01"\xd1\x02\n\x16\x42\x61tchTranslateMetadata\x12K\n\x05state\x18\x01 \x01(\x0e\x32<.google.cloud.translate.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"`\n\x13GlossaryInputConfig\x12?\n\ngcs_source\x18\x01 \x01(\x0b\x32).google.cloud.translate.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"\x8d\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\rlanguage_pair\x18\x03 \x01(\x0b\x32\x39.google.cloud.translate.v3beta1.Glossary.LanguageCodePairH\x00\x12W\n\x12language_codes_set\x18\x04 \x01(\x0b\x32\x39.google.cloud.translate.v3beta1.Glossary.LanguageCodesSetH\x00\x12I\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x33.google.cloud.translate.v3beta1.GlossaryInputConfig\x12\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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(\tB\x0b\n\tlanguages"c\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12:\n\x08glossary\x18\x02 \x01(\x0b\x32(.google.cloud.translate.v3beta1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"o\n\x16ListGlossariesResponse\x12<\n\nglossaries\x18\x01 \x03(\x0b\x32(.google.cloud.translate.v3beta1.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8b\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x05state\x18\x02 \x01(\x0e\x32<.google.cloud.translate.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"\x8b\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x05state\x18\x02 \x01(\x0e\x32<.google.cloud.translate.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\xe6\x0b\n\x12TranslationService\x12\xbf\x01\n\rTranslateText\x12\x34.google.cloud.translate.v3beta1.TranslateTextRequest\x1a\x35.google.cloud.translate.v3beta1.TranslateTextResponse"A\x82\xd3\xe4\x93\x02;"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*\x12\xc3\x01\n\x0e\x44\x65tectLanguage\x12\x35.google.cloud.translate.v3beta1.DetectLanguageRequest\x1a\x36.google.cloud.translate.v3beta1.DetectLanguageResponse"B\x82\xd3\xe4\x93\x02<"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*\x12\xce\x01\n\x15GetSupportedLanguages\x12<.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest\x1a\x32.google.cloud.translate.v3beta1.SupportedLanguages"C\x82\xd3\xe4\x93\x02=\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguages\x12\xb6\x01\n\x12\x42\x61tchTranslateText\x12\x39.google.cloud.translate.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"F\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xad\x01\n\x0e\x43reateGlossary\x12\x35.google.cloud.translate.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xbc\x01\n\x0eListGlossaries\x12\x35.google.cloud.translate.v3beta1.ListGlossariesRequest\x1a\x36.google.cloud.translate.v3beta1.ListGlossariesResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\x12\xa8\x01\n\x0bGetGlossary\x12\x32.google.cloud.translate.v3beta1.GetGlossaryRequest\x1a(.google.cloud.translate.v3beta1.Glossary";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\x12\xa3\x01\n\x0e\x44\x65leteGlossary\x12\x35.google.cloud.translate.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation";\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}B\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, @@ -41,7 +41,7 @@ _BATCHTRANSLATEMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.State", + full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -70,14 +70,14 @@ ], containing_type=None, serialized_options=None, - serialized_start=2558, - serialized_end=2659, + serialized_start=2526, + serialized_end=2627, ) _sym_db.RegisterEnumDescriptor(_BATCHTRANSLATEMETADATA_STATE) _CREATEGLOSSARYMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.State", + full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -106,14 +106,14 @@ ], containing_type=None, serialized_options=None, - serialized_start=2558, - serialized_end=2659, + serialized_start=2526, + serialized_end=2627, ) _sym_db.RegisterEnumDescriptor(_CREATEGLOSSARYMETADATA_STATE) _DELETEGLOSSARYMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -142,22 +142,22 @@ ], containing_type=None, serialized_options=None, - serialized_start=2558, - serialized_end=2659, + serialized_start=2526, + serialized_end=2627, ) _sym_db.RegisterEnumDescriptor(_DELETEGLOSSARYMETADATA_STATE) _TRANSLATETEXTGLOSSARYCONFIG = _descriptor.Descriptor( name="TranslateTextGlossaryConfig", - full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig", + full_name="google.cloud.translate.v3beta1.TranslateTextGlossaryConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="glossary", - full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig.glossary", + full_name="google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.glossary", index=0, number=1, type=9, @@ -175,7 +175,7 @@ ), _descriptor.FieldDescriptor( name="ignore_case", - full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig.ignore_case", + full_name="google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.ignore_case", index=1, number=2, type=8, @@ -200,21 +200,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=202, - serialized_end=270, + serialized_start=198, + serialized_end=266, ) _TRANSLATETEXTREQUEST = _descriptor.Descriptor( name="TranslateTextRequest", - full_name="google.cloud.translation.v3beta1.TranslateTextRequest", + full_name="google.cloud.translate.v3beta1.TranslateTextRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="contents", - full_name="google.cloud.translation.v3beta1.TranslateTextRequest.contents", + full_name="google.cloud.translate.v3beta1.TranslateTextRequest.contents", index=0, number=1, type=9, @@ -232,7 +232,7 @@ ), _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translation.v3beta1.TranslateTextRequest.mime_type", + full_name="google.cloud.translate.v3beta1.TranslateTextRequest.mime_type", index=1, number=3, type=9, @@ -250,7 +250,7 @@ ), _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translation.v3beta1.TranslateTextRequest.source_language_code", + full_name="google.cloud.translate.v3beta1.TranslateTextRequest.source_language_code", index=2, number=4, type=9, @@ -268,7 +268,7 @@ ), _descriptor.FieldDescriptor( name="target_language_code", - full_name="google.cloud.translation.v3beta1.TranslateTextRequest.target_language_code", + full_name="google.cloud.translate.v3beta1.TranslateTextRequest.target_language_code", index=3, number=5, type=9, @@ -286,7 +286,7 @@ ), _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3beta1.TranslateTextRequest.parent", + full_name="google.cloud.translate.v3beta1.TranslateTextRequest.parent", index=4, number=8, type=9, @@ -304,7 +304,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translation.v3beta1.TranslateTextRequest.model", + full_name="google.cloud.translate.v3beta1.TranslateTextRequest.model", index=5, number=6, type=9, @@ -322,7 +322,7 @@ ), _descriptor.FieldDescriptor( name="glossary_config", - full_name="google.cloud.translation.v3beta1.TranslateTextRequest.glossary_config", + full_name="google.cloud.translate.v3beta1.TranslateTextRequest.glossary_config", index=6, number=7, type=11, @@ -347,21 +347,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=273, - serialized_end=511, + serialized_start=269, + serialized_end=505, ) _TRANSLATETEXTRESPONSE = _descriptor.Descriptor( name="TranslateTextResponse", - full_name="google.cloud.translation.v3beta1.TranslateTextResponse", + full_name="google.cloud.translate.v3beta1.TranslateTextResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="translations", - full_name="google.cloud.translation.v3beta1.TranslateTextResponse.translations", + full_name="google.cloud.translate.v3beta1.TranslateTextResponse.translations", index=0, number=1, type=11, @@ -379,7 +379,7 @@ ), _descriptor.FieldDescriptor( name="glossary_translations", - full_name="google.cloud.translation.v3beta1.TranslateTextResponse.glossary_translations", + full_name="google.cloud.translate.v3beta1.TranslateTextResponse.glossary_translations", index=1, number=3, type=11, @@ -404,21 +404,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=514, - serialized_end=684, + serialized_start=508, + serialized_end=674, ) _TRANSLATION = _descriptor.Descriptor( name="Translation", - full_name="google.cloud.translation.v3beta1.Translation", + full_name="google.cloud.translate.v3beta1.Translation", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="translated_text", - full_name="google.cloud.translation.v3beta1.Translation.translated_text", + full_name="google.cloud.translate.v3beta1.Translation.translated_text", index=0, number=1, type=9, @@ -436,7 +436,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translation.v3beta1.Translation.model", + full_name="google.cloud.translate.v3beta1.Translation.model", index=1, number=2, type=9, @@ -454,7 +454,7 @@ ), _descriptor.FieldDescriptor( name="detected_language_code", - full_name="google.cloud.translation.v3beta1.Translation.detected_language_code", + full_name="google.cloud.translate.v3beta1.Translation.detected_language_code", index=2, number=4, type=9, @@ -472,7 +472,7 @@ ), _descriptor.FieldDescriptor( name="glossary_config", - full_name="google.cloud.translation.v3beta1.Translation.glossary_config", + full_name="google.cloud.translate.v3beta1.Translation.glossary_config", index=3, number=3, type=11, @@ -497,21 +497,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=687, - serialized_end=860, + serialized_start=677, + serialized_end=848, ) _DETECTLANGUAGEREQUEST = _descriptor.Descriptor( name="DetectLanguageRequest", - full_name="google.cloud.translation.v3beta1.DetectLanguageRequest", + full_name="google.cloud.translate.v3beta1.DetectLanguageRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.parent", + full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.parent", index=0, number=5, type=9, @@ -529,7 +529,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.model", + full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.model", index=1, number=4, type=9, @@ -547,7 +547,7 @@ ), _descriptor.FieldDescriptor( name="content", - full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.content", + full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.content", index=2, number=1, type=9, @@ -565,7 +565,7 @@ ), _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.mime_type", + full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.mime_type", index=3, number=3, type=9, @@ -592,27 +592,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.source", + full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=862, - serialized_end=964, + serialized_start=850, + serialized_end=952, ) _DETECTEDLANGUAGE = _descriptor.Descriptor( name="DetectedLanguage", - full_name="google.cloud.translation.v3beta1.DetectedLanguage", + full_name="google.cloud.translate.v3beta1.DetectedLanguage", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_code", - full_name="google.cloud.translation.v3beta1.DetectedLanguage.language_code", + full_name="google.cloud.translate.v3beta1.DetectedLanguage.language_code", index=0, number=1, type=9, @@ -630,7 +630,7 @@ ), _descriptor.FieldDescriptor( name="confidence", - full_name="google.cloud.translation.v3beta1.DetectedLanguage.confidence", + full_name="google.cloud.translate.v3beta1.DetectedLanguage.confidence", index=1, number=2, type=2, @@ -655,21 +655,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=966, - serialized_end=1027, + serialized_start=954, + serialized_end=1015, ) _DETECTLANGUAGERESPONSE = _descriptor.Descriptor( name="DetectLanguageResponse", - full_name="google.cloud.translation.v3beta1.DetectLanguageResponse", + full_name="google.cloud.translate.v3beta1.DetectLanguageResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="languages", - full_name="google.cloud.translation.v3beta1.DetectLanguageResponse.languages", + full_name="google.cloud.translate.v3beta1.DetectLanguageResponse.languages", index=0, number=1, type=11, @@ -694,21 +694,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1029, - serialized_end=1124, + serialized_start=1017, + serialized_end=1110, ) _GETSUPPORTEDLANGUAGESREQUEST = _descriptor.Descriptor( name="GetSupportedLanguagesRequest", - full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest", + full_name="google.cloud.translate.v3beta1.GetSupportedLanguagesRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.parent", + full_name="google.cloud.translate.v3beta1.GetSupportedLanguagesRequest.parent", index=0, number=3, type=9, @@ -726,7 +726,7 @@ ), _descriptor.FieldDescriptor( name="display_language_code", - full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.display_language_code", + full_name="google.cloud.translate.v3beta1.GetSupportedLanguagesRequest.display_language_code", index=1, number=1, type=9, @@ -744,7 +744,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.model", + full_name="google.cloud.translate.v3beta1.GetSupportedLanguagesRequest.model", index=2, number=2, type=9, @@ -769,21 +769,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1126, - serialized_end=1218, + serialized_start=1112, + serialized_end=1204, ) _SUPPORTEDLANGUAGES = _descriptor.Descriptor( name="SupportedLanguages", - full_name="google.cloud.translation.v3beta1.SupportedLanguages", + full_name="google.cloud.translate.v3beta1.SupportedLanguages", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="languages", - full_name="google.cloud.translation.v3beta1.SupportedLanguages.languages", + full_name="google.cloud.translate.v3beta1.SupportedLanguages.languages", index=0, number=1, type=11, @@ -808,21 +808,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1220, - serialized_end=1312, + serialized_start=1206, + serialized_end=1296, ) _SUPPORTEDLANGUAGE = _descriptor.Descriptor( name="SupportedLanguage", - full_name="google.cloud.translation.v3beta1.SupportedLanguage", + full_name="google.cloud.translate.v3beta1.SupportedLanguage", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_code", - full_name="google.cloud.translation.v3beta1.SupportedLanguage.language_code", + full_name="google.cloud.translate.v3beta1.SupportedLanguage.language_code", index=0, number=1, type=9, @@ -840,7 +840,7 @@ ), _descriptor.FieldDescriptor( name="display_name", - full_name="google.cloud.translation.v3beta1.SupportedLanguage.display_name", + full_name="google.cloud.translate.v3beta1.SupportedLanguage.display_name", index=1, number=2, type=9, @@ -858,7 +858,7 @@ ), _descriptor.FieldDescriptor( name="support_source", - full_name="google.cloud.translation.v3beta1.SupportedLanguage.support_source", + full_name="google.cloud.translate.v3beta1.SupportedLanguage.support_source", index=2, number=3, type=8, @@ -876,7 +876,7 @@ ), _descriptor.FieldDescriptor( name="support_target", - full_name="google.cloud.translation.v3beta1.SupportedLanguage.support_target", + full_name="google.cloud.translate.v3beta1.SupportedLanguage.support_target", index=3, number=4, type=8, @@ -901,21 +901,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1314, - serialized_end=1426, + serialized_start=1298, + serialized_end=1410, ) _GCSSOURCE = _descriptor.Descriptor( name="GcsSource", - full_name="google.cloud.translation.v3beta1.GcsSource", + full_name="google.cloud.translate.v3beta1.GcsSource", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="input_uri", - full_name="google.cloud.translation.v3beta1.GcsSource.input_uri", + full_name="google.cloud.translate.v3beta1.GcsSource.input_uri", index=0, number=1, type=9, @@ -940,21 +940,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1428, - serialized_end=1458, + serialized_start=1412, + serialized_end=1442, ) _INPUTCONFIG = _descriptor.Descriptor( name="InputConfig", - full_name="google.cloud.translation.v3beta1.InputConfig", + full_name="google.cloud.translate.v3beta1.InputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translation.v3beta1.InputConfig.mime_type", + full_name="google.cloud.translate.v3beta1.InputConfig.mime_type", index=0, number=1, type=9, @@ -972,7 +972,7 @@ ), _descriptor.FieldDescriptor( name="gcs_source", - full_name="google.cloud.translation.v3beta1.InputConfig.gcs_source", + full_name="google.cloud.translate.v3beta1.InputConfig.gcs_source", index=1, number=2, type=11, @@ -999,27 +999,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translation.v3beta1.InputConfig.source", + full_name="google.cloud.translate.v3beta1.InputConfig.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=1460, - serialized_end=1569, + serialized_start=1444, + serialized_end=1551, ) _GCSDESTINATION = _descriptor.Descriptor( name="GcsDestination", - full_name="google.cloud.translation.v3beta1.GcsDestination", + full_name="google.cloud.translate.v3beta1.GcsDestination", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="output_uri_prefix", - full_name="google.cloud.translation.v3beta1.GcsDestination.output_uri_prefix", + full_name="google.cloud.translate.v3beta1.GcsDestination.output_uri_prefix", index=0, number=1, type=9, @@ -1044,21 +1044,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1571, - serialized_end=1614, + serialized_start=1553, + serialized_end=1596, ) _OUTPUTCONFIG = _descriptor.Descriptor( name="OutputConfig", - full_name="google.cloud.translation.v3beta1.OutputConfig", + full_name="google.cloud.translate.v3beta1.OutputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", - full_name="google.cloud.translation.v3beta1.OutputConfig.gcs_destination", + full_name="google.cloud.translate.v3beta1.OutputConfig.gcs_destination", index=0, number=1, type=11, @@ -1085,27 +1085,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="destination", - full_name="google.cloud.translation.v3beta1.OutputConfig.destination", + full_name="google.cloud.translate.v3beta1.OutputConfig.destination", index=0, containing_type=None, fields=[], ) ], - serialized_start=1616, - serialized_end=1722, + serialized_start=1598, + serialized_end=1702, ) _BATCHTRANSLATETEXTREQUEST_MODELSENTRY = _descriptor.Descriptor( name="ModelsEntry", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="key", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry.key", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry.key", index=0, number=1, type=9, @@ -1123,7 +1123,7 @@ ), _descriptor.FieldDescriptor( name="value", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry.value", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry.value", index=1, number=2, type=9, @@ -1148,20 +1148,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2158, - serialized_end=2203, + serialized_start=2130, + serialized_end=2175, ) _BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY = _descriptor.Descriptor( name="GlossariesEntry", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="key", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry.key", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry.key", index=0, number=1, type=9, @@ -1179,7 +1179,7 @@ ), _descriptor.FieldDescriptor( name="value", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry.value", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry.value", index=1, number=2, type=11, @@ -1204,20 +1204,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2205, - serialized_end=2317, + serialized_start=2177, + serialized_end=2287, ) _BATCHTRANSLATETEXTREQUEST = _descriptor.Descriptor( name="BatchTranslateTextRequest", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.parent", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.parent", index=0, number=1, type=9, @@ -1235,7 +1235,7 @@ ), _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.source_language_code", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.source_language_code", index=1, number=2, type=9, @@ -1253,7 +1253,7 @@ ), _descriptor.FieldDescriptor( name="target_language_codes", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.target_language_codes", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.target_language_codes", index=2, number=3, type=9, @@ -1271,7 +1271,7 @@ ), _descriptor.FieldDescriptor( name="models", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.models", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.models", index=3, number=4, type=11, @@ -1289,7 +1289,7 @@ ), _descriptor.FieldDescriptor( name="input_configs", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.input_configs", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.input_configs", index=4, number=5, type=11, @@ -1307,7 +1307,7 @@ ), _descriptor.FieldDescriptor( name="output_config", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.output_config", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.output_config", index=5, number=6, type=11, @@ -1325,7 +1325,7 @@ ), _descriptor.FieldDescriptor( name="glossaries", - full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.glossaries", + full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.glossaries", index=6, number=7, type=11, @@ -1353,21 +1353,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1725, - serialized_end=2317, + serialized_start=1705, + serialized_end=2287, ) _BATCHTRANSLATEMETADATA = _descriptor.Descriptor( name="BatchTranslateMetadata", - full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata", + full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.state", + full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.state", index=0, number=1, type=14, @@ -1385,7 +1385,7 @@ ), _descriptor.FieldDescriptor( name="translated_characters", - full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.translated_characters", + full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.translated_characters", index=1, number=2, type=3, @@ -1403,7 +1403,7 @@ ), _descriptor.FieldDescriptor( name="failed_characters", - full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.failed_characters", + full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.failed_characters", index=2, number=3, type=3, @@ -1421,7 +1421,7 @@ ), _descriptor.FieldDescriptor( name="total_characters", - full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.total_characters", + full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.total_characters", index=3, number=4, type=3, @@ -1439,7 +1439,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.submit_time", + full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.submit_time", index=4, number=5, type=11, @@ -1464,21 +1464,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2320, - serialized_end=2659, + serialized_start=2290, + serialized_end=2627, ) _BATCHTRANSLATERESPONSE = _descriptor.Descriptor( name="BatchTranslateResponse", - full_name="google.cloud.translation.v3beta1.BatchTranslateResponse", + full_name="google.cloud.translate.v3beta1.BatchTranslateResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="total_characters", - full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.total_characters", + full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.total_characters", index=0, number=1, type=3, @@ -1496,7 +1496,7 @@ ), _descriptor.FieldDescriptor( name="translated_characters", - full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.translated_characters", + full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.translated_characters", index=1, number=2, type=3, @@ -1514,7 +1514,7 @@ ), _descriptor.FieldDescriptor( name="failed_characters", - full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.failed_characters", + full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.failed_characters", index=2, number=3, type=3, @@ -1532,7 +1532,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.submit_time", + full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.submit_time", index=3, number=4, type=11, @@ -1550,7 +1550,7 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.end_time", + full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.end_time", index=4, number=5, type=11, @@ -1575,21 +1575,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2662, - serialized_end=2865, + serialized_start=2630, + serialized_end=2833, ) _GLOSSARYINPUTCONFIG = _descriptor.Descriptor( name="GlossaryInputConfig", - full_name="google.cloud.translation.v3beta1.GlossaryInputConfig", + full_name="google.cloud.translate.v3beta1.GlossaryInputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="gcs_source", - full_name="google.cloud.translation.v3beta1.GlossaryInputConfig.gcs_source", + full_name="google.cloud.translate.v3beta1.GlossaryInputConfig.gcs_source", index=0, number=1, type=11, @@ -1616,27 +1616,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translation.v3beta1.GlossaryInputConfig.source", + full_name="google.cloud.translate.v3beta1.GlossaryInputConfig.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=2867, - serialized_end=2965, + serialized_start=2835, + serialized_end=2931, ) _GLOSSARY_LANGUAGECODEPAIR = _descriptor.Descriptor( name="LanguageCodePair", - full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair", + full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodePair", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair.source_language_code", + full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodePair.source_language_code", index=0, number=1, type=9, @@ -1654,7 +1654,7 @@ ), _descriptor.FieldDescriptor( name="target_language_code", - full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair.target_language_code", + full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodePair.target_language_code", index=1, number=2, type=9, @@ -1679,20 +1679,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3364, - serialized_end=3442, + serialized_start=3324, + serialized_end=3402, ) _GLOSSARY_LANGUAGECODESSET = _descriptor.Descriptor( name="LanguageCodesSet", - full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodesSet", + full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodesSet", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_codes", - full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodesSet.language_codes", + full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.language_codes", index=0, number=1, type=9, @@ -1717,20 +1717,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3444, - serialized_end=3486, + serialized_start=3404, + serialized_end=3446, ) _GLOSSARY = _descriptor.Descriptor( name="Glossary", - full_name="google.cloud.translation.v3beta1.Glossary", + full_name="google.cloud.translate.v3beta1.Glossary", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3beta1.Glossary.name", + full_name="google.cloud.translate.v3beta1.Glossary.name", index=0, number=1, type=9, @@ -1748,7 +1748,7 @@ ), _descriptor.FieldDescriptor( name="language_pair", - full_name="google.cloud.translation.v3beta1.Glossary.language_pair", + full_name="google.cloud.translate.v3beta1.Glossary.language_pair", index=1, number=3, type=11, @@ -1766,7 +1766,7 @@ ), _descriptor.FieldDescriptor( name="language_codes_set", - full_name="google.cloud.translation.v3beta1.Glossary.language_codes_set", + full_name="google.cloud.translate.v3beta1.Glossary.language_codes_set", index=2, number=4, type=11, @@ -1784,7 +1784,7 @@ ), _descriptor.FieldDescriptor( name="input_config", - full_name="google.cloud.translation.v3beta1.Glossary.input_config", + full_name="google.cloud.translate.v3beta1.Glossary.input_config", index=3, number=5, type=11, @@ -1802,7 +1802,7 @@ ), _descriptor.FieldDescriptor( name="entry_count", - full_name="google.cloud.translation.v3beta1.Glossary.entry_count", + full_name="google.cloud.translate.v3beta1.Glossary.entry_count", index=4, number=6, type=5, @@ -1820,7 +1820,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3beta1.Glossary.submit_time", + full_name="google.cloud.translate.v3beta1.Glossary.submit_time", index=5, number=7, type=11, @@ -1838,7 +1838,7 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translation.v3beta1.Glossary.end_time", + full_name="google.cloud.translate.v3beta1.Glossary.end_time", index=6, number=8, type=11, @@ -1865,27 +1865,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="languages", - full_name="google.cloud.translation.v3beta1.Glossary.languages", + full_name="google.cloud.translate.v3beta1.Glossary.languages", index=0, containing_type=None, fields=[], ) ], - serialized_start=2968, - serialized_end=3499, + serialized_start=2934, + serialized_end=3459, ) _CREATEGLOSSARYREQUEST = _descriptor.Descriptor( name="CreateGlossaryRequest", - full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest", + full_name="google.cloud.translate.v3beta1.CreateGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest.parent", + full_name="google.cloud.translate.v3beta1.CreateGlossaryRequest.parent", index=0, number=1, type=9, @@ -1903,7 +1903,7 @@ ), _descriptor.FieldDescriptor( name="glossary", - full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest.glossary", + full_name="google.cloud.translate.v3beta1.CreateGlossaryRequest.glossary", index=1, number=2, type=11, @@ -1928,21 +1928,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3501, - serialized_end=3602, + serialized_start=3461, + serialized_end=3560, ) _GETGLOSSARYREQUEST = _descriptor.Descriptor( name="GetGlossaryRequest", - full_name="google.cloud.translation.v3beta1.GetGlossaryRequest", + full_name="google.cloud.translate.v3beta1.GetGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3beta1.GetGlossaryRequest.name", + full_name="google.cloud.translate.v3beta1.GetGlossaryRequest.name", index=0, number=1, type=9, @@ -1967,21 +1967,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3604, - serialized_end=3638, + serialized_start=3562, + serialized_end=3596, ) _DELETEGLOSSARYREQUEST = _descriptor.Descriptor( name="DeleteGlossaryRequest", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryRequest", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryRequest.name", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryRequest.name", index=0, number=1, type=9, @@ -2006,21 +2006,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3640, - serialized_end=3677, + serialized_start=3598, + serialized_end=3635, ) _LISTGLOSSARIESREQUEST = _descriptor.Descriptor( name="ListGlossariesRequest", - full_name="google.cloud.translation.v3beta1.ListGlossariesRequest", + full_name="google.cloud.translate.v3beta1.ListGlossariesRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.parent", + full_name="google.cloud.translate.v3beta1.ListGlossariesRequest.parent", index=0, number=1, type=9, @@ -2038,7 +2038,7 @@ ), _descriptor.FieldDescriptor( name="page_size", - full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.page_size", + full_name="google.cloud.translate.v3beta1.ListGlossariesRequest.page_size", index=1, number=2, type=5, @@ -2056,7 +2056,7 @@ ), _descriptor.FieldDescriptor( name="page_token", - full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.page_token", + full_name="google.cloud.translate.v3beta1.ListGlossariesRequest.page_token", index=2, number=3, type=9, @@ -2074,7 +2074,7 @@ ), _descriptor.FieldDescriptor( name="filter", - full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.filter", + full_name="google.cloud.translate.v3beta1.ListGlossariesRequest.filter", index=3, number=4, type=9, @@ -2099,21 +2099,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3679, - serialized_end=3773, + serialized_start=3637, + serialized_end=3731, ) _LISTGLOSSARIESRESPONSE = _descriptor.Descriptor( name="ListGlossariesResponse", - full_name="google.cloud.translation.v3beta1.ListGlossariesResponse", + full_name="google.cloud.translate.v3beta1.ListGlossariesResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="glossaries", - full_name="google.cloud.translation.v3beta1.ListGlossariesResponse.glossaries", + full_name="google.cloud.translate.v3beta1.ListGlossariesResponse.glossaries", index=0, number=1, type=11, @@ -2131,7 +2131,7 @@ ), _descriptor.FieldDescriptor( name="next_page_token", - full_name="google.cloud.translation.v3beta1.ListGlossariesResponse.next_page_token", + full_name="google.cloud.translate.v3beta1.ListGlossariesResponse.next_page_token", index=1, number=2, type=9, @@ -2156,21 +2156,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3775, - serialized_end=3888, + serialized_start=3733, + serialized_end=3844, ) _CREATEGLOSSARYMETADATA = _descriptor.Descriptor( name="CreateGlossaryMetadata", - full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata", + full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.name", + full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata.name", index=0, number=1, type=9, @@ -2188,7 +2188,7 @@ ), _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.state", + full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata.state", index=1, number=2, type=14, @@ -2206,7 +2206,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.submit_time", + full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata.submit_time", index=2, number=3, type=11, @@ -2231,21 +2231,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3891, - serialized_end=4160, + serialized_start=3847, + serialized_end=4114, ) _DELETEGLOSSARYMETADATA = _descriptor.Descriptor( name="DeleteGlossaryMetadata", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.name", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata.name", index=0, number=1, type=9, @@ -2263,7 +2263,7 @@ ), _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.state", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata.state", index=1, number=2, type=14, @@ -2281,7 +2281,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.submit_time", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata.submit_time", index=2, number=3, type=11, @@ -2306,21 +2306,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4163, - serialized_end=4432, + serialized_start=4117, + serialized_end=4384, ) _DELETEGLOSSARYRESPONSE = _descriptor.Descriptor( name="DeleteGlossaryResponse", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.name", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryResponse.name", index=0, number=1, type=9, @@ -2338,7 +2338,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.submit_time", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryResponse.submit_time", index=1, number=2, type=11, @@ -2356,7 +2356,7 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.end_time", + full_name="google.cloud.translate.v3beta1.DeleteGlossaryResponse.end_time", index=2, number=3, type=11, @@ -2381,8 +2381,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4435, - serialized_end=4568, + serialized_start=4387, + serialized_end=4520, ) _TRANSLATETEXTREQUEST.fields_by_name[ @@ -2535,7 +2535,7 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATETEXTGLOSSARYCONFIG, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __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. @@ -2548,7 +2548,7 @@ Optional. Indicates whether we should do a case-insensitive match. Default value is false if missing. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextGlossaryConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.TranslateTextGlossaryConfig) ), ) _sym_db.RegisterMessage(TranslateTextGlossaryConfig) @@ -2558,7 +2558,7 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATETEXTREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The request message for synchronous translation. @@ -2603,7 +2603,7 @@ the same region as the model, otherwise an INVALID\_ARGUMENT error is returned. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.TranslateTextRequest) ), ) _sym_db.RegisterMessage(TranslateTextRequest) @@ -2613,7 +2613,7 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATETEXTRESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The main language translation response message. @@ -2628,7 +2628,7 @@ terms apply. This field has the same length as ``contents`` in TranslateTextRequest. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.TranslateTextResponse) ), ) _sym_db.RegisterMessage(TranslateTextResponse) @@ -2638,7 +2638,7 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATION, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""A single translation response. @@ -2657,7 +2657,7 @@ glossary_config: The ``glossary_config`` used for this translation. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Translation) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.Translation) ), ) _sym_db.RegisterMessage(Translation) @@ -2667,7 +2667,7 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTLANGUAGEREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The request message for language detection. @@ -2691,7 +2691,7 @@ "text/html", "text/plain". If left blank, the MIME type is assumed to be "text/html". """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DetectLanguageRequest) ), ) _sym_db.RegisterMessage(DetectLanguageRequest) @@ -2701,7 +2701,7 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTEDLANGUAGE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The response message for language detection. @@ -2712,7 +2712,7 @@ confidence: The confidence of the detection result for this language. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectedLanguage) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DetectedLanguage) ), ) _sym_db.RegisterMessage(DetectedLanguage) @@ -2722,7 +2722,7 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTLANGUAGERESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The response message for language detection. @@ -2731,7 +2731,7 @@ A list of detected languages sorted by detection confidence in descending order. The most probable language first. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DetectLanguageResponse) ), ) _sym_db.RegisterMessage(DetectLanguageResponse) @@ -2741,7 +2741,7 @@ (_message.Message,), dict( DESCRIPTOR=_GETSUPPORTEDLANGUAGESREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The request message for discovering supported languages. @@ -2767,7 +2767,7 @@ languages supported by the specified model. If missing, we get supported languages of Google general NMT model. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetSupportedLanguagesRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GetSupportedLanguagesRequest) ), ) _sym_db.RegisterMessage(GetSupportedLanguagesRequest) @@ -2777,7 +2777,7 @@ (_message.Message,), dict( DESCRIPTOR=_SUPPORTEDLANGUAGES, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The response message for discovering supported languages. @@ -2786,7 +2786,7 @@ A list of supported language responses. This list contains an entry for each language the Translation API supports. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguages) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.SupportedLanguages) ), ) _sym_db.RegisterMessage(SupportedLanguages) @@ -2796,7 +2796,7 @@ (_message.Message,), dict( DESCRIPTOR=_SUPPORTEDLANGUAGE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""A single supported language response corresponds to information related to one supported language. @@ -2815,7 +2815,7 @@ support_target: Can be used as target language. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguage) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.SupportedLanguage) ), ) _sym_db.RegisterMessage(SupportedLanguage) @@ -2825,7 +2825,7 @@ (_message.Message,), dict( DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The GCS location for the input content. @@ -2834,7 +2834,7 @@ Required. Source data URI. For example, ``gs://my_bucket/my_object``. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsSource) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GcsSource) ), ) _sym_db.RegisterMessage(GcsSource) @@ -2844,7 +2844,7 @@ (_message.Message,), dict( DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Input configuration. @@ -2870,7 +2870,7 @@ 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) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.InputConfig) ), ) _sym_db.RegisterMessage(InputConfig) @@ -2880,7 +2880,7 @@ (_message.Message,), dict( DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The GCS location for the output content @@ -2890,7 +2890,7 @@ 'output\_uri\_prefix' must end with "/". Otherwise error 400 is returned. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsDestination) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GcsDestination) ), ) _sym_db.RegisterMessage(GcsDestination) @@ -2900,7 +2900,7 @@ (_message.Message,), dict( DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Output configuration. @@ -2964,7 +2964,7 @@ error details. glossary\_error\_file has format of gs://transl ation\_test/a\_b\_c\_'trg'\_glossary\_errors.[extension] """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.OutputConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.OutputConfig) ), ) _sym_db.RegisterMessage(OutputConfig) @@ -2978,8 +2978,8 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_MODELSENTRY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry) + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2" + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry) ), ), GlossariesEntry=_reflection.GeneratedProtocolMessageType( @@ -2987,12 +2987,12 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry) + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2" + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry) ), ), DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""The batch translation request. @@ -3030,7 +3030,7 @@ Optional. Glossaries to be applied for translation. It's keyed by target language code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateTextRequest) ), ) _sym_db.RegisterMessage(BatchTranslateTextRequest) @@ -3042,7 +3042,7 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATEMETADATA, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""State metadata for the batch translation operation. @@ -3063,7 +3063,7 @@ submit_time: Time when the operation was submitted. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateMetadata) ), ) _sym_db.RegisterMessage(BatchTranslateMetadata) @@ -3073,7 +3073,7 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATERESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_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 @@ -3096,7 +3096,7 @@ g.Operation.done][google.longrunning.Operation.done] is set to true. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateResponse) ), ) _sym_db.RegisterMessage(BatchTranslateResponse) @@ -3106,7 +3106,7 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARYINPUTCONFIG, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Input configuration for glossaries. @@ -3131,7 +3131,7 @@ here: ``https://support.google.com/translatortoolkit/answer /6306379?hl=en``. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GlossaryInputConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GlossaryInputConfig) ), ) _sym_db.RegisterMessage(GlossaryInputConfig) @@ -3145,7 +3145,7 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARY_LANGUAGECODEPAIR, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Used with UNIDIRECTIONAL. @@ -3159,7 +3159,7 @@ example, "zh-CN". Expected to be an exact match for GlossaryTerm.language\_code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodePair) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.Glossary.LanguageCodePair) ), ), LanguageCodesSet=_reflection.GeneratedProtocolMessageType( @@ -3167,7 +3167,7 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARY_LANGUAGECODESSET, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Used with EQUIVALENT\_TERMS\_SET. @@ -3178,11 +3178,11 @@ entries. Expected to be an exact match for GlossaryTerm.language\_code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodesSet) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) ), ), DESCRIPTOR=_GLOSSARY, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Represents a glossary built from user provided data. @@ -3207,7 +3207,7 @@ end_time: Output only. When the glossary creation was finished. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.Glossary) ), ) _sym_db.RegisterMessage(Glossary) @@ -3219,7 +3219,7 @@ (_message.Message,), dict( DESCRIPTOR=_CREATEGLOSSARYREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Request message for CreateGlossary. @@ -3229,7 +3229,7 @@ glossary: Required. The glossary to create. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.CreateGlossaryRequest) ), ) _sym_db.RegisterMessage(CreateGlossaryRequest) @@ -3239,7 +3239,7 @@ (_message.Message,), dict( DESCRIPTOR=_GETGLOSSARYREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Request message for GetGlossary. @@ -3247,7 +3247,7 @@ name: Required. The name of the glossary to retrieve. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GetGlossaryRequest) ), ) _sym_db.RegisterMessage(GetGlossaryRequest) @@ -3257,7 +3257,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Request message for DeleteGlossary. @@ -3265,7 +3265,7 @@ name: Required. The name of the glossary to delete. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DeleteGlossaryRequest) ), ) _sym_db.RegisterMessage(DeleteGlossaryRequest) @@ -3275,7 +3275,7 @@ (_message.Message,), dict( DESCRIPTOR=_LISTGLOSSARIESREQUEST, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Request message for ListGlossaries. @@ -3298,7 +3298,7 @@ For example, ``tags.glossary_name="products*"``. If missing, no filtering is performed. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.ListGlossariesRequest) ), ) _sym_db.RegisterMessage(ListGlossariesRequest) @@ -3308,7 +3308,7 @@ (_message.Message,), dict( DESCRIPTOR=_LISTGLOSSARIESRESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Response message for ListGlossaries. @@ -3321,7 +3321,7 @@ call to ``ListGlossaries`` method to retrieve the next page of results. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.ListGlossariesResponse) ), ) _sym_db.RegisterMessage(ListGlossariesResponse) @@ -3331,7 +3331,7 @@ (_message.Message,), dict( DESCRIPTOR=_CREATEGLOSSARYMETADATA, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by CreateGlossary. @@ -3345,7 +3345,7 @@ submit_time: The time when the operation was submitted to the server. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.CreateGlossaryMetadata) ), ) _sym_db.RegisterMessage(CreateGlossaryMetadata) @@ -3355,7 +3355,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYMETADATA, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Stored in the [google.longrunning.Operation.metadata][google.longrunning.Operation.metadata] field returned by DeleteGlossary. @@ -3369,7 +3369,7 @@ submit_time: The time when the operation was submitted to the server. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DeleteGlossaryMetadata) ), ) _sym_db.RegisterMessage(DeleteGlossaryMetadata) @@ -3379,7 +3379,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYRESPONSE, - __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", __doc__="""Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by DeleteGlossary. @@ -3395,7 +3395,7 @@ ngrunning.Operation.done][google.longrunning.Operation.done] is set to true. """, - # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DeleteGlossaryResponse) ), ) _sym_db.RegisterMessage(DeleteGlossaryResponse) @@ -3407,16 +3407,16 @@ _TRANSLATIONSERVICE = _descriptor.ServiceDescriptor( name="TranslationService", - full_name="google.cloud.translation.v3beta1.TranslationService", + full_name="google.cloud.translate.v3beta1.TranslationService", file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=4571, - serialized_end=6107, + serialized_start=4523, + serialized_end=6033, methods=[ _descriptor.MethodDescriptor( name="TranslateText", - full_name="google.cloud.translation.v3beta1.TranslationService.TranslateText", + full_name="google.cloud.translate.v3beta1.TranslationService.TranslateText", index=0, containing_service=None, input_type=_TRANSLATETEXTREQUEST, @@ -3427,7 +3427,7 @@ ), _descriptor.MethodDescriptor( name="DetectLanguage", - full_name="google.cloud.translation.v3beta1.TranslationService.DetectLanguage", + full_name="google.cloud.translate.v3beta1.TranslationService.DetectLanguage", index=1, containing_service=None, input_type=_DETECTLANGUAGEREQUEST, @@ -3438,7 +3438,7 @@ ), _descriptor.MethodDescriptor( name="GetSupportedLanguages", - full_name="google.cloud.translation.v3beta1.TranslationService.GetSupportedLanguages", + full_name="google.cloud.translate.v3beta1.TranslationService.GetSupportedLanguages", index=2, containing_service=None, input_type=_GETSUPPORTEDLANGUAGESREQUEST, @@ -3449,7 +3449,7 @@ ), _descriptor.MethodDescriptor( name="BatchTranslateText", - full_name="google.cloud.translation.v3beta1.TranslationService.BatchTranslateText", + full_name="google.cloud.translate.v3beta1.TranslationService.BatchTranslateText", index=3, containing_service=None, input_type=_BATCHTRANSLATETEXTREQUEST, @@ -3460,7 +3460,7 @@ ), _descriptor.MethodDescriptor( name="CreateGlossary", - full_name="google.cloud.translation.v3beta1.TranslationService.CreateGlossary", + full_name="google.cloud.translate.v3beta1.TranslationService.CreateGlossary", index=4, containing_service=None, input_type=_CREATEGLOSSARYREQUEST, @@ -3471,7 +3471,7 @@ ), _descriptor.MethodDescriptor( name="ListGlossaries", - full_name="google.cloud.translation.v3beta1.TranslationService.ListGlossaries", + full_name="google.cloud.translate.v3beta1.TranslationService.ListGlossaries", index=5, containing_service=None, input_type=_LISTGLOSSARIESREQUEST, @@ -3482,7 +3482,7 @@ ), _descriptor.MethodDescriptor( name="GetGlossary", - full_name="google.cloud.translation.v3beta1.TranslationService.GetGlossary", + full_name="google.cloud.translate.v3beta1.TranslationService.GetGlossary", index=6, containing_service=None, input_type=_GETGLOSSARYREQUEST, @@ -3493,7 +3493,7 @@ ), _descriptor.MethodDescriptor( name="DeleteGlossary", - full_name="google.cloud.translation.v3beta1.TranslationService.DeleteGlossary", + full_name="google.cloud.translate.v3beta1.TranslationService.DeleteGlossary", index=7, containing_service=None, input_type=_DELETEGLOSSARYREQUEST, diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py index a0754bba9c50..e653c84a1cc0 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py @@ -1,8 +1,8 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc -from google.cloud.translation_v3beta1.proto import ( - translation_service_pb2 as google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2, +from google.cloud.translate_v3beta1.proto import ( + 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, @@ -22,43 +22,43 @@ def __init__(self, channel): 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, + "/google.cloud.translate.v3beta1.TranslationService/TranslateText", + 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, + "/google.cloud.translate.v3beta1.TranslationService/DetectLanguage", + 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, + "/google.cloud.translate.v3beta1.TranslationService/GetSupportedLanguages", + 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, + "/google.cloud.translate.v3beta1.TranslationService/BatchTranslateText", + 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, + "/google.cloud.translate.v3beta1.TranslationService/CreateGlossary", + 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, + "/google.cloud.translate.v3beta1.TranslationService/ListGlossaries", + 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, + "/google.cloud.translate.v3beta1.TranslationService/GetGlossary", + 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, + "/google.cloud.translate.v3beta1.TranslationService/DeleteGlossary", + 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, ) @@ -141,46 +141,46 @@ 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, ), } generic_handler = grpc.method_handlers_generic_handler( - "google.cloud.translation.v3beta1.TranslationService", rpc_method_handlers + "google.cloud.translate.v3beta1.TranslationService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) diff --git a/translate/setup.py b/translate/setup.py index 602497d2d6e4..656ad9dc334e 100644 --- a/translate/setup.py +++ b/translate/setup.py @@ -29,7 +29,7 @@ # 'Development Status :: 5 - Production/Stable' release_status = 'Development Status :: 5 - Production/Stable' dependencies = [ - 'google-api-core >= 1.6.0, < 2.0.0dev', + 'google-api-core[grpc] >= 1.6.0, < 2.0.0dev', 'google-cloud-core >= 0.29.0, < 0.30dev', ] extras = { diff --git a/translate/synth.metadata b/translate/synth.metadata index 6671178626e4..b978fbb49256 100644 --- a/translate/synth.metadata +++ b/translate/synth.metadata @@ -1,19 +1,11 @@ { - "updateTime": "2019-03-18T14:00:29.165148Z", + "updateTime": "2019-03-21T18:13:35.841065Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.17", - "dockerImage": "googleapis/artman@sha256:7231f27272231a884e09edb5953148c85ecd8467780d33c4a35c3e507885715b" - } - }, - { - "git": { - "name": "googleapis-private", - "remote": "git@github.com:googleapis/googleapis-private.git", - "sha": "86ac90ebcecc95d6310ec7932a8a0f89738c4436", - "internalRef": "238755698" + "version": "0.16.18", + "dockerImage": "googleapis/artman@sha256:e8ac9200640e76d54643f370db71a1556bf254f565ce46b45a467bbcbacbdb37" } }, { From 83678e150a8e609d727b86671402cec1b5f231fb Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Thu, 21 Mar 2019 15:03:15 -0700 Subject: [PATCH 8/8] Add replace in synth to fix import --- .../gapic/translation_service_client.py | 4 +- .../translation_service_client_config.py | 2 +- .../translation_service_grpc_transport.py | 2 +- .../proto/translation_service.proto | 2 +- .../proto/translation_service_pb2.py | 540 +++++++++--------- .../proto/translation_service_pb2_grpc.py | 72 +-- translate/synth.metadata | 10 +- translate/synth.py | 7 + 8 files changed, 327 insertions(+), 312 deletions(-) diff --git a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py index d6d7e093807c..133a4743d66f 100644 --- a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py +++ b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client.py @@ -13,7 +13,7 @@ # 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. -"""Accesses the google.cloud.translate.v3beta1 TranslationService API.""" +"""Accesses the google.cloud.translation.v3beta1 TranslationService API.""" import functools import pkg_resources @@ -52,7 +52,7 @@ class TranslationServiceClient(object): # The name of the interface for this client. This is the key used to # find the method configuration in the client_config dictionary. - _INTERFACE_NAME = "google.cloud.translate.v3beta1.TranslationService" + _INTERFACE_NAME = "google.cloud.translation.v3beta1.TranslationService" @classmethod def from_service_account_file(cls, filename, *args, **kwargs): diff --git a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py index a96ffc79a702..21b7872180e8 100644 --- a/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py +++ b/translate/google/cloud/translate_v3beta1/gapic/translation_service_client_config.py @@ -1,6 +1,6 @@ config = { "interfaces": { - "google.cloud.translate.v3beta1.TranslationService": { + "google.cloud.translation.v3beta1.TranslationService": { "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [], diff --git a/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py b/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py index 83a547ae7e25..8b00b7ed7398 100644 --- a/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py +++ b/translate/google/cloud/translate_v3beta1/gapic/transports/translation_service_grpc_transport.py @@ -22,7 +22,7 @@ class TranslationServiceGrpcTransport(object): """gRPC transport class providing stubs for - google.cloud.translate.v3beta1 TranslationService API. + google.cloud.translation.v3beta1 TranslationService API. The transport provides access to the raw gRPC stubs, which can be used to take advantage of advanced diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service.proto b/translate/google/cloud/translate_v3beta1/proto/translation_service.proto index 6a4b894ccdaa..e9e65baa35b5 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service.proto +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service.proto @@ -15,7 +15,7 @@ syntax = "proto3"; -package google.cloud.translate.v3beta1; +package google.cloud.translation.v3beta1; import "google/api/annotations.proto"; import "google/longrunning/operations.proto"; diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py index f1b782f98cce..d25701491f05 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2.py @@ -1,5 +1,5 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/translate_v3beta1/proto/translation_service.proto +# source: google/cloud/translation_v3beta1/proto/translation_service.proto import sys @@ -22,14 +22,14 @@ DESCRIPTOR = _descriptor.FileDescriptor( - name="google/cloud/translate_v3beta1/proto/translation_service.proto", - package="google.cloud.translate.v3beta1", + name="google/cloud/translation_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/translate_v3beta1/proto/translation_service.proto\x12\x1egoogle.cloud.translate.v3beta1\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"D\n\x1bTranslateTextGlossaryConfig\x12\x10\n\x08glossary\x18\x01 \x01(\t\x12\x13\n\x0bignore_case\x18\x02 \x01(\x08"\xec\x01\n\x14TranslateTextRequest\x12\x10\n\x08\x63ontents\x18\x01 \x03(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x1c\n\x14source_language_code\x18\x04 \x01(\t\x12\x1c\n\x14target_language_code\x18\x05 \x01(\t\x12\x0e\n\x06parent\x18\x08 \x01(\t\x12\r\n\x05model\x18\x06 \x01(\t\x12T\n\x0fglossary_config\x18\x07 \x01(\x0b\x32;.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig"\xa6\x01\n\x15TranslateTextResponse\x12\x41\n\x0ctranslations\x18\x01 \x03(\x0b\x32+.google.cloud.translate.v3beta1.Translation\x12J\n\x15glossary_translations\x18\x03 \x03(\x0b\x32+.google.cloud.translate.v3beta1.Translation"\xab\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\x12T\n\x0fglossary_config\x18\x03 \x01(\x0b\x32;.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig"f\n\x15\x44\x65tectLanguageRequest\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\r\n\x05model\x18\x04 \x01(\t\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\tB\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\x43\n\tlanguages\x18\x01 \x03(\x0b\x32\x30.google.cloud.translate.v3beta1.DetectedLanguage"\\\n\x1cGetSupportedLanguagesRequest\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1d\n\x15\x64isplay_language_code\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t"Z\n\x12SupportedLanguages\x12\x44\n\tlanguages\x18\x01 \x03(\x0b\x32\x31.google.cloud.translate.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"\x1e\n\tGcsSource\x12\x11\n\tinput_uri\x18\x01 \x01(\t"k\n\x0bInputConfig\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12?\n\ngcs_source\x18\x02 \x01(\x0b\x32).google.cloud.translate.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"h\n\x0cOutputConfig\x12I\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32..google.cloud.translate.v3beta1.GcsDestinationH\x00\x42\r\n\x0b\x64\x65stination"\xc6\x04\n\x19\x42\x61tchTranslateTextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1d\n\x15target_language_codes\x18\x03 \x03(\t\x12U\n\x06models\x18\x04 \x03(\x0b\x32\x45.google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry\x12\x42\n\rinput_configs\x18\x05 \x03(\x0b\x32+.google.cloud.translate.v3beta1.InputConfig\x12\x43\n\routput_config\x18\x06 \x01(\x0b\x32,.google.cloud.translate.v3beta1.OutputConfig\x12]\n\nglossaries\x18\x07 \x03(\x0b\x32I.google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry\x1a-\n\x0bModelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1an\n\x0fGlossariesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12J\n\x05value\x18\x02 \x01(\x0b\x32;.google.cloud.translate.v3beta1.TranslateTextGlossaryConfig:\x02\x38\x01"\xd1\x02\n\x16\x42\x61tchTranslateMetadata\x12K\n\x05state\x18\x01 \x01(\x0e\x32<.google.cloud.translate.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"`\n\x13GlossaryInputConfig\x12?\n\ngcs_source\x18\x01 \x01(\x0b\x32).google.cloud.translate.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"\x8d\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\x12R\n\rlanguage_pair\x18\x03 \x01(\x0b\x32\x39.google.cloud.translate.v3beta1.Glossary.LanguageCodePairH\x00\x12W\n\x12language_codes_set\x18\x04 \x01(\x0b\x32\x39.google.cloud.translate.v3beta1.Glossary.LanguageCodesSetH\x00\x12I\n\x0cinput_config\x18\x05 \x01(\x0b\x32\x33.google.cloud.translate.v3beta1.GlossaryInputConfig\x12\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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(\tB\x0b\n\tlanguages"c\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12:\n\x08glossary\x18\x02 \x01(\x0b\x32(.google.cloud.translate.v3beta1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"o\n\x16ListGlossariesResponse\x12<\n\nglossaries\x18\x01 \x03(\x0b\x32(.google.cloud.translate.v3beta1.Glossary\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"\x8b\x02\n\x16\x43reateGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x05state\x18\x02 \x01(\x0e\x32<.google.cloud.translate.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"\x8b\x02\n\x16\x44\x65leteGlossaryMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12K\n\x05state\x18\x02 \x01(\x0e\x32<.google.cloud.translate.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\xe6\x0b\n\x12TranslationService\x12\xbf\x01\n\rTranslateText\x12\x34.google.cloud.translate.v3beta1.TranslateTextRequest\x1a\x35.google.cloud.translate.v3beta1.TranslateTextResponse"A\x82\xd3\xe4\x93\x02;"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*\x12\xc3\x01\n\x0e\x44\x65tectLanguage\x12\x35.google.cloud.translate.v3beta1.DetectLanguageRequest\x1a\x36.google.cloud.translate.v3beta1.DetectLanguageResponse"B\x82\xd3\xe4\x93\x02<"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*\x12\xce\x01\n\x15GetSupportedLanguages\x12<.google.cloud.translate.v3beta1.GetSupportedLanguagesRequest\x1a\x32.google.cloud.translate.v3beta1.SupportedLanguages"C\x82\xd3\xe4\x93\x02=\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguages\x12\xb6\x01\n\x12\x42\x61tchTranslateText\x12\x39.google.cloud.translate.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"F\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xad\x01\n\x0e\x43reateGlossary\x12\x35.google.cloud.translate.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xbc\x01\n\x0eListGlossaries\x12\x35.google.cloud.translate.v3beta1.ListGlossariesRequest\x1a\x36.google.cloud.translate.v3beta1.ListGlossariesResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\x12\xa8\x01\n\x0bGetGlossary\x12\x32.google.cloud.translate.v3beta1.GetGlossaryRequest\x1a(.google.cloud.translate.v3beta1.Glossary";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\x12\xa3\x01\n\x0e\x44\x65leteGlossary\x12\x35.google.cloud.translate.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation";\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}B\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' + '\n@google/cloud/translation_v3beta1/proto/translation_service.proto\x12 google.cloud.translation.v3beta1\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1fgoogle/protobuf/timestamp.proto"D\n\x1bTranslateTextGlossaryConfig\x12\x10\n\x08glossary\x18\x01 \x01(\t\x12\x13\n\x0bignore_case\x18\x02 \x01(\x08"\xee\x01\n\x14TranslateTextRequest\x12\x10\n\x08\x63ontents\x18\x01 \x03(\t\x12\x11\n\tmime_type\x18\x03 \x01(\t\x12\x1c\n\x14source_language_code\x18\x04 \x01(\t\x12\x1c\n\x14target_language_code\x18\x05 \x01(\t\x12\x0e\n\x06parent\x18\x08 \x01(\t\x12\r\n\x05model\x18\x06 \x01(\t\x12V\n\x0fglossary_config\x18\x07 \x01(\x0b\x32=.google.cloud.translation.v3beta1.TranslateTextGlossaryConfig"\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"f\n\x15\x44\x65tectLanguageRequest\x12\x0e\n\x06parent\x18\x05 \x01(\t\x12\r\n\x05model\x18\x04 \x01(\t\x12\x11\n\x07\x63ontent\x18\x01 \x01(\tH\x00\x12\x11\n\tmime_type\x18\x03 \x01(\tB\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"\\\n\x1cGetSupportedLanguagesRequest\x12\x0e\n\x06parent\x18\x03 \x01(\t\x12\x1d\n\x15\x64isplay_language_code\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t"\\\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"\x1e\n\tGcsSource\x12\x11\n\tinput_uri\x18\x01 \x01(\t"m\n\x0bInputConfig\x12\x11\n\tmime_type\x18\x01 \x01(\t\x12\x41\n\ngcs_source\x18\x02 \x01(\x0b\x32+.google.cloud.translation.v3beta1.GcsSourceH\x00\x42\x08\n\x06source"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t"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"\xd0\x04\n\x19\x42\x61tchTranslateTextRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1d\n\x15target_language_codes\x18\x03 \x03(\t\x12W\n\x06models\x18\x04 \x03(\x0b\x32G.google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry\x12\x44\n\rinput_configs\x18\x05 \x03(\x0b\x32-.google.cloud.translation.v3beta1.InputConfig\x12\x45\n\routput_config\x18\x06 \x01(\x0b\x32..google.cloud.translation.v3beta1.OutputConfig\x12_\n\nglossaries\x18\x07 \x03(\x0b\x32K.google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry\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"\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"\x93\x04\n\x08Glossary\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x13\n\x0b\x65ntry_count\x18\x06 \x01(\x05\x12/\n\x0bsubmit_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\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(\tB\x0b\n\tlanguages"e\n\x15\x43reateGlossaryRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12<\n\x08glossary\x18\x02 \x01(\x0b\x32*.google.cloud.translation.v3beta1.Glossary""\n\x12GetGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"%\n\x15\x44\x65leteGlossaryRequest\x12\x0c\n\x04name\x18\x01 \x01(\t"^\n\x15ListGlossariesRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t"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\x80\x0c\n\x12TranslationService\x12\xc3\x01\n\rTranslateText\x12\x36.google.cloud.translation.v3beta1.TranslateTextRequest\x1a\x37.google.cloud.translation.v3beta1.TranslateTextResponse"A\x82\xd3\xe4\x93\x02;"6/v3beta1/{parent=projects/*/locations/*}:translateText:\x01*\x12\xc7\x01\n\x0e\x44\x65tectLanguage\x12\x37.google.cloud.translation.v3beta1.DetectLanguageRequest\x1a\x38.google.cloud.translation.v3beta1.DetectLanguageResponse"B\x82\xd3\xe4\x93\x02<"7/v3beta1/{parent=projects/*/locations/*}:detectLanguage:\x01*\x12\xd2\x01\n\x15GetSupportedLanguages\x12>.google.cloud.translation.v3beta1.GetSupportedLanguagesRequest\x1a\x34.google.cloud.translation.v3beta1.SupportedLanguages"C\x82\xd3\xe4\x93\x02=\x12;/v3beta1/{parent=projects/*/locations/*}/supportedLanguages\x12\xb8\x01\n\x12\x42\x61tchTranslateText\x12;.google.cloud.translation.v3beta1.BatchTranslateTextRequest\x1a\x1d.google.longrunning.Operation"F\x82\xd3\xe4\x93\x02@";/v3beta1/{parent=projects/*/locations/*}:batchTranslateText:\x01*\x12\xaf\x01\n\x0e\x43reateGlossary\x12\x37.google.cloud.translation.v3beta1.CreateGlossaryRequest\x1a\x1d.google.longrunning.Operation"E\x82\xd3\xe4\x93\x02?"3/v3beta1/{parent=projects/*/locations/*}/glossaries:\x08glossary\x12\xc0\x01\n\x0eListGlossaries\x12\x37.google.cloud.translation.v3beta1.ListGlossariesRequest\x1a\x38.google.cloud.translation.v3beta1.ListGlossariesResponse";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{parent=projects/*/locations/*}/glossaries\x12\xac\x01\n\x0bGetGlossary\x12\x34.google.cloud.translation.v3beta1.GetGlossaryRequest\x1a*.google.cloud.translation.v3beta1.Glossary";\x82\xd3\xe4\x93\x02\x35\x12\x33/v3beta1/{name=projects/*/locations/*/glossaries/*}\x12\xa5\x01\n\x0e\x44\x65leteGlossary\x12\x37.google.cloud.translation.v3beta1.DeleteGlossaryRequest\x1a\x1d.google.longrunning.Operation";\x82\xd3\xe4\x93\x02\x35*3/v3beta1/{name=projects/*/locations/*/glossaries/*}B\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, @@ -41,7 +41,7 @@ _BATCHTRANSLATEMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.State", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -70,14 +70,14 @@ ], containing_type=None, serialized_options=None, - serialized_start=2526, - serialized_end=2627, + serialized_start=2558, + serialized_end=2659, ) _sym_db.RegisterEnumDescriptor(_BATCHTRANSLATEMETADATA_STATE) _CREATEGLOSSARYMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata.State", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -106,14 +106,14 @@ ], containing_type=None, serialized_options=None, - serialized_start=2526, - serialized_end=2627, + serialized_start=2558, + serialized_end=2659, ) _sym_db.RegisterEnumDescriptor(_CREATEGLOSSARYMETADATA_STATE) _DELETEGLOSSARYMETADATA_STATE = _descriptor.EnumDescriptor( name="State", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata.State", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.State", filename=None, file=DESCRIPTOR, values=[ @@ -142,22 +142,22 @@ ], containing_type=None, serialized_options=None, - serialized_start=2526, - serialized_end=2627, + serialized_start=2558, + serialized_end=2659, ) _sym_db.RegisterEnumDescriptor(_DELETEGLOSSARYMETADATA_STATE) _TRANSLATETEXTGLOSSARYCONFIG = _descriptor.Descriptor( name="TranslateTextGlossaryConfig", - full_name="google.cloud.translate.v3beta1.TranslateTextGlossaryConfig", + full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="glossary", - full_name="google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.glossary", + full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig.glossary", index=0, number=1, type=9, @@ -175,7 +175,7 @@ ), _descriptor.FieldDescriptor( name="ignore_case", - full_name="google.cloud.translate.v3beta1.TranslateTextGlossaryConfig.ignore_case", + full_name="google.cloud.translation.v3beta1.TranslateTextGlossaryConfig.ignore_case", index=1, number=2, type=8, @@ -200,21 +200,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=198, - serialized_end=266, + serialized_start=202, + serialized_end=270, ) _TRANSLATETEXTREQUEST = _descriptor.Descriptor( name="TranslateTextRequest", - full_name="google.cloud.translate.v3beta1.TranslateTextRequest", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="contents", - full_name="google.cloud.translate.v3beta1.TranslateTextRequest.contents", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.contents", index=0, number=1, type=9, @@ -232,7 +232,7 @@ ), _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translate.v3beta1.TranslateTextRequest.mime_type", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.mime_type", index=1, number=3, type=9, @@ -250,7 +250,7 @@ ), _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translate.v3beta1.TranslateTextRequest.source_language_code", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.source_language_code", index=2, number=4, type=9, @@ -268,7 +268,7 @@ ), _descriptor.FieldDescriptor( name="target_language_code", - full_name="google.cloud.translate.v3beta1.TranslateTextRequest.target_language_code", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.target_language_code", index=3, number=5, type=9, @@ -286,7 +286,7 @@ ), _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translate.v3beta1.TranslateTextRequest.parent", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.parent", index=4, number=8, type=9, @@ -304,7 +304,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translate.v3beta1.TranslateTextRequest.model", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.model", index=5, number=6, type=9, @@ -322,7 +322,7 @@ ), _descriptor.FieldDescriptor( name="glossary_config", - full_name="google.cloud.translate.v3beta1.TranslateTextRequest.glossary_config", + full_name="google.cloud.translation.v3beta1.TranslateTextRequest.glossary_config", index=6, number=7, type=11, @@ -347,21 +347,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=269, - serialized_end=505, + serialized_start=273, + serialized_end=511, ) _TRANSLATETEXTRESPONSE = _descriptor.Descriptor( name="TranslateTextResponse", - full_name="google.cloud.translate.v3beta1.TranslateTextResponse", + full_name="google.cloud.translation.v3beta1.TranslateTextResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="translations", - full_name="google.cloud.translate.v3beta1.TranslateTextResponse.translations", + full_name="google.cloud.translation.v3beta1.TranslateTextResponse.translations", index=0, number=1, type=11, @@ -379,7 +379,7 @@ ), _descriptor.FieldDescriptor( name="glossary_translations", - full_name="google.cloud.translate.v3beta1.TranslateTextResponse.glossary_translations", + full_name="google.cloud.translation.v3beta1.TranslateTextResponse.glossary_translations", index=1, number=3, type=11, @@ -404,21 +404,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=508, - serialized_end=674, + serialized_start=514, + serialized_end=684, ) _TRANSLATION = _descriptor.Descriptor( name="Translation", - full_name="google.cloud.translate.v3beta1.Translation", + full_name="google.cloud.translation.v3beta1.Translation", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="translated_text", - full_name="google.cloud.translate.v3beta1.Translation.translated_text", + full_name="google.cloud.translation.v3beta1.Translation.translated_text", index=0, number=1, type=9, @@ -436,7 +436,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translate.v3beta1.Translation.model", + full_name="google.cloud.translation.v3beta1.Translation.model", index=1, number=2, type=9, @@ -454,7 +454,7 @@ ), _descriptor.FieldDescriptor( name="detected_language_code", - full_name="google.cloud.translate.v3beta1.Translation.detected_language_code", + full_name="google.cloud.translation.v3beta1.Translation.detected_language_code", index=2, number=4, type=9, @@ -472,7 +472,7 @@ ), _descriptor.FieldDescriptor( name="glossary_config", - full_name="google.cloud.translate.v3beta1.Translation.glossary_config", + full_name="google.cloud.translation.v3beta1.Translation.glossary_config", index=3, number=3, type=11, @@ -497,21 +497,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=677, - serialized_end=848, + serialized_start=687, + serialized_end=860, ) _DETECTLANGUAGEREQUEST = _descriptor.Descriptor( name="DetectLanguageRequest", - full_name="google.cloud.translate.v3beta1.DetectLanguageRequest", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.parent", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.parent", index=0, number=5, type=9, @@ -529,7 +529,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.model", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.model", index=1, number=4, type=9, @@ -547,7 +547,7 @@ ), _descriptor.FieldDescriptor( name="content", - full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.content", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.content", index=2, number=1, type=9, @@ -565,7 +565,7 @@ ), _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.mime_type", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.mime_type", index=3, number=3, type=9, @@ -592,27 +592,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translate.v3beta1.DetectLanguageRequest.source", + full_name="google.cloud.translation.v3beta1.DetectLanguageRequest.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=850, - serialized_end=952, + serialized_start=862, + serialized_end=964, ) _DETECTEDLANGUAGE = _descriptor.Descriptor( name="DetectedLanguage", - full_name="google.cloud.translate.v3beta1.DetectedLanguage", + full_name="google.cloud.translation.v3beta1.DetectedLanguage", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_code", - full_name="google.cloud.translate.v3beta1.DetectedLanguage.language_code", + full_name="google.cloud.translation.v3beta1.DetectedLanguage.language_code", index=0, number=1, type=9, @@ -630,7 +630,7 @@ ), _descriptor.FieldDescriptor( name="confidence", - full_name="google.cloud.translate.v3beta1.DetectedLanguage.confidence", + full_name="google.cloud.translation.v3beta1.DetectedLanguage.confidence", index=1, number=2, type=2, @@ -655,21 +655,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=954, - serialized_end=1015, + serialized_start=966, + serialized_end=1027, ) _DETECTLANGUAGERESPONSE = _descriptor.Descriptor( name="DetectLanguageResponse", - full_name="google.cloud.translate.v3beta1.DetectLanguageResponse", + full_name="google.cloud.translation.v3beta1.DetectLanguageResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="languages", - full_name="google.cloud.translate.v3beta1.DetectLanguageResponse.languages", + full_name="google.cloud.translation.v3beta1.DetectLanguageResponse.languages", index=0, number=1, type=11, @@ -694,21 +694,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1017, - serialized_end=1110, + serialized_start=1029, + serialized_end=1124, ) _GETSUPPORTEDLANGUAGESREQUEST = _descriptor.Descriptor( name="GetSupportedLanguagesRequest", - full_name="google.cloud.translate.v3beta1.GetSupportedLanguagesRequest", + full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translate.v3beta1.GetSupportedLanguagesRequest.parent", + full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.parent", index=0, number=3, type=9, @@ -726,7 +726,7 @@ ), _descriptor.FieldDescriptor( name="display_language_code", - full_name="google.cloud.translate.v3beta1.GetSupportedLanguagesRequest.display_language_code", + full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.display_language_code", index=1, number=1, type=9, @@ -744,7 +744,7 @@ ), _descriptor.FieldDescriptor( name="model", - full_name="google.cloud.translate.v3beta1.GetSupportedLanguagesRequest.model", + full_name="google.cloud.translation.v3beta1.GetSupportedLanguagesRequest.model", index=2, number=2, type=9, @@ -769,21 +769,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1112, - serialized_end=1204, + serialized_start=1126, + serialized_end=1218, ) _SUPPORTEDLANGUAGES = _descriptor.Descriptor( name="SupportedLanguages", - full_name="google.cloud.translate.v3beta1.SupportedLanguages", + full_name="google.cloud.translation.v3beta1.SupportedLanguages", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="languages", - full_name="google.cloud.translate.v3beta1.SupportedLanguages.languages", + full_name="google.cloud.translation.v3beta1.SupportedLanguages.languages", index=0, number=1, type=11, @@ -808,21 +808,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1206, - serialized_end=1296, + serialized_start=1220, + serialized_end=1312, ) _SUPPORTEDLANGUAGE = _descriptor.Descriptor( name="SupportedLanguage", - full_name="google.cloud.translate.v3beta1.SupportedLanguage", + full_name="google.cloud.translation.v3beta1.SupportedLanguage", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_code", - full_name="google.cloud.translate.v3beta1.SupportedLanguage.language_code", + full_name="google.cloud.translation.v3beta1.SupportedLanguage.language_code", index=0, number=1, type=9, @@ -840,7 +840,7 @@ ), _descriptor.FieldDescriptor( name="display_name", - full_name="google.cloud.translate.v3beta1.SupportedLanguage.display_name", + full_name="google.cloud.translation.v3beta1.SupportedLanguage.display_name", index=1, number=2, type=9, @@ -858,7 +858,7 @@ ), _descriptor.FieldDescriptor( name="support_source", - full_name="google.cloud.translate.v3beta1.SupportedLanguage.support_source", + full_name="google.cloud.translation.v3beta1.SupportedLanguage.support_source", index=2, number=3, type=8, @@ -876,7 +876,7 @@ ), _descriptor.FieldDescriptor( name="support_target", - full_name="google.cloud.translate.v3beta1.SupportedLanguage.support_target", + full_name="google.cloud.translation.v3beta1.SupportedLanguage.support_target", index=3, number=4, type=8, @@ -901,21 +901,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1298, - serialized_end=1410, + serialized_start=1314, + serialized_end=1426, ) _GCSSOURCE = _descriptor.Descriptor( name="GcsSource", - full_name="google.cloud.translate.v3beta1.GcsSource", + full_name="google.cloud.translation.v3beta1.GcsSource", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="input_uri", - full_name="google.cloud.translate.v3beta1.GcsSource.input_uri", + full_name="google.cloud.translation.v3beta1.GcsSource.input_uri", index=0, number=1, type=9, @@ -940,21 +940,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1412, - serialized_end=1442, + serialized_start=1428, + serialized_end=1458, ) _INPUTCONFIG = _descriptor.Descriptor( name="InputConfig", - full_name="google.cloud.translate.v3beta1.InputConfig", + full_name="google.cloud.translation.v3beta1.InputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="mime_type", - full_name="google.cloud.translate.v3beta1.InputConfig.mime_type", + full_name="google.cloud.translation.v3beta1.InputConfig.mime_type", index=0, number=1, type=9, @@ -972,7 +972,7 @@ ), _descriptor.FieldDescriptor( name="gcs_source", - full_name="google.cloud.translate.v3beta1.InputConfig.gcs_source", + full_name="google.cloud.translation.v3beta1.InputConfig.gcs_source", index=1, number=2, type=11, @@ -999,27 +999,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translate.v3beta1.InputConfig.source", + full_name="google.cloud.translation.v3beta1.InputConfig.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=1444, - serialized_end=1551, + serialized_start=1460, + serialized_end=1569, ) _GCSDESTINATION = _descriptor.Descriptor( name="GcsDestination", - full_name="google.cloud.translate.v3beta1.GcsDestination", + full_name="google.cloud.translation.v3beta1.GcsDestination", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="output_uri_prefix", - full_name="google.cloud.translate.v3beta1.GcsDestination.output_uri_prefix", + full_name="google.cloud.translation.v3beta1.GcsDestination.output_uri_prefix", index=0, number=1, type=9, @@ -1044,21 +1044,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1553, - serialized_end=1596, + serialized_start=1571, + serialized_end=1614, ) _OUTPUTCONFIG = _descriptor.Descriptor( name="OutputConfig", - full_name="google.cloud.translate.v3beta1.OutputConfig", + full_name="google.cloud.translation.v3beta1.OutputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="gcs_destination", - full_name="google.cloud.translate.v3beta1.OutputConfig.gcs_destination", + full_name="google.cloud.translation.v3beta1.OutputConfig.gcs_destination", index=0, number=1, type=11, @@ -1085,27 +1085,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="destination", - full_name="google.cloud.translate.v3beta1.OutputConfig.destination", + full_name="google.cloud.translation.v3beta1.OutputConfig.destination", index=0, containing_type=None, fields=[], ) ], - serialized_start=1598, - serialized_end=1702, + serialized_start=1616, + serialized_end=1722, ) _BATCHTRANSLATETEXTREQUEST_MODELSENTRY = _descriptor.Descriptor( name="ModelsEntry", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="key", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry.key", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry.key", index=0, number=1, type=9, @@ -1123,7 +1123,7 @@ ), _descriptor.FieldDescriptor( name="value", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry.value", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry.value", index=1, number=2, type=9, @@ -1148,20 +1148,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2130, - serialized_end=2175, + serialized_start=2158, + serialized_end=2203, ) _BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY = _descriptor.Descriptor( name="GlossariesEntry", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="key", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry.key", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry.key", index=0, number=1, type=9, @@ -1179,7 +1179,7 @@ ), _descriptor.FieldDescriptor( name="value", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry.value", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry.value", index=1, number=2, type=11, @@ -1204,20 +1204,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2177, - serialized_end=2287, + serialized_start=2205, + serialized_end=2317, ) _BATCHTRANSLATETEXTREQUEST = _descriptor.Descriptor( name="BatchTranslateTextRequest", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.parent", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.parent", index=0, number=1, type=9, @@ -1235,7 +1235,7 @@ ), _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.source_language_code", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.source_language_code", index=1, number=2, type=9, @@ -1253,7 +1253,7 @@ ), _descriptor.FieldDescriptor( name="target_language_codes", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.target_language_codes", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.target_language_codes", index=2, number=3, type=9, @@ -1271,7 +1271,7 @@ ), _descriptor.FieldDescriptor( name="models", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.models", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.models", index=3, number=4, type=11, @@ -1289,7 +1289,7 @@ ), _descriptor.FieldDescriptor( name="input_configs", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.input_configs", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.input_configs", index=4, number=5, type=11, @@ -1307,7 +1307,7 @@ ), _descriptor.FieldDescriptor( name="output_config", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.output_config", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.output_config", index=5, number=6, type=11, @@ -1325,7 +1325,7 @@ ), _descriptor.FieldDescriptor( name="glossaries", - full_name="google.cloud.translate.v3beta1.BatchTranslateTextRequest.glossaries", + full_name="google.cloud.translation.v3beta1.BatchTranslateTextRequest.glossaries", index=6, number=7, type=11, @@ -1353,21 +1353,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1705, - serialized_end=2287, + serialized_start=1725, + serialized_end=2317, ) _BATCHTRANSLATEMETADATA = _descriptor.Descriptor( name="BatchTranslateMetadata", - full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.state", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.state", index=0, number=1, type=14, @@ -1385,7 +1385,7 @@ ), _descriptor.FieldDescriptor( name="translated_characters", - full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.translated_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.translated_characters", index=1, number=2, type=3, @@ -1403,7 +1403,7 @@ ), _descriptor.FieldDescriptor( name="failed_characters", - full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.failed_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.failed_characters", index=2, number=3, type=3, @@ -1421,7 +1421,7 @@ ), _descriptor.FieldDescriptor( name="total_characters", - full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.total_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.total_characters", index=3, number=4, type=3, @@ -1439,7 +1439,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translate.v3beta1.BatchTranslateMetadata.submit_time", + full_name="google.cloud.translation.v3beta1.BatchTranslateMetadata.submit_time", index=4, number=5, type=11, @@ -1464,21 +1464,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2290, - serialized_end=2627, + serialized_start=2320, + serialized_end=2659, ) _BATCHTRANSLATERESPONSE = _descriptor.Descriptor( name="BatchTranslateResponse", - full_name="google.cloud.translate.v3beta1.BatchTranslateResponse", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="total_characters", - full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.total_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.total_characters", index=0, number=1, type=3, @@ -1496,7 +1496,7 @@ ), _descriptor.FieldDescriptor( name="translated_characters", - full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.translated_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.translated_characters", index=1, number=2, type=3, @@ -1514,7 +1514,7 @@ ), _descriptor.FieldDescriptor( name="failed_characters", - full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.failed_characters", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.failed_characters", index=2, number=3, type=3, @@ -1532,7 +1532,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.submit_time", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.submit_time", index=3, number=4, type=11, @@ -1550,7 +1550,7 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translate.v3beta1.BatchTranslateResponse.end_time", + full_name="google.cloud.translation.v3beta1.BatchTranslateResponse.end_time", index=4, number=5, type=11, @@ -1575,21 +1575,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2630, - serialized_end=2833, + serialized_start=2662, + serialized_end=2865, ) _GLOSSARYINPUTCONFIG = _descriptor.Descriptor( name="GlossaryInputConfig", - full_name="google.cloud.translate.v3beta1.GlossaryInputConfig", + full_name="google.cloud.translation.v3beta1.GlossaryInputConfig", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="gcs_source", - full_name="google.cloud.translate.v3beta1.GlossaryInputConfig.gcs_source", + full_name="google.cloud.translation.v3beta1.GlossaryInputConfig.gcs_source", index=0, number=1, type=11, @@ -1616,27 +1616,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="source", - full_name="google.cloud.translate.v3beta1.GlossaryInputConfig.source", + full_name="google.cloud.translation.v3beta1.GlossaryInputConfig.source", index=0, containing_type=None, fields=[], ) ], - serialized_start=2835, - serialized_end=2931, + serialized_start=2867, + serialized_end=2965, ) _GLOSSARY_LANGUAGECODEPAIR = _descriptor.Descriptor( name="LanguageCodePair", - full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodePair", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="source_language_code", - full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodePair.source_language_code", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair.source_language_code", index=0, number=1, type=9, @@ -1654,7 +1654,7 @@ ), _descriptor.FieldDescriptor( name="target_language_code", - full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodePair.target_language_code", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodePair.target_language_code", index=1, number=2, type=9, @@ -1679,20 +1679,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3324, - serialized_end=3402, + serialized_start=3364, + serialized_end=3442, ) _GLOSSARY_LANGUAGECODESSET = _descriptor.Descriptor( name="LanguageCodesSet", - full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodesSet", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodesSet", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="language_codes", - full_name="google.cloud.translate.v3beta1.Glossary.LanguageCodesSet.language_codes", + full_name="google.cloud.translation.v3beta1.Glossary.LanguageCodesSet.language_codes", index=0, number=1, type=9, @@ -1717,20 +1717,20 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3404, - serialized_end=3446, + serialized_start=3444, + serialized_end=3486, ) _GLOSSARY = _descriptor.Descriptor( name="Glossary", - full_name="google.cloud.translate.v3beta1.Glossary", + full_name="google.cloud.translation.v3beta1.Glossary", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translate.v3beta1.Glossary.name", + full_name="google.cloud.translation.v3beta1.Glossary.name", index=0, number=1, type=9, @@ -1748,7 +1748,7 @@ ), _descriptor.FieldDescriptor( name="language_pair", - full_name="google.cloud.translate.v3beta1.Glossary.language_pair", + full_name="google.cloud.translation.v3beta1.Glossary.language_pair", index=1, number=3, type=11, @@ -1766,7 +1766,7 @@ ), _descriptor.FieldDescriptor( name="language_codes_set", - full_name="google.cloud.translate.v3beta1.Glossary.language_codes_set", + full_name="google.cloud.translation.v3beta1.Glossary.language_codes_set", index=2, number=4, type=11, @@ -1784,7 +1784,7 @@ ), _descriptor.FieldDescriptor( name="input_config", - full_name="google.cloud.translate.v3beta1.Glossary.input_config", + full_name="google.cloud.translation.v3beta1.Glossary.input_config", index=3, number=5, type=11, @@ -1802,7 +1802,7 @@ ), _descriptor.FieldDescriptor( name="entry_count", - full_name="google.cloud.translate.v3beta1.Glossary.entry_count", + full_name="google.cloud.translation.v3beta1.Glossary.entry_count", index=4, number=6, type=5, @@ -1820,7 +1820,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translate.v3beta1.Glossary.submit_time", + full_name="google.cloud.translation.v3beta1.Glossary.submit_time", index=5, number=7, type=11, @@ -1838,7 +1838,7 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translate.v3beta1.Glossary.end_time", + full_name="google.cloud.translation.v3beta1.Glossary.end_time", index=6, number=8, type=11, @@ -1865,27 +1865,27 @@ oneofs=[ _descriptor.OneofDescriptor( name="languages", - full_name="google.cloud.translate.v3beta1.Glossary.languages", + full_name="google.cloud.translation.v3beta1.Glossary.languages", index=0, containing_type=None, fields=[], ) ], - serialized_start=2934, - serialized_end=3459, + serialized_start=2968, + serialized_end=3499, ) _CREATEGLOSSARYREQUEST = _descriptor.Descriptor( name="CreateGlossaryRequest", - full_name="google.cloud.translate.v3beta1.CreateGlossaryRequest", + full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translate.v3beta1.CreateGlossaryRequest.parent", + full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest.parent", index=0, number=1, type=9, @@ -1903,7 +1903,7 @@ ), _descriptor.FieldDescriptor( name="glossary", - full_name="google.cloud.translate.v3beta1.CreateGlossaryRequest.glossary", + full_name="google.cloud.translation.v3beta1.CreateGlossaryRequest.glossary", index=1, number=2, type=11, @@ -1928,21 +1928,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3461, - serialized_end=3560, + serialized_start=3501, + serialized_end=3602, ) _GETGLOSSARYREQUEST = _descriptor.Descriptor( name="GetGlossaryRequest", - full_name="google.cloud.translate.v3beta1.GetGlossaryRequest", + full_name="google.cloud.translation.v3beta1.GetGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translate.v3beta1.GetGlossaryRequest.name", + full_name="google.cloud.translation.v3beta1.GetGlossaryRequest.name", index=0, number=1, type=9, @@ -1967,21 +1967,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3562, - serialized_end=3596, + serialized_start=3604, + serialized_end=3638, ) _DELETEGLOSSARYREQUEST = _descriptor.Descriptor( name="DeleteGlossaryRequest", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryRequest", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryRequest.name", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryRequest.name", index=0, number=1, type=9, @@ -2006,21 +2006,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3598, - serialized_end=3635, + serialized_start=3640, + serialized_end=3677, ) _LISTGLOSSARIESREQUEST = _descriptor.Descriptor( name="ListGlossariesRequest", - full_name="google.cloud.translate.v3beta1.ListGlossariesRequest", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="parent", - full_name="google.cloud.translate.v3beta1.ListGlossariesRequest.parent", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.parent", index=0, number=1, type=9, @@ -2038,7 +2038,7 @@ ), _descriptor.FieldDescriptor( name="page_size", - full_name="google.cloud.translate.v3beta1.ListGlossariesRequest.page_size", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.page_size", index=1, number=2, type=5, @@ -2056,7 +2056,7 @@ ), _descriptor.FieldDescriptor( name="page_token", - full_name="google.cloud.translate.v3beta1.ListGlossariesRequest.page_token", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.page_token", index=2, number=3, type=9, @@ -2074,7 +2074,7 @@ ), _descriptor.FieldDescriptor( name="filter", - full_name="google.cloud.translate.v3beta1.ListGlossariesRequest.filter", + full_name="google.cloud.translation.v3beta1.ListGlossariesRequest.filter", index=3, number=4, type=9, @@ -2099,21 +2099,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3637, - serialized_end=3731, + serialized_start=3679, + serialized_end=3773, ) _LISTGLOSSARIESRESPONSE = _descriptor.Descriptor( name="ListGlossariesResponse", - full_name="google.cloud.translate.v3beta1.ListGlossariesResponse", + full_name="google.cloud.translation.v3beta1.ListGlossariesResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="glossaries", - full_name="google.cloud.translate.v3beta1.ListGlossariesResponse.glossaries", + full_name="google.cloud.translation.v3beta1.ListGlossariesResponse.glossaries", index=0, number=1, type=11, @@ -2131,7 +2131,7 @@ ), _descriptor.FieldDescriptor( name="next_page_token", - full_name="google.cloud.translate.v3beta1.ListGlossariesResponse.next_page_token", + full_name="google.cloud.translation.v3beta1.ListGlossariesResponse.next_page_token", index=1, number=2, type=9, @@ -2156,21 +2156,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3733, - serialized_end=3844, + serialized_start=3775, + serialized_end=3888, ) _CREATEGLOSSARYMETADATA = _descriptor.Descriptor( name="CreateGlossaryMetadata", - full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata.name", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.name", index=0, number=1, type=9, @@ -2188,7 +2188,7 @@ ), _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata.state", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.state", index=1, number=2, type=14, @@ -2206,7 +2206,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translate.v3beta1.CreateGlossaryMetadata.submit_time", + full_name="google.cloud.translation.v3beta1.CreateGlossaryMetadata.submit_time", index=2, number=3, type=11, @@ -2231,21 +2231,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3847, - serialized_end=4114, + serialized_start=3891, + serialized_end=4160, ) _DELETEGLOSSARYMETADATA = _descriptor.Descriptor( name="DeleteGlossaryMetadata", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata.name", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.name", index=0, number=1, type=9, @@ -2263,7 +2263,7 @@ ), _descriptor.FieldDescriptor( name="state", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata.state", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.state", index=1, number=2, type=14, @@ -2281,7 +2281,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryMetadata.submit_time", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryMetadata.submit_time", index=2, number=3, type=11, @@ -2306,21 +2306,21 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4117, - serialized_end=4384, + serialized_start=4163, + serialized_end=4432, ) _DELETEGLOSSARYRESPONSE = _descriptor.Descriptor( name="DeleteGlossaryResponse", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryResponse", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse", filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name="name", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryResponse.name", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.name", index=0, number=1, type=9, @@ -2338,7 +2338,7 @@ ), _descriptor.FieldDescriptor( name="submit_time", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryResponse.submit_time", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.submit_time", index=1, number=2, type=11, @@ -2356,7 +2356,7 @@ ), _descriptor.FieldDescriptor( name="end_time", - full_name="google.cloud.translate.v3beta1.DeleteGlossaryResponse.end_time", + full_name="google.cloud.translation.v3beta1.DeleteGlossaryResponse.end_time", index=2, number=3, type=11, @@ -2381,8 +2381,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4387, - serialized_end=4520, + serialized_start=4435, + serialized_end=4568, ) _TRANSLATETEXTREQUEST.fields_by_name[ @@ -2535,7 +2535,7 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATETEXTGLOSSARYCONFIG, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __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. @@ -2548,7 +2548,7 @@ Optional. Indicates whether we should do a case-insensitive match. Default value is false if missing. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.TranslateTextGlossaryConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextGlossaryConfig) ), ) _sym_db.RegisterMessage(TranslateTextGlossaryConfig) @@ -2558,7 +2558,7 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATETEXTREQUEST, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The request message for synchronous translation. @@ -2603,7 +2603,7 @@ the same region as the model, otherwise an INVALID\_ARGUMENT error is returned. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.TranslateTextRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextRequest) ), ) _sym_db.RegisterMessage(TranslateTextRequest) @@ -2613,7 +2613,7 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATETEXTRESPONSE, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The main language translation response message. @@ -2628,7 +2628,7 @@ terms apply. This field has the same length as ``contents`` in TranslateTextRequest. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.TranslateTextResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.TranslateTextResponse) ), ) _sym_db.RegisterMessage(TranslateTextResponse) @@ -2638,7 +2638,7 @@ (_message.Message,), dict( DESCRIPTOR=_TRANSLATION, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""A single translation response. @@ -2657,7 +2657,7 @@ glossary_config: The ``glossary_config`` used for this translation. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.Translation) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Translation) ), ) _sym_db.RegisterMessage(Translation) @@ -2667,7 +2667,7 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTLANGUAGEREQUEST, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The request message for language detection. @@ -2691,7 +2691,7 @@ "text/html", "text/plain". If left blank, the MIME type is assumed to be "text/html". """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DetectLanguageRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageRequest) ), ) _sym_db.RegisterMessage(DetectLanguageRequest) @@ -2701,7 +2701,7 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTEDLANGUAGE, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The response message for language detection. @@ -2712,7 +2712,7 @@ confidence: The confidence of the detection result for this language. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DetectedLanguage) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectedLanguage) ), ) _sym_db.RegisterMessage(DetectedLanguage) @@ -2722,7 +2722,7 @@ (_message.Message,), dict( DESCRIPTOR=_DETECTLANGUAGERESPONSE, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The response message for language detection. @@ -2731,7 +2731,7 @@ A list of detected languages sorted by detection confidence in descending order. The most probable language first. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DetectLanguageResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DetectLanguageResponse) ), ) _sym_db.RegisterMessage(DetectLanguageResponse) @@ -2741,7 +2741,7 @@ (_message.Message,), dict( DESCRIPTOR=_GETSUPPORTEDLANGUAGESREQUEST, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The request message for discovering supported languages. @@ -2767,7 +2767,7 @@ languages supported by the specified model. If missing, we get supported languages of Google general NMT model. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GetSupportedLanguagesRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetSupportedLanguagesRequest) ), ) _sym_db.RegisterMessage(GetSupportedLanguagesRequest) @@ -2777,7 +2777,7 @@ (_message.Message,), dict( DESCRIPTOR=_SUPPORTEDLANGUAGES, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The response message for discovering supported languages. @@ -2786,7 +2786,7 @@ A list of supported language responses. This list contains an entry for each language the Translation API supports. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.SupportedLanguages) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguages) ), ) _sym_db.RegisterMessage(SupportedLanguages) @@ -2796,7 +2796,7 @@ (_message.Message,), dict( DESCRIPTOR=_SUPPORTEDLANGUAGE, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""A single supported language response corresponds to information related to one supported language. @@ -2815,7 +2815,7 @@ support_target: Can be used as target language. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.SupportedLanguage) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.SupportedLanguage) ), ) _sym_db.RegisterMessage(SupportedLanguage) @@ -2825,7 +2825,7 @@ (_message.Message,), dict( DESCRIPTOR=_GCSSOURCE, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The GCS location for the input content. @@ -2834,7 +2834,7 @@ Required. Source data URI. For example, ``gs://my_bucket/my_object``. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GcsSource) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsSource) ), ) _sym_db.RegisterMessage(GcsSource) @@ -2844,7 +2844,7 @@ (_message.Message,), dict( DESCRIPTOR=_INPUTCONFIG, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Input configuration. @@ -2870,7 +2870,7 @@ 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.translate.v3beta1.InputConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.InputConfig) ), ) _sym_db.RegisterMessage(InputConfig) @@ -2880,7 +2880,7 @@ (_message.Message,), dict( DESCRIPTOR=_GCSDESTINATION, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The GCS location for the output content @@ -2890,7 +2890,7 @@ 'output\_uri\_prefix' must end with "/". Otherwise error 400 is returned. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GcsDestination) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GcsDestination) ), ) _sym_db.RegisterMessage(GcsDestination) @@ -2900,7 +2900,7 @@ (_message.Message,), dict( DESCRIPTOR=_OUTPUTCONFIG, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Output configuration. @@ -2964,7 +2964,7 @@ error details. glossary\_error\_file has format of gs://transl ation\_test/a\_b\_c\_'trg'\_glossary\_errors.[extension] """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.OutputConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.OutputConfig) ), ) _sym_db.RegisterMessage(OutputConfig) @@ -2978,8 +2978,8 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_MODELSENTRY, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2" - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateTextRequest.ModelsEntry) + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.ModelsEntry) ), ), GlossariesEntry=_reflection.GeneratedProtocolMessageType( @@ -2987,12 +2987,12 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST_GLOSSARIESENTRY, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2" - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateTextRequest.GlossariesEntry) + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2" + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest.GlossariesEntry) ), ), DESCRIPTOR=_BATCHTRANSLATETEXTREQUEST, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""The batch translation request. @@ -3030,7 +3030,7 @@ Optional. Glossaries to be applied for translation. It's keyed by target language code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateTextRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateTextRequest) ), ) _sym_db.RegisterMessage(BatchTranslateTextRequest) @@ -3042,7 +3042,7 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATEMETADATA, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""State metadata for the batch translation operation. @@ -3063,7 +3063,7 @@ submit_time: Time when the operation was submitted. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateMetadata) ), ) _sym_db.RegisterMessage(BatchTranslateMetadata) @@ -3073,7 +3073,7 @@ (_message.Message,), dict( DESCRIPTOR=_BATCHTRANSLATERESPONSE, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __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 @@ -3096,7 +3096,7 @@ g.Operation.done][google.longrunning.Operation.done] is set to true. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.BatchTranslateResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.BatchTranslateResponse) ), ) _sym_db.RegisterMessage(BatchTranslateResponse) @@ -3106,7 +3106,7 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARYINPUTCONFIG, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Input configuration for glossaries. @@ -3131,7 +3131,7 @@ here: ``https://support.google.com/translatortoolkit/answer /6306379?hl=en``. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GlossaryInputConfig) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GlossaryInputConfig) ), ) _sym_db.RegisterMessage(GlossaryInputConfig) @@ -3145,7 +3145,7 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARY_LANGUAGECODEPAIR, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Used with UNIDIRECTIONAL. @@ -3159,7 +3159,7 @@ example, "zh-CN". Expected to be an exact match for GlossaryTerm.language\_code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.Glossary.LanguageCodePair) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodePair) ), ), LanguageCodesSet=_reflection.GeneratedProtocolMessageType( @@ -3167,7 +3167,7 @@ (_message.Message,), dict( DESCRIPTOR=_GLOSSARY_LANGUAGECODESSET, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Used with EQUIVALENT\_TERMS\_SET. @@ -3178,11 +3178,11 @@ entries. Expected to be an exact match for GlossaryTerm.language\_code. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.Glossary.LanguageCodesSet) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary.LanguageCodesSet) ), ), DESCRIPTOR=_GLOSSARY, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Represents a glossary built from user provided data. @@ -3207,7 +3207,7 @@ end_time: Output only. When the glossary creation was finished. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.Glossary) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.Glossary) ), ) _sym_db.RegisterMessage(Glossary) @@ -3219,7 +3219,7 @@ (_message.Message,), dict( DESCRIPTOR=_CREATEGLOSSARYREQUEST, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Request message for CreateGlossary. @@ -3229,7 +3229,7 @@ glossary: Required. The glossary to create. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.CreateGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryRequest) ), ) _sym_db.RegisterMessage(CreateGlossaryRequest) @@ -3239,7 +3239,7 @@ (_message.Message,), dict( DESCRIPTOR=_GETGLOSSARYREQUEST, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Request message for GetGlossary. @@ -3247,7 +3247,7 @@ name: Required. The name of the glossary to retrieve. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.GetGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.GetGlossaryRequest) ), ) _sym_db.RegisterMessage(GetGlossaryRequest) @@ -3257,7 +3257,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYREQUEST, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Request message for DeleteGlossary. @@ -3265,7 +3265,7 @@ name: Required. The name of the glossary to delete. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DeleteGlossaryRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryRequest) ), ) _sym_db.RegisterMessage(DeleteGlossaryRequest) @@ -3275,7 +3275,7 @@ (_message.Message,), dict( DESCRIPTOR=_LISTGLOSSARIESREQUEST, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Request message for ListGlossaries. @@ -3298,7 +3298,7 @@ For example, ``tags.glossary_name="products*"``. If missing, no filtering is performed. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.ListGlossariesRequest) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesRequest) ), ) _sym_db.RegisterMessage(ListGlossariesRequest) @@ -3308,7 +3308,7 @@ (_message.Message,), dict( DESCRIPTOR=_LISTGLOSSARIESRESPONSE, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __module__="google.cloud.translation_v3beta1.proto.translation_service_pb2", __doc__="""Response message for ListGlossaries. @@ -3321,7 +3321,7 @@ call to ``ListGlossaries`` method to retrieve the next page of results. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.ListGlossariesResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.ListGlossariesResponse) ), ) _sym_db.RegisterMessage(ListGlossariesResponse) @@ -3331,7 +3331,7 @@ (_message.Message,), dict( DESCRIPTOR=_CREATEGLOSSARYMETADATA, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __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. @@ -3345,7 +3345,7 @@ submit_time: The time when the operation was submitted to the server. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.CreateGlossaryMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.CreateGlossaryMetadata) ), ) _sym_db.RegisterMessage(CreateGlossaryMetadata) @@ -3355,7 +3355,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYMETADATA, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __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. @@ -3369,7 +3369,7 @@ submit_time: The time when the operation was submitted to the server. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DeleteGlossaryMetadata) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryMetadata) ), ) _sym_db.RegisterMessage(DeleteGlossaryMetadata) @@ -3379,7 +3379,7 @@ (_message.Message,), dict( DESCRIPTOR=_DELETEGLOSSARYRESPONSE, - __module__="google.cloud.translate_v3beta1.proto.translation_service_pb2", + __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. @@ -3395,7 +3395,7 @@ ngrunning.Operation.done][google.longrunning.Operation.done] is set to true. """, - # @@protoc_insertion_point(class_scope:google.cloud.translate.v3beta1.DeleteGlossaryResponse) + # @@protoc_insertion_point(class_scope:google.cloud.translation.v3beta1.DeleteGlossaryResponse) ), ) _sym_db.RegisterMessage(DeleteGlossaryResponse) @@ -3407,16 +3407,16 @@ _TRANSLATIONSERVICE = _descriptor.ServiceDescriptor( name="TranslationService", - full_name="google.cloud.translate.v3beta1.TranslationService", + full_name="google.cloud.translation.v3beta1.TranslationService", file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=4523, - serialized_end=6033, + serialized_start=4571, + serialized_end=6107, methods=[ _descriptor.MethodDescriptor( name="TranslateText", - full_name="google.cloud.translate.v3beta1.TranslationService.TranslateText", + full_name="google.cloud.translation.v3beta1.TranslationService.TranslateText", index=0, containing_service=None, input_type=_TRANSLATETEXTREQUEST, @@ -3427,7 +3427,7 @@ ), _descriptor.MethodDescriptor( name="DetectLanguage", - full_name="google.cloud.translate.v3beta1.TranslationService.DetectLanguage", + full_name="google.cloud.translation.v3beta1.TranslationService.DetectLanguage", index=1, containing_service=None, input_type=_DETECTLANGUAGEREQUEST, @@ -3438,7 +3438,7 @@ ), _descriptor.MethodDescriptor( name="GetSupportedLanguages", - full_name="google.cloud.translate.v3beta1.TranslationService.GetSupportedLanguages", + full_name="google.cloud.translation.v3beta1.TranslationService.GetSupportedLanguages", index=2, containing_service=None, input_type=_GETSUPPORTEDLANGUAGESREQUEST, @@ -3449,7 +3449,7 @@ ), _descriptor.MethodDescriptor( name="BatchTranslateText", - full_name="google.cloud.translate.v3beta1.TranslationService.BatchTranslateText", + full_name="google.cloud.translation.v3beta1.TranslationService.BatchTranslateText", index=3, containing_service=None, input_type=_BATCHTRANSLATETEXTREQUEST, @@ -3460,7 +3460,7 @@ ), _descriptor.MethodDescriptor( name="CreateGlossary", - full_name="google.cloud.translate.v3beta1.TranslationService.CreateGlossary", + full_name="google.cloud.translation.v3beta1.TranslationService.CreateGlossary", index=4, containing_service=None, input_type=_CREATEGLOSSARYREQUEST, @@ -3471,7 +3471,7 @@ ), _descriptor.MethodDescriptor( name="ListGlossaries", - full_name="google.cloud.translate.v3beta1.TranslationService.ListGlossaries", + full_name="google.cloud.translation.v3beta1.TranslationService.ListGlossaries", index=5, containing_service=None, input_type=_LISTGLOSSARIESREQUEST, @@ -3482,7 +3482,7 @@ ), _descriptor.MethodDescriptor( name="GetGlossary", - full_name="google.cloud.translate.v3beta1.TranslationService.GetGlossary", + full_name="google.cloud.translation.v3beta1.TranslationService.GetGlossary", index=6, containing_service=None, input_type=_GETGLOSSARYREQUEST, @@ -3493,7 +3493,7 @@ ), _descriptor.MethodDescriptor( name="DeleteGlossary", - full_name="google.cloud.translate.v3beta1.TranslationService.DeleteGlossary", + full_name="google.cloud.translation.v3beta1.TranslationService.DeleteGlossary", index=7, containing_service=None, input_type=_DELETEGLOSSARYREQUEST, diff --git a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py index e653c84a1cc0..695f79923a4a 100644 --- a/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py +++ b/translate/google/cloud/translate_v3beta1/proto/translation_service_pb2_grpc.py @@ -2,7 +2,7 @@ import grpc from google.cloud.translate_v3beta1.proto import ( - translation_service_pb2 as google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2, + translation_service_pb2 as google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2, ) from google.longrunning import ( operations_pb2 as google_dot_longrunning_dot_operations__pb2, @@ -22,43 +22,43 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.TranslateText = channel.unary_unary( - "/google.cloud.translate.v3beta1.TranslationService/TranslateText", - 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, + "/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, ) self.DetectLanguage = channel.unary_unary( - "/google.cloud.translate.v3beta1.TranslationService/DetectLanguage", - 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, + "/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, ) self.GetSupportedLanguages = channel.unary_unary( - "/google.cloud.translate.v3beta1.TranslationService/GetSupportedLanguages", - 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, + "/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, ) self.BatchTranslateText = channel.unary_unary( - "/google.cloud.translate.v3beta1.TranslationService/BatchTranslateText", - request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.SerializeToString, + "/google.cloud.translation.v3beta1.TranslationService/BatchTranslateText", + request_serializer=google_dot_cloud_dot_translation__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.translate.v3beta1.TranslationService/CreateGlossary", - request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.SerializeToString, + "/google.cloud.translation.v3beta1.TranslationService/CreateGlossary", + request_serializer=google_dot_cloud_dot_translation__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.translate.v3beta1.TranslationService/ListGlossaries", - 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, + "/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, ) self.GetGlossary = channel.unary_unary( - "/google.cloud.translate.v3beta1.TranslationService/GetGlossary", - 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, + "/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, ) self.DeleteGlossary = channel.unary_unary( - "/google.cloud.translate.v3beta1.TranslationService/DeleteGlossary", - request_serializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.SerializeToString, + "/google.cloud.translation.v3beta1.TranslationService/DeleteGlossary", + request_serializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.SerializeToString, response_deserializer=google_dot_longrunning_dot_operations__pb2.Operation.FromString, ) @@ -141,46 +141,46 @@ 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_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, + 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, ), "DetectLanguage": grpc.unary_unary_rpc_method_handler( servicer.DetectLanguage, - 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, + 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, ), "GetSupportedLanguages": grpc.unary_unary_rpc_method_handler( servicer.GetSupportedLanguages, - 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, + 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, ), "BatchTranslateText": grpc.unary_unary_rpc_method_handler( servicer.BatchTranslateText, - request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.BatchTranslateTextRequest.FromString, + request_deserializer=google_dot_cloud_dot_translation__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_translate__v3beta1_dot_proto_dot_translation__service__pb2.CreateGlossaryRequest.FromString, + request_deserializer=google_dot_cloud_dot_translation__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_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, + 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, ), "GetGlossary": grpc.unary_unary_rpc_method_handler( servicer.GetGlossary, - 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, + 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, ), "DeleteGlossary": grpc.unary_unary_rpc_method_handler( servicer.DeleteGlossary, - request_deserializer=google_dot_cloud_dot_translate__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.FromString, + request_deserializer=google_dot_cloud_dot_translation__v3beta1_dot_proto_dot_translation__service__pb2.DeleteGlossaryRequest.FromString, response_serializer=google_dot_longrunning_dot_operations__pb2.Operation.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( - "google.cloud.translate.v3beta1.TranslationService", rpc_method_handlers + "google.cloud.translation.v3beta1.TranslationService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,)) diff --git a/translate/synth.metadata b/translate/synth.metadata index b978fbb49256..363e645c0b50 100644 --- a/translate/synth.metadata +++ b/translate/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-03-21T18:13:35.841065Z", + "updateTime": "2019-03-21T22:02:11.681537Z", "sources": [ { "generator": { @@ -8,6 +8,14 @@ "dockerImage": "googleapis/artman@sha256:e8ac9200640e76d54643f370db71a1556bf254f565ce46b45a467bbcbacbdb37" } }, + { + "git": { + "name": "googleapis-private", + "remote": "https://github.com/googleapis/googleapis-private.git", + "sha": "4f336ff3519e999d1c2796880dad85034ed851ea", + "internalRef": "239614504" + } + }, { "template": { "name": "python_library", diff --git a/translate/synth.py b/translate/synth.py index f8de4e83b987..bbbaf64c178c 100644 --- a/translate/synth.py +++ b/translate/synth.py @@ -39,6 +39,13 @@ s.move(library / f'google/cloud/translate_{version}', excludes=excludes) s.move(library / 'tests') +# translation -> translate +s.replace( + "google/**/translation_service_pb2_grpc.py", + "google.cloud.translation_v3beta1.proto", + "google.cloud.translate_v3beta1.proto", +) + # ---------------------------------------------------------------------------- # Add templated files # ----------------------------------------------------------------------------