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

chore: use gapic-generator-python 0.62.1 #333

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ async def translate_text(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any(
[
Expand Down Expand Up @@ -457,7 +457,7 @@ async def detect_language(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, model, mime_type, content])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -578,7 +578,7 @@ async def get_supported_languages(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, model, display_language_code])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -844,7 +844,7 @@ async def batch_translate_document(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any(
[
Expand Down Expand Up @@ -946,7 +946,7 @@ async def create_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, glossary])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1030,7 +1030,7 @@ async def list_glossaries(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1117,7 +1117,7 @@ async def get_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1202,7 +1202,7 @@ async def delete_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down
16 changes: 8 additions & 8 deletions google/cloud/translate_v3/services/translation_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def translate_text(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any(
[
Expand Down Expand Up @@ -655,7 +655,7 @@ def detect_language(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, model, mime_type, content])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -776,7 +776,7 @@ def get_supported_languages(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, model, display_language_code])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1034,7 +1034,7 @@ def batch_translate_document(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any(
[
Expand Down Expand Up @@ -1136,7 +1136,7 @@ def create_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, glossary])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1220,7 +1220,7 @@ def list_glossaries(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1297,7 +1297,7 @@ def get_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1372,7 +1372,7 @@ def delete_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ def __init__(
if not self._grpc_channel:
self._grpc_channel = type(self).create_channel(
self._host,
# use the credentials which are saved
credentials=self._credentials,
credentials_file=credentials_file,
# Set ``credentials_file`` to ``None`` here as
# the credentials that we saved earlier should be used.
credentials_file=None,
scopes=self._scopes,
ssl_credentials=self._ssl_channel_credentials,
quota_project_id=quota_project_id,
Expand Down Expand Up @@ -235,7 +238,7 @@ def operations_client(self) -> operations_v1.OperationsClient:
This property caches on the instance; repeated calls return the same
client.
"""
# Sanity check: Only create a new client if we do not already have one.
# Quick check: Only create a new client if we do not already have one.
if self._operations_client is None:
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ def __init__(
if not self._grpc_channel:
self._grpc_channel = type(self).create_channel(
self._host,
# use the credentials which are saved
credentials=self._credentials,
credentials_file=credentials_file,
# Set ``credentials_file`` to ``None`` here as
# the credentials that we saved earlier should be used.
credentials_file=None,
scopes=self._scopes,
ssl_credentials=self._ssl_channel_credentials,
quota_project_id=quota_project_id,
Expand Down Expand Up @@ -237,7 +240,7 @@ def operations_client(self) -> operations_v1.OperationsAsyncClient:
This property caches on the instance; repeated calls return the same
client.
"""
# Sanity check: Only create a new client if we do not already have one.
# Quick check: Only create a new client if we do not already have one.
if self._operations_client is None:
self._operations_client = operations_v1.OperationsAsyncClient(
self.grpc_channel
Expand Down
5 changes: 3 additions & 2 deletions google/cloud/translate_v3/types/translation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ class TranslateTextGlossaryConfig(proto.Message):
- User provided custom glossary:
``projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}``
ignore_case (bool):
Optional. Indicates match is case-
nsensitive. Default value is false if missing.
Optional. Indicates match is
case-insensitive. Default value is false if
missing.
"""

glossary = proto.Field(proto.STRING, number=1,)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ async def detect_language(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, model, mime_type])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -445,7 +445,7 @@ async def get_supported_languages(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, display_language_code, model])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -625,11 +625,11 @@ async def batch_translate_document(
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Translates a large volume of documents 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.
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.
Expand Down Expand Up @@ -711,7 +711,7 @@ async def batch_translate_document(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any(
[
Expand Down Expand Up @@ -813,7 +813,7 @@ async def create_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, glossary])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -932,7 +932,7 @@ async def list_glossaries(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, filter])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1021,7 +1021,7 @@ async def get_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1106,7 +1106,7 @@ async def delete_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def detect_language(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, model, mime_type])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -644,7 +644,7 @@ def get_supported_languages(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, display_language_code, model])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -816,11 +816,11 @@ def batch_translate_document(
metadata: Sequence[Tuple[str, str]] = (),
) -> operation.Operation:
r"""Translates a large volume of documents 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.
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.
Expand Down Expand Up @@ -902,7 +902,7 @@ def batch_translate_document(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any(
[
Expand Down Expand Up @@ -1004,7 +1004,7 @@ def create_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, glossary])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1123,7 +1123,7 @@ def list_glossaries(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([parent, filter])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1202,7 +1202,7 @@ def get_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down Expand Up @@ -1277,7 +1277,7 @@ def delete_glossary(

"""
# Create or coerce a protobuf request object.
# Sanity check: If we got a request object, we should *not* have
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([name])
if request is not None and has_flattened_params:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ def __init__(
if not self._grpc_channel:
self._grpc_channel = type(self).create_channel(
self._host,
# use the credentials which are saved
credentials=self._credentials,
credentials_file=credentials_file,
# Set ``credentials_file`` to ``None`` here as
# the credentials that we saved earlier should be used.
credentials_file=None,
scopes=self._scopes,
ssl_credentials=self._ssl_channel_credentials,
quota_project_id=quota_project_id,
Expand Down Expand Up @@ -235,7 +238,7 @@ def operations_client(self) -> operations_v1.OperationsClient:
This property caches on the instance; repeated calls return the same
client.
"""
# Sanity check: Only create a new client if we do not already have one.
# Quick check: Only create a new client if we do not already have one.
if self._operations_client is None:
self._operations_client = operations_v1.OperationsClient(self.grpc_channel)

Expand Down Expand Up @@ -404,11 +407,11 @@ def batch_translate_document(
r"""Return a callable for the batch translate document method over gRPC.

Translates a large volume of documents 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.
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.
Expand Down
Loading