Services for Google Cloud Translate v3beta1 API¶
-
class
google.cloud.translate_v3beta1.services.translation_service.TranslationServiceAsyncClient(*, credentials: google.auth.credentials.Credentials = None, transport: Union[str, google.cloud.translate_v3beta1.services.translation_service.transports.base.TranslationServiceTransport] = 'grpc_asyncio', client_options: <module 'google.api_core.client_options' from '/workspace/.nox/docs/lib/python3.8/site-packages/google/api_core/client_options.py'> = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]¶ Provides natural language translation operations.
Instantiate the translation service client.
- Parameters
credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.
transport (Union[str, TranslationServiceTransport]) – The transport to use. If set to None, a transport is chosen automatically.
client_options (ClientOptions) – Custom options for the client. It won’t take effect if a
transportinstance is provided. (1) Theapi_endpointproperty can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT environment variable can also be used to override the endpoint: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto switch to the default mTLS endpoint if client certificate is present, this is the default value). However, theapi_endpointproperty takes precedence if provided. (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then theclient_cert_sourceproperty can be used to provide client certificate for mutual TLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.
- Raises
google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.
-
async
batch_translate_text(request: google.cloud.translate_v3beta1.types.translation_service.BatchTranslateTextRequest = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶ 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.
- Parameters
request (
BatchTranslateTextRequest) – The request object. The batch translation request.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be :class:
~.translation_service.BatchTranslateResponse: Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by BatchTranslateText if at least one sentence is translated successfully.- Return type
AsyncOperation
-
async
create_glossary(request: google.cloud.translate_v3beta1.types.translation_service.CreateGlossaryRequest = None, *, parent: str = None, glossary: google.cloud.translate_v3beta1.types.translation_service.Glossary = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶ Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn’t exist.
- Parameters
request (
CreateGlossaryRequest) – The request object. Request message for CreateGlossary.parent (
str) – Required. The project name. This corresponds to theparentfield on therequestinstance; ifrequestis provided, this should not be set.glossary (
Glossary) – Required. The glossary to create. This corresponds to theglossaryfield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be :class:
~.translation_service.Glossary: Represents a glossary built from user provided data.- Return type
AsyncOperation
-
async
delete_glossary(request: google.cloud.translate_v3beta1.types.translation_service.DeleteGlossaryRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation_async.AsyncOperation[source]¶ Deletes a glossary, or cancels glossary construction if the glossary isn’t created yet. Returns NOT_FOUND, if the glossary doesn’t exist.
- Parameters
request (
DeleteGlossaryRequest) – The request object. Request message for DeleteGlossary.name (
str) – Required. The name of the glossary to delete. This corresponds to thenamefield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be :class:
~.translation_service.DeleteGlossaryResponse: Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by DeleteGlossary.- Return type
AsyncOperation
-
async
detect_language(request: google.cloud.translate_v3beta1.types.translation_service.DetectLanguageRequest = None, *, parent: str = None, model: str = None, mime_type: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.types.translation_service.DetectLanguageResponse[source]¶ Detects the language of text within a request.
- Parameters
request (
DetectLanguageRequest) – The request object. The request message for language detection.parent (
str) –Required. Project or location to make a call. Must refer to a caller’s project.
Format:
projects/{project-id}/locations/{location-id}orprojects/{project-id}.For global calls, use
projects/{project-id}/locations/globalorprojects/{project-id}.Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned. This corresponds to the
parentfield on therequestinstance; ifrequestis provided, this should not be set.model (
str) –Optional. The language detection model to be used.
Format:
projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}Only one language detection model is currently supported:
projects/{project-id}/locations/{location-id}/models/language-detection/default.If not specified, the default model is used. This corresponds to the
modelfield on therequestinstance; ifrequestis provided, this should not be set.mime_type (
str) – Optional. The format of the source text, for example, “text/html”, “text/plain”. If left blank, the MIME type defaults to “text/html”. This corresponds to themime_typefield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
The response message for language detection.
- Return type
DetectLanguageResponse
-
classmethod
from_service_account_file(filename: str, *args, **kwargs)¶ Creates an instance of this client using the provided credentials file.
- Parameters
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
The constructed client.
- Return type
-
classmethod
from_service_account_json(filename: str, *args, **kwargs)¶ Creates an instance of this client using the provided credentials file.
- Parameters
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
The constructed client.
- Return type
-
async
get_glossary(request: google.cloud.translate_v3beta1.types.translation_service.GetGlossaryRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.types.translation_service.Glossary[source]¶ Gets a glossary. Returns NOT_FOUND, if the glossary doesn’t exist.
- Parameters
request (
GetGlossaryRequest) – The request object. Request message for GetGlossary.name (
str) – Required. The name of the glossary to retrieve. This corresponds to thenamefield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Represents a glossary built from user provided data.
- Return type
Glossary
-
async
get_supported_languages(request: google.cloud.translate_v3beta1.types.translation_service.GetSupportedLanguagesRequest = None, *, parent: str = None, display_language_code: str = None, model: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.types.translation_service.SupportedLanguages[source]¶ Returns a list of supported languages for translation.
- Parameters
request (
GetSupportedLanguagesRequest) – The request object. The request message for discovering supported languages.parent (
str) –Required. Project or location to make a call. Must refer to a caller’s project.
Format:
projects/{project-id}orprojects/{project-id}/locations/{location-id}.For global calls, use
projects/{project-id}/locations/globalorprojects/{project-id}.Non-global location is required for AutoML models.
Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. This corresponds to the
parentfield on therequestinstance; ifrequestis provided, this should not be set.display_language_code (
str) – Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response. This corresponds to thedisplay_language_codefield on therequestinstance; ifrequestis provided, this should not be set.model (
str) –Optional. Get supported languages of this model.
The format depends on model type:
AutoML Translation models:
projects/{project-id}/locations/{location-id}/models/{model-id}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 base (PBMT) model. This corresponds to the
modelfield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
The response message for discovering supported languages.
- Return type
SupportedLanguages
-
get_transport_class() → Type[google.cloud.translate_v3beta1.services.translation_service.transports.base.TranslationServiceTransport]¶ Return an appropriate transport class.
- Parameters
label – The name of the desired transport. If none is provided, then the first transport in the registry is used.
- Returns
The transport class to use.
-
static
glossary_path(project: str, location: str, glossary: str) → str¶ Return a fully-qualified glossary string.
-
async
list_glossaries(request: google.cloud.translate_v3beta1.types.translation_service.ListGlossariesRequest = None, *, parent: str = None, filter: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.services.translation_service.pagers.ListGlossariesAsyncPager[source]¶ Lists glossaries in a project. Returns NOT_FOUND, if the project doesn’t exist.
- Parameters
request (
ListGlossariesRequest) – The request object. Request message for ListGlossaries.parent (
str) – Required. The name of the project from which to list all of the glossaries. This corresponds to theparentfield on therequestinstance; ifrequestis provided, this should not be set.filter (
str) – Optional. Filter specifying constraints of a list operation. Filtering is not supported yet, and the parameter currently has no effect. If missing, no filtering is performed. This corresponds to thefilterfield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for ListGlossaries. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
ListGlossariesAsyncPager
-
static
parse_glossary_path(path: str) → Dict[str, str]¶ Parse a glossary path into its component segments.
-
async
translate_text(request: google.cloud.translate_v3beta1.types.translation_service.TranslateTextRequest = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.types.translation_service.TranslateTextResponse[source]¶ Translates input text and returns translated text.
- Parameters
request (
TranslateTextRequest) – The request object. The request message for synchronous translation.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Return type
TranslateTextResponse
-
class
google.cloud.translate_v3beta1.services.translation_service.TranslationServiceClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Optional[Union[str, google.cloud.translate_v3beta1.services.translation_service.transports.base.TranslationServiceTransport]] = None, client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]¶ Provides natural language translation operations.
Instantiate the translation service client.
- Parameters
credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.
transport (Union[str, TranslationServiceTransport]) – The transport to use. If set to None, a transport is chosen automatically.
client_options (client_options_lib.ClientOptions) – Custom options for the client. It won’t take effect if a
transportinstance is provided. (1) Theapi_endpointproperty can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT environment variable can also be used to override the endpoint: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto switch to the default mTLS endpoint if client certificate is present, this is the default value). However, theapi_endpointproperty takes precedence if provided. (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then theclient_cert_sourceproperty can be used to provide client certificate for mutual TLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be 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.
- Raises
google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.
-
batch_translate_text(request: google.cloud.translate_v3beta1.types.translation_service.BatchTranslateTextRequest = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶ 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.
- Parameters
request (
BatchTranslateTextRequest) – The request object. The batch translation request.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be :class:
~.translation_service.BatchTranslateResponse: Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by BatchTranslateText if at least one sentence is translated successfully.- Return type
Operation
-
create_glossary(request: google.cloud.translate_v3beta1.types.translation_service.CreateGlossaryRequest = None, *, parent: str = None, glossary: google.cloud.translate_v3beta1.types.translation_service.Glossary = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶ Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn’t exist.
- Parameters
request (
CreateGlossaryRequest) – The request object. Request message for CreateGlossary.parent (
str) – Required. The project name. This corresponds to theparentfield on therequestinstance; ifrequestis provided, this should not be set.glossary (
Glossary) – Required. The glossary to create. This corresponds to theglossaryfield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be :class:
~.translation_service.Glossary: Represents a glossary built from user provided data.- Return type
Operation
-
delete_glossary(request: google.cloud.translate_v3beta1.types.translation_service.DeleteGlossaryRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.api_core.operation.Operation[source]¶ Deletes a glossary, or cancels glossary construction if the glossary isn’t created yet. Returns NOT_FOUND, if the glossary doesn’t exist.
- Parameters
request (
DeleteGlossaryRequest) – The request object. Request message for DeleteGlossary.name (
str) – Required. The name of the glossary to delete. This corresponds to thenamefield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
An object representing a long-running operation.
The result type for the operation will be :class:
~.translation_service.DeleteGlossaryResponse: Stored in the [google.longrunning.Operation.response][google.longrunning.Operation.response] field returned by DeleteGlossary.- Return type
Operation
-
detect_language(request: google.cloud.translate_v3beta1.types.translation_service.DetectLanguageRequest = None, *, parent: str = None, model: str = None, mime_type: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.types.translation_service.DetectLanguageResponse[source]¶ Detects the language of text within a request.
- Parameters
request (
DetectLanguageRequest) – The request object. The request message for language detection.parent (
str) –Required. Project or location to make a call. Must refer to a caller’s project.
Format:
projects/{project-id}/locations/{location-id}orprojects/{project-id}.For global calls, use
projects/{project-id}/locations/globalorprojects/{project-id}.Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned. This corresponds to the
parentfield on therequestinstance; ifrequestis provided, this should not be set.model (
str) –Optional. The language detection model to be used.
Format:
projects/{project-id}/locations/{location-id}/models/language-detection/{model-id}Only one language detection model is currently supported:
projects/{project-id}/locations/{location-id}/models/language-detection/default.If not specified, the default model is used. This corresponds to the
modelfield on therequestinstance; ifrequestis provided, this should not be set.mime_type (
str) – Optional. The format of the source text, for example, “text/html”, “text/plain”. If left blank, the MIME type defaults to “text/html”. This corresponds to themime_typefield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
The response message for language detection.
- Return type
DetectLanguageResponse
-
classmethod
from_service_account_file(filename: str, *args, **kwargs)[source]¶ Creates an instance of this client using the provided credentials file.
- Parameters
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
The constructed client.
- Return type
-
classmethod
from_service_account_json(filename: str, *args, **kwargs)¶ Creates an instance of this client using the provided credentials file.
- Parameters
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
The constructed client.
- Return type
-
get_glossary(request: google.cloud.translate_v3beta1.types.translation_service.GetGlossaryRequest = None, *, name: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.types.translation_service.Glossary[source]¶ Gets a glossary. Returns NOT_FOUND, if the glossary doesn’t exist.
- Parameters
request (
GetGlossaryRequest) – The request object. Request message for GetGlossary.name (
str) – Required. The name of the glossary to retrieve. This corresponds to thenamefield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Represents a glossary built from user provided data.
- Return type
Glossary
-
get_supported_languages(request: google.cloud.translate_v3beta1.types.translation_service.GetSupportedLanguagesRequest = None, *, parent: str = None, display_language_code: str = None, model: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.types.translation_service.SupportedLanguages[source]¶ Returns a list of supported languages for translation.
- Parameters
request (
GetSupportedLanguagesRequest) – The request object. The request message for discovering supported languages.parent (
str) –Required. Project or location to make a call. Must refer to a caller’s project.
Format:
projects/{project-id}orprojects/{project-id}/locations/{location-id}.For global calls, use
projects/{project-id}/locations/globalorprojects/{project-id}.Non-global location is required for AutoML models.
Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned. This corresponds to the
parentfield on therequestinstance; ifrequestis provided, this should not be set.display_language_code (
str) – Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response. This corresponds to thedisplay_language_codefield on therequestinstance; ifrequestis provided, this should not be set.model (
str) –Optional. Get supported languages of this model.
The format depends on model type:
AutoML Translation models:
projects/{project-id}/locations/{location-id}/models/{model-id}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 base (PBMT) model. This corresponds to the
modelfield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
The response message for discovering supported languages.
- Return type
SupportedLanguages
-
static
glossary_path(project: str, location: str, glossary: str) → str[source]¶ Return a fully-qualified glossary string.
-
list_glossaries(request: google.cloud.translate_v3beta1.types.translation_service.ListGlossariesRequest = None, *, parent: str = None, filter: str = None, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.services.translation_service.pagers.ListGlossariesPager[source]¶ Lists glossaries in a project. Returns NOT_FOUND, if the project doesn’t exist.
- Parameters
request (
ListGlossariesRequest) – The request object. Request message for ListGlossaries.parent (
str) – Required. The name of the project from which to list all of the glossaries. This corresponds to theparentfield on therequestinstance; ifrequestis provided, this should not be set.filter (
str) – Optional. Filter specifying constraints of a list operation. Filtering is not supported yet, and the parameter currently has no effect. If missing, no filtering is performed. This corresponds to thefilterfield on therequestinstance; ifrequestis provided, this should not be set.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
Response message for ListGlossaries. Iterating over this object will yield results and resolve additional pages automatically.
- Return type
ListGlossariesPager
-
static
parse_glossary_path(path: str) → Dict[str, str][source]¶ Parse a glossary path into its component segments.
-
translate_text(request: google.cloud.translate_v3beta1.types.translation_service.TranslateTextRequest = None, *, retry: google.api_core.retry.Retry = <object object>, timeout: float = None, metadata: Sequence[Tuple[str, str]] = ()) → google.cloud.translate_v3beta1.types.translation_service.TranslateTextResponse[source]¶ Translates input text and returns translated text.
- Parameters
request (
TranslateTextRequest) – The request object. The request message for synchronous translation.retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.
timeout (float) – The timeout for this request.
metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.
- Returns
- Return type
TranslateTextResponse