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

Commit

Permalink
chore: use gapic-generator-python 0.51.2 (#256)
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 7b8adcf commit e75ada8
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 90 deletions.
20 changes: 5 additions & 15 deletions google/cloud/speech_v1/services/speech/client.py
Expand Up @@ -17,17 +17,7 @@
from distutils import util
import os
import re
from typing import (
Callable,
Dict,
Optional,
Iterable,
Iterator,
Sequence,
Tuple,
Type,
Union,
)
from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union
import pkg_resources

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

def recognize(
self,
request: cloud_speech.RecognizeRequest = None,
request: Union[cloud_speech.RecognizeRequest, dict] = None,
*,
config: cloud_speech.RecognitionConfig = None,
audio: cloud_speech.RecognitionAudio = None,
Expand All @@ -359,7 +349,7 @@ def recognize(
results after all audio has been sent and processed.
Args:
request (google.cloud.speech_v1.types.RecognizeRequest):
request (Union[google.cloud.speech_v1.types.RecognizeRequest, dict]):
The request object. The top-level message sent by the
client for the `Recognize` method.
config (google.cloud.speech_v1.types.RecognitionConfig):
Expand Down Expand Up @@ -425,7 +415,7 @@ def recognize(

def long_running_recognize(
self,
request: cloud_speech.LongRunningRecognizeRequest = None,
request: Union[cloud_speech.LongRunningRecognizeRequest, dict] = None,
*,
config: cloud_speech.RecognitionConfig = None,
audio: cloud_speech.RecognitionAudio = None,
Expand All @@ -441,7 +431,7 @@ def long_running_recognize(
`how-to <https://cloud.google.com/speech-to-text/docs/async-recognize>`__.
Args:
request (google.cloud.speech_v1.types.LongRunningRecognizeRequest):
request (Union[google.cloud.speech_v1.types.LongRunningRecognizeRequest, dict]):
The request object. The top-level message sent by the
client for the `LongRunningRecognize` method.
config (google.cloud.speech_v1.types.RecognitionConfig):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/speech_v1/services/speech/transports/base.py
Expand Up @@ -117,7 +117,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
6 changes: 3 additions & 3 deletions google/cloud/speech_v1/services/speech/transports/grpc.py
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
42 changes: 21 additions & 21 deletions google/cloud/speech_v1p1beta1/services/adaptation/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 @@ -368,7 +368,7 @@ def __init__(

def create_phrase_set(
self,
request: cloud_speech_adaptation.CreatePhraseSetRequest = None,
request: Union[cloud_speech_adaptation.CreatePhraseSetRequest, dict] = None,
*,
parent: str = None,
phrase_set: resource.PhraseSet = None,
Expand All @@ -383,7 +383,7 @@ def create_phrase_set(
when you send a call that includes the PhraseSet.
Args:
request (google.cloud.speech_v1p1beta1.types.CreatePhraseSetRequest):
request (Union[google.cloud.speech_v1p1beta1.types.CreatePhraseSetRequest, dict]):
The request object. Message sent by the client for the
`CreatePhraseSet` method.
parent (str):
Expand Down Expand Up @@ -466,7 +466,7 @@ def create_phrase_set(

def get_phrase_set(
self,
request: cloud_speech_adaptation.GetPhraseSetRequest = None,
request: Union[cloud_speech_adaptation.GetPhraseSetRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -476,7 +476,7 @@ def get_phrase_set(
r"""Get a phrase set.
Args:
request (google.cloud.speech_v1p1beta1.types.GetPhraseSetRequest):
request (Union[google.cloud.speech_v1p1beta1.types.GetPhraseSetRequest, dict]):
The request object. Message sent by the client for the
`GetPhraseSet` method.
name (str):
Expand Down Expand Up @@ -539,7 +539,7 @@ def get_phrase_set(

def list_phrase_set(
self,
request: cloud_speech_adaptation.ListPhraseSetRequest = None,
request: Union[cloud_speech_adaptation.ListPhraseSetRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -549,7 +549,7 @@ def list_phrase_set(
r"""List phrase sets.
Args:
request (google.cloud.speech_v1p1beta1.types.ListPhraseSetRequest):
request (Union[google.cloud.speech_v1p1beta1.types.ListPhraseSetRequest, dict]):
The request object. Message sent by the client for the
`ListPhraseSet` method.
parent (str):
Expand Down Expand Up @@ -620,7 +620,7 @@ def list_phrase_set(

def update_phrase_set(
self,
request: cloud_speech_adaptation.UpdatePhraseSetRequest = None,
request: Union[cloud_speech_adaptation.UpdatePhraseSetRequest, dict] = None,
*,
phrase_set: resource.PhraseSet = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -631,7 +631,7 @@ def update_phrase_set(
r"""Update a phrase set.
Args:
request (google.cloud.speech_v1p1beta1.types.UpdatePhraseSetRequest):
request (Union[google.cloud.speech_v1p1beta1.types.UpdatePhraseSetRequest, dict]):
The request object. Message sent by the client for the
`UpdatePhraseSet` method.
phrase_set (google.cloud.speech_v1p1beta1.types.PhraseSet):
Expand Down Expand Up @@ -705,7 +705,7 @@ def update_phrase_set(

def delete_phrase_set(
self,
request: cloud_speech_adaptation.DeletePhraseSetRequest = None,
request: Union[cloud_speech_adaptation.DeletePhraseSetRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -715,7 +715,7 @@ def delete_phrase_set(
r"""Delete a phrase set.
Args:
request (google.cloud.speech_v1p1beta1.types.DeletePhraseSetRequest):
request (Union[google.cloud.speech_v1p1beta1.types.DeletePhraseSetRequest, dict]):
The request object. Message sent by the client for the
`DeletePhraseSet` method.
name (str):
Expand Down Expand Up @@ -769,7 +769,7 @@ def delete_phrase_set(

def create_custom_class(
self,
request: cloud_speech_adaptation.CreateCustomClassRequest = None,
request: Union[cloud_speech_adaptation.CreateCustomClassRequest, dict] = None,
*,
parent: str = None,
custom_class: resource.CustomClass = None,
Expand All @@ -781,7 +781,7 @@ def create_custom_class(
r"""Create a custom class.
Args:
request (google.cloud.speech_v1p1beta1.types.CreateCustomClassRequest):
request (Union[google.cloud.speech_v1p1beta1.types.CreateCustomClassRequest, dict]):
The request object. Message sent by the client for the
`CreateCustomClass` method.
parent (str):
Expand Down Expand Up @@ -868,7 +868,7 @@ def create_custom_class(

def get_custom_class(
self,
request: cloud_speech_adaptation.GetCustomClassRequest = None,
request: Union[cloud_speech_adaptation.GetCustomClassRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -878,7 +878,7 @@ def get_custom_class(
r"""Get a custom class.
Args:
request (google.cloud.speech_v1p1beta1.types.GetCustomClassRequest):
request (Union[google.cloud.speech_v1p1beta1.types.GetCustomClassRequest, dict]):
The request object. Message sent by the client for the
`GetCustomClass` method.
name (str):
Expand Down Expand Up @@ -945,7 +945,7 @@ def get_custom_class(

def list_custom_classes(
self,
request: cloud_speech_adaptation.ListCustomClassesRequest = None,
request: Union[cloud_speech_adaptation.ListCustomClassesRequest, dict] = None,
*,
parent: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -955,7 +955,7 @@ def list_custom_classes(
r"""List custom classes.
Args:
request (google.cloud.speech_v1p1beta1.types.ListCustomClassesRequest):
request (Union[google.cloud.speech_v1p1beta1.types.ListCustomClassesRequest, dict]):
The request object. Message sent by the client for the
`ListCustomClasses` method.
parent (str):
Expand Down Expand Up @@ -1026,7 +1026,7 @@ def list_custom_classes(

def update_custom_class(
self,
request: cloud_speech_adaptation.UpdateCustomClassRequest = None,
request: Union[cloud_speech_adaptation.UpdateCustomClassRequest, dict] = None,
*,
custom_class: resource.CustomClass = None,
update_mask: field_mask_pb2.FieldMask = None,
Expand All @@ -1037,7 +1037,7 @@ def update_custom_class(
r"""Update a custom class.
Args:
request (google.cloud.speech_v1p1beta1.types.UpdateCustomClassRequest):
request (Union[google.cloud.speech_v1p1beta1.types.UpdateCustomClassRequest, dict]):
The request object. Message sent by the client for the
`UpdateCustomClass` method.
custom_class (google.cloud.speech_v1p1beta1.types.CustomClass):
Expand Down Expand Up @@ -1115,7 +1115,7 @@ def update_custom_class(

def delete_custom_class(
self,
request: cloud_speech_adaptation.DeleteCustomClassRequest = None,
request: Union[cloud_speech_adaptation.DeleteCustomClassRequest, dict] = None,
*,
name: str = None,
retry: retries.Retry = gapic_v1.method.DEFAULT,
Expand All @@ -1125,7 +1125,7 @@ def delete_custom_class(
r"""Delete a custom class.
Args:
request (google.cloud.speech_v1p1beta1.types.DeleteCustomClassRequest):
request (Union[google.cloud.speech_v1p1beta1.types.DeleteCustomClassRequest, dict]):
The request object. Message sent by the client for the
`DeleteCustomClass` method.
name (str):
Expand Down
Expand Up @@ -117,7 +117,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
20 changes: 5 additions & 15 deletions google/cloud/speech_v1p1beta1/services/speech/client.py
Expand Up @@ -17,17 +17,7 @@
from distutils import util
import os
import re
from typing import (
Callable,
Dict,
Optional,
Iterable,
Iterator,
Sequence,
Tuple,
Type,
Union,
)
from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union
import pkg_resources

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

def recognize(
self,
request: cloud_speech.RecognizeRequest = None,
request: Union[cloud_speech.RecognizeRequest, dict] = None,
*,
config: cloud_speech.RecognitionConfig = None,
audio: cloud_speech.RecognitionAudio = None,
Expand All @@ -391,7 +381,7 @@ def recognize(
results after all audio has been sent and processed.
Args:
request (google.cloud.speech_v1p1beta1.types.RecognizeRequest):
request (Union[google.cloud.speech_v1p1beta1.types.RecognizeRequest, dict]):
The request object. The top-level message sent by the
client for the `Recognize` method.
config (google.cloud.speech_v1p1beta1.types.RecognitionConfig):
Expand Down Expand Up @@ -457,7 +447,7 @@ def recognize(

def long_running_recognize(
self,
request: cloud_speech.LongRunningRecognizeRequest = None,
request: Union[cloud_speech.LongRunningRecognizeRequest, dict] = None,
*,
config: cloud_speech.RecognitionConfig = None,
audio: cloud_speech.RecognitionAudio = None,
Expand All @@ -473,7 +463,7 @@ def long_running_recognize(
`how-to <https://cloud.google.com/speech-to-text/docs/async-recognize>`__.
Args:
request (google.cloud.speech_v1p1beta1.types.LongRunningRecognizeRequest):
request (Union[google.cloud.speech_v1p1beta1.types.LongRunningRecognizeRequest, dict]):
The request object. The top-level message sent by the
client for the `LongRunningRecognize` method.
config (google.cloud.speech_v1p1beta1.types.RecognitionConfig):
Expand Down

0 comments on commit e75ada8

Please sign in to comment.