Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#255)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

fix: add 'dict' annotation type to 'request'

Committer: @busunkim96
PiperOrigin-RevId: 398509016

Source-Link: googleapis/googleapis@b224dfa

Source-Link: googleapis/googleapis-gen@63a1db7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Sep 24, 2021
1 parent aa38acb commit 6bbf390
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 78 deletions.
42 changes: 21 additions & 21 deletions google/cloud/translate_v3/services/translation_service/client.py
Expand Up @@ -17,7 +17,7 @@
from distutils import util
import os
import re
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib # type: ignore
Expand Down Expand Up @@ -357,7 +357,7 @@ def __init__(

def translate_text(
self,
request: translation_service.TranslateTextRequest = None,
request: Union[translation_service.TranslateTextRequest, dict] = None,
*,
parent: str = None,
target_language_code: str = None,
Expand All @@ -372,7 +372,7 @@ def translate_text(
r"""Translates input text and returns translated text.
Args:
request (google.cloud.translate_v3.types.TranslateTextRequest):
request (Union[google.cloud.translate_v3.types.TranslateTextRequest, dict]):
The request object. The request message for synchronous
translation.
parent (str):
Expand Down Expand Up @@ -527,7 +527,7 @@ def translate_text(

def detect_language(
self,
request: translation_service.DetectLanguageRequest = None,
request: Union[translation_service.DetectLanguageRequest, dict] = None,
*,
parent: str = None,
model: str = None,
Expand All @@ -540,7 +540,7 @@ def detect_language(
r"""Detects the language of text within a request.
Args:
request (google.cloud.translate_v3.types.DetectLanguageRequest):
request (Union[google.cloud.translate_v3.types.DetectLanguageRequest, dict]):
The request object. The request message for language
detection.
parent (str):
Expand Down Expand Up @@ -650,7 +650,7 @@ def detect_language(

def get_supported_languages(
self,
request: translation_service.GetSupportedLanguagesRequest = None,
request: Union[translation_service.GetSupportedLanguagesRequest, dict] = None,
*,
parent: str = None,
model: str = None,
Expand All @@ -663,7 +663,7 @@ def get_supported_languages(
translation.
Args:
request (google.cloud.translate_v3.types.GetSupportedLanguagesRequest):
request (Union[google.cloud.translate_v3.types.GetSupportedLanguagesRequest, dict]):
The request object. The request message for discovering
supported languages.
parent (str):
Expand Down Expand Up @@ -769,7 +769,7 @@ def get_supported_languages(

def translate_document(
self,
request: translation_service.TranslateDocumentRequest = None,
request: Union[translation_service.TranslateDocumentRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -778,7 +778,7 @@ def translate_document(
r"""Translates documents in synchronous mode.
Args:
request (google.cloud.translate_v3.types.TranslateDocumentRequest):
request (Union[google.cloud.translate_v3.types.TranslateDocumentRequest, dict]):
The request object. A document translation request.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -818,7 +818,7 @@ def translate_document(

def batch_translate_text(
self,
request: translation_service.BatchTranslateTextRequest = None,
request: Union[translation_service.BatchTranslateTextRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -835,7 +835,7 @@ def batch_translate_text(
of the call.
Args:
request (google.cloud.translate_v3.types.BatchTranslateTextRequest):
request (Union[google.cloud.translate_v3.types.BatchTranslateTextRequest, dict]):
The request object. The batch translation request.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -887,7 +887,7 @@ def batch_translate_text(

def batch_translate_document(
self,
request: translation_service.BatchTranslateDocumentRequest = None,
request: Union[translation_service.BatchTranslateDocumentRequest, dict] = None,
*,
retry: retries.Retry = gapic_v1.method.DEFAULT,
timeout: float = None,
Expand All @@ -904,7 +904,7 @@ def batch_translate_document(
the call.
Args:
request (google.cloud.translate_v3.types.BatchTranslateDocumentRequest):
request (Union[google.cloud.translate_v3.types.BatchTranslateDocumentRequest, dict]):
The request object. The BatchTranslateDocument request.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
Expand Down Expand Up @@ -956,7 +956,7 @@ def batch_translate_document(

def create_glossary(
self,
request: translation_service.CreateGlossaryRequest = None,
request: Union[translation_service.CreateGlossaryRequest, dict] = None,
*,
parent: str = None,
glossary: translation_service.Glossary = None,
Expand All @@ -968,7 +968,7 @@ def create_glossary(
Returns NOT_FOUND, if the project doesn't exist.
Args:
request (google.cloud.translate_v3.types.CreateGlossaryRequest):
request (Union[google.cloud.translate_v3.types.CreateGlossaryRequest, dict]):
The request object. Request message for CreateGlossary.
parent (str):
Required. The project name.
Expand Down Expand Up @@ -1044,7 +1044,7 @@ def create_glossary(

def list_glossaries(
self,
request: translation_service.ListGlossariesRequest = None,
request: Union[translation_service.ListGlossariesRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1055,7 +1055,7 @@ def list_glossaries(
doesn't exist.
Args:
request (google.cloud.translate_v3.types.ListGlossariesRequest):
request (Union[google.cloud.translate_v3.types.ListGlossariesRequest, dict]):
The request object. Request message for ListGlossaries.
parent (str):
Required. The name of the project
Expand Down Expand Up @@ -1124,7 +1124,7 @@ def list_glossaries(

def get_glossary(
self,
request: translation_service.GetGlossaryRequest = None,
request: Union[translation_service.GetGlossaryRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1135,7 +1135,7 @@ def get_glossary(
exist.
Args:
request (google.cloud.translate_v3.types.GetGlossaryRequest):
request (Union[google.cloud.translate_v3.types.GetGlossaryRequest, dict]):
The request object. Request message for GetGlossary.
name (str):
Required. The name of the glossary to
Expand Down Expand Up @@ -1195,7 +1195,7 @@ def get_glossary(

def delete_glossary(
self,
request: translation_service.DeleteGlossaryRequest = None,
request: Union[translation_service.DeleteGlossaryRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1207,7 +1207,7 @@ def delete_glossary(
doesn't exist.
Args:
request (google.cloud.translate_v3.types.DeleteGlossaryRequest):
request (Union[google.cloud.translate_v3.types.DeleteGlossaryRequest, dict]):
The request object. Request message for DeleteGlossary.
name (str):
Required. The name of the glossary to
Expand Down
Expand Up @@ -120,7 +120,7 @@ def __init__(
**scopes_kwargs, quota_project_id=quota_project_id
)

# If the credentials is service account credentials, then always try to use self signed JWT.
# If the credentials are service account credentials, then always try to use self signed JWT.
if (
always_use_jwt_access
and isinstance(credentials, service_account.Credentials)
Expand Down
Expand Up @@ -82,16 +82,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down
Expand Up @@ -129,16 +129,16 @@ def __init__(
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
``client_cert_source`` or applicatin default SSL credentials.
``client_cert_source`` or application default SSL credentials.
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
Deprecated. A callback to provide client SSL certificate bytes and
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if ``channel`` is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure mutual TLS channel. It is
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
Expand Down

0 comments on commit 6bbf390

Please sign in to comment.