8000 chore: Use gapic-generator-python 0.65.0 (#359) · googleapis/google-cloud-python@1e757fe · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e757fe

Browse files
chore: Use gapic-generator-python 0.65.0 (#359)
* chore: Use gapic-generator-python 0.65.0 PiperOrigin-RevId: 440970084 Source-Link: googleapis/googleapis@5e0a3d5 Source-Link: googleapis/googleapis-gen@b0c628a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 2daaf49 commit 1e757fe

File tree

15 files changed

+124
-34
lines changed

15 files changed

+124
-34
lines changed

packages/google-cloud-python-speech/google/cloud/speech_v1/services/speech/async_client.py

Lines changed: 3 additions & 7 deletions
6D47
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import re
1919
from typing import (
2020
Dict,
21+
Mapping,
2122
Optional,
2223
AsyncIterable,
2324
Awaitable,
@@ -220,7 +221,6 @@ async def recognize(
220221
r"""Performs synchronous speech recognition: receive
221222
results after all audio has been sent and processed.
222223
223-
224224
.. code-block:: python
225225
226226
from google.cloud import speech_v1
@@ -307,8 +307,7 @@ def sample_recognize():
307307
maximum=60.0,
308308
multiplier=1.3,
309309
predicate=retries.if_exception_type(
310-
core_exceptions.DeadlineExceeded,
311-
core_exceptions.ServiceUnavailable,
310+
core_exceptions.GoogleAPICallError,
312311
),
313312
deadline=5000.0,
314313
),
@@ -344,7 +343,6 @@ async def long_running_recognize(
344343
on asynchronous speech recognition, see the
345344
`how-to <https://cloud.google.com/speech-to-text/docs/async-recognize>`__.
346345
347-
348346
.. code-block:: python
349347
350348
from google.cloud import speech_v1
@@ -470,7 +468,6 @@ def streaming_recognize(
470468
receive results while sending audio. This method is only
471469
available via the gRPC API (not REST).
472470
473-
474471
.. code-block:: python
475472
476473
from google.cloud import speech_v1
@@ -593,8 +590,7 @@ def request_generator():
593590
maximum=60.0,
594591
multiplier=1.3,
595592
predicate=retries.if_exception_type(
596-
core_exceptions.DeadlineExceeded,
597-
core_exceptions.ServiceUnavailable,
593+
core_exceptions.GoogleAPICallError,
598594
),
599595
deadline=5000.0,
600596
),

packages/google-cloud-python-speech/google/cloud/speech_v1/services/speech/client.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
Optional,
23+
Iterable,
24+
Iterator,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
2030
import pkg_resources
2131

2232
from google.api_core import client_options as client_options_lib
@@ -462,7 +472,6 @@ def recognize(
462472
r"""Performs synchronous speech recognition: receive
463473
results after all audio has been sent and processed.
464474
465-
466475
.. code-block:: python
467476
468477
from google.cloud import speech_v1
@@ -576,7 +585,6 @@ def long_running_recognize(
576585
on asynchronous speech recognition, see the
577586
`how-to <https://cloud.google.com/speech-to-text/docs/async-recognize>`__.
578587
579-
580588
.. code-block:: python
581589
582590
from google.cloud import speech_v1
@@ -702,7 +710,6 @@ def streaming_recognize(
702710
receive results while sending audio. This method is only
703711
available via the gRPC API (not REST).
704712
705-
706713
.. code-block:: python
707714
708715
from google.cloud import speech_v1

packages/google-cloud-python-speech/google/cloud/speech_v1/services/speech/transports/base.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def __init__(
8282
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8383
be used for service account credentials.
8484
"""
85+
8586
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
8687
if ":" not in host:
8788
host += ":443"
@@ -129,8 +130,7 @@ def _prep_wrapped_messages(self, client_info):
129130
maximum=60.0,
130131
multiplier=1.3,
131132
predicate=retries.if_exception_type(
132-
core_exceptions.DeadlineExceeded,
133-
core_exceptions.ServiceUnavailable,
133+
core_exceptions.GoogleAPICallError,
134134
),
135135
deadline=5000.0,
136136
),
@@ -149,8 +149,7 @@ def _prep_wrapped_messages(self, client_info):
149149
maximum=60.0,
150150
multiplier=1.3,
151151
predicate=retries.if_exception_type(
152-
core_exceptions.DeadlineExceeded,
153-
core_exceptions.ServiceUnavailable,
152+
core_exceptions.GoogleAPICallError,
154153
),
155154
deadline=5000.0,
156155
),
@@ -205,5 +204,9 @@ def streaming_recognize(
205204
]:
206205
raise NotImplementedError()
207206

207+
@property
208+
def kind(self) -> str:
209+
raise NotImplementedError()
210+
208211

209212
__all__ = ("SpeechTransport",)

packages/google-cloud-python-speech/google/cloud/speech_v1/services/speech/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,5 +336,9 @@ def streaming_recognize(
336336
def close(self):
337337
self.grpc_channel.close()
338338

339+
@property
340+
def kind(self) -> str:
341+
return "grpc"
342+
339343

340344
__all__ = ("SpeechGrpcTransport",)

packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/services/adaptation/async_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core.client_options import ClientOptions
@@ -216,7 +216,6 @@ async def create_phrase_set(
216216
in the PhraseSet are favored by the recognition model
217217
when you send a call that includes the PhraseSet.
218218
219-
220219
.. code-block:: python
221220
222221
from google.cloud import speech_v1p1beta1

packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/services/adaptation/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Optional, Sequence, Tuple, Type, Union
19+
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

2222
from google.api_core import client_options as client_options_lib
@@ -464,7 +464,6 @@ def create_phrase_set(
464464
in the PhraseSet are favored by the recognition model
465465
when you send a call that includes the PhraseSet.
466466
467-
468467
.. code-block:: python
469468
470469
from google.cloud import speech_v1p1beta1

packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/services/adaptation/transports/base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def __init__(
8282
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
8383
be used for service account credentials.
8484
"""
85+
8586
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
8687
if ":" not in host:
8788
host += ":443"
@@ -279,5 +280,9 @@ def delete_custom_class(
279280
]:
280281
raise NotImplementedError()
281282

283+
@property
284+
def kind(self) -> str:
285+
raise NotImplementedError()
286+
282287

283288
__all__ = ("AdaptationTransport",)

packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/services/adaptation/transports/grpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,5 +507,9 @@ def delete_custom_class(
507507
def close(self):
508508
self.grpc_channel.close()
509509

510+
@property
511+
def kind(self) -> str:
512+
return "grpc"
513+
510514

511515
__all__ = ("AdaptationGrpcTransport",)

packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/services/speech/async_client.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import re
1919
from typing import (
2020
Dict,
21+
Mapping,
2122
Optional,
2223
AsyncIterable,
2324
Awaitable,
@@ -220,7 +221,6 @@ async def recognize(
220221
r"""Performs synchronous speech recognition: receive
221222
results after all audio has been sent and processed.
222223
223-
224224
.. code-block:: python
225225
226226
from google.cloud import speech_v1p1beta1
@@ -307,8 +307,7 @@ def sample_recognize():
307307
maximum=60.0,
308308
multiplier=1.3,
309309
predicate=retries.if_exception_type(
310-
core_exceptions.DeadlineExceeded,
311-
core_exceptions.ServiceUnavailable,
310+
core_exceptions.GoogleAPICallError,
312311
),
313312
deadline=5000.0,
314313
),
@@ -344,7 +343,6 @@ async def long_running_recognize(
344343
on asynchronous speech recognition, see the
345344
`how-to <https://cloud.google.com/speech-to-text/docs/async-recognize>`__.
346345
347-
348346
.. code-block:: python
349347
350348
from google.cloud import speech_v1p1beta1
@@ -470,7 +468,6 @@ def streaming_recognize(
470468
receive results while sending audio. This method is only
471469
available via the gRPC API (not REST).
472470
473-
474471
.. code-block:: python
475472
476473
from google.cloud import speech_v1p1beta1
@@ -593,8 +590,7 @@ def request_generator():
593590
maximum=60.0,
594591
multiplier=1.3,
595592
predicate=retries.if_exception_type(
596-
core_exceptions.DeadlineExceeded,
597-
core_exceptions.ServiceUnavailable,
593+
core_exceptions.GoogleAPICallError,
598594
),
599595
deadline=5000.0,
600596
),

packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/services/speech/client.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Optional, Iterable, Iterator, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
Optional,
23+
Iterable,
24+
Iterator,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
2030
import pkg_resources
2131

2232
from google.api_core import client_options as client_options_lib
@@ -462,7 +472,6 @@ def recognize(
462472
r"""Performs synchronous speech recognition: receive
463473
results after all audio has been sent and processed.
464474
465-
466475
.. code-block:: python
467476
468477
from google.cloud import speech_v1p1beta1
@@ -576,7 +585,6 @@ def long_running_recognize(
576585
on asynchronous speech recognition, see the
577586
`how-to <https://cloud.google.com/speech-to-text/docs/async-recognize>`__.
578587
579-
580588
.. code-block:: python
581589
582590
from google.cloud import speech_v1p1beta1
@@ -702,7 +710,6 @@ def streaming_recognize(
702710
receive results while sending audio. This method is only
703711
available via the gRPC API (not REST).
704712
705-
706713
.. code-block:: python
707714
708715
from google.cloud import speech_v1p1beta1

0 commit comments

Comments
 (0)
0