Skip to content

Commit 43ef51c

Browse files
chore: [Many APIs] Update gapic-generator-python to v1.19.1 (googleapis#13158)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 684571179 Source-Link: googleapis/googleapis@fbdc238 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3a2cdcfb80c2d0f5ec0cc663c2bab0a9486229d0 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiM2EyY2RjZmI4MGMyZDBmNWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiM2EyY2RjZmI4MGMyZDBmNWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRyYWNlLy5Pd2xCb3QueWFtbCIsImgiOiIzYTJjZGNmYjgwYzJkMGY1ZWMwY2M2NjNjMmJhYjBhOTQ4NjIyOWQwIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRyYW5zbGF0ZS8uT3dsQm90LnlhbWwiLCJoIjoiM2EyY2RjZmI4MGMyZDBmNWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLWxpdmUtc3RyZWFtLy5Pd2xCb3QueWFtbCIsImgiOiIzYTJjZGNmYjgwYzJkMGY1ZWMwY2M2NjNjMmJhYjBhOTQ4NjIyOWQwIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXN0aXRjaGVyLy5Pd2xCb3QueWFtbCIsImgiOiIzYTJjZGNmYjgwYzJkMGY1ZWMwY2M2NjNjMmJhYjBhOTQ4NjIyOWQwI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authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent af4544f commit 43ef51c

File tree

394 files changed

+256096
-193309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

394 files changed

+256096
-193309
lines changed

packages/google-cloud-texttospeech/google/cloud/texttospeech/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.18.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "2.18.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/async_client.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -620,11 +620,7 @@ async def list_operations(
620620

621621
# Wrap the RPC method; this adds retry and timeout information,
622622
# and friendly error handling.
623-
rpc = gapic_v1.method_async.wrap_method(
624-
self._client._transport.list_operations,
625-
default_timeout=None,
626-
client_info=DEFAULT_CLIENT_INFO,
627-
)
623+
rpc = self.transport._wrapped_methods[self._client._transport.list_operations]
628624

629625
# Certain fields should be provided within the metadata header;
630626
# add these here.
@@ -677,11 +673,7 @@ async def get_operation(
677673

678674
# Wrap the RPC method; this adds retry and timeout information,
679675
# and friendly error handling.
680-
rpc = gapic_v1.method_async.wrap_method(
681-
self._client._transport.get_operation,
682-
default_timeout=None,
683-
client_info=DEFAULT_CLIENT_INFO,
684-
)
676+
rpc = self.transport._wrapped_methods[self._client._transport.get_operation]
685677

686678
# Certain fields should be provided within the metadata header;
687679
# add these here.

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/client.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,7 @@ def list_operations(
10461046

10471047
# Wrap the RPC method; this adds retry and timeout information,
10481048
# and friendly error handling.
1049-
rpc = gapic_v1.method.wrap_method(
1050-
self._transport.list_operations,
1051-
default_timeout=None,
1052-
client_info=DEFAULT_CLIENT_INFO,
1053-
)
1049+
rpc = self._transport._wrapped_methods[self._transport.list_operations]
10541050

10551051
# Certain fields should be provided within the metadata header;
10561052
# add these here.
@@ -1103,11 +1099,7 @@ def get_operation(
11031099

11041100
# Wrap the RPC method; this adds retry and timeout information,
11051101
# and friendly error handling.
1106-
rpc = gapic_v1.method.wrap_method(
1107-
self._transport.get_operation,
1108-
default_timeout=None,
1109-
client_info=DEFAULT_CLIENT_INFO,
1110-
)
1102+
rpc = self._transport._wrapped_methods[self._transport.get_operation]
11111103

11121104
# Certain fields should be provided within the metadata header;
11131105
# add these here.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
transport inheritance structure
3+
_______________________________
4+
5+
`TextToSpeechTransport` is the ABC for all transports.
6+
- public child `TextToSpeechGrpcTransport` for sync gRPC transport (defined in `grpc.py`).
7+
- public child `TextToSpeechGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`).
8+
- private child `_BaseTextToSpeechRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`).
9+
- public child `TextToSpeechRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`).

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/base.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ def _prep_wrapped_messages(self, client_info):
144144
default_timeout=None,
145145
client_info=client_info,
146146
),
147+
self.get_operation: gapic_v1.method.wrap_method(
148+
self.get_operation,
149+
default_timeout=None,
150+
client_info=client_info,
151+
),
152+
self.list_operations: gapic_v1.method.wrap_method(
153+
self.list_operations,
154+
default_timeout=None,
155+
client_info=client_info,
156+
),
147157
}
148158

149159
def close(self):

packages/google-cloud-texttospeech/google/cloud/texttospeech_v1/services/text_to_speech/transports/grpc_asyncio.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
import inspect
1617
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
1718
import warnings
1819

@@ -227,6 +228,9 @@ def __init__(
227228
)
228229

229230
# Wrap messages. This must be done after self._grpc_channel exists
231+
self._wrap_with_kind = (
232+
"kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters
233+
)
230234
self._prep_wrapped_messages(client_info)
231235

232236
@property
@@ -330,26 +334,45 @@ def streaming_synthesize(
330334
def _prep_wrapped_messages(self, client_info):
331335
"""Precompute the wrapped methods, overriding the base class method to use async wrappers."""
332336
self._wrapped_methods = {
333-
self.list_voices: gapic_v1.method_async.wrap_method(
337+
self.list_voices: self._wrap_method(
334338
self.list_voices,
335339
default_timeout=None,
336340
client_info=client_info,
337341
),
338-
self.synthesize_speech: gapic_v1.method_async.wrap_method(
342+
self.synthesize_speech: self._wrap_method(
339343
self.synthesize_speech,
340344
default_timeout=None,
341345
client_info=client_info,
342346
),
343-
self.streaming_synthesize: gapic_v1.method_async.wrap_method(
347+
self.streaming_synthesize: self._wrap_method(
344348
self.streaming_synthesize,
345349
default_timeout=None,
346350
client_info=client_info,
347351
),
352+
self.get_operation: self._wrap_method(
353+
self.get_operation,
354+
default_timeout=None,
355+
client_info=client_info,
356+
),
357+
self.list_operations: self._wrap_method(
358+
self.list_operations,
359+
default_timeout=None,
360+
client_info=client_info,
361+
),
348362
}
349363

364+
def _wrap_method(self, func, *args, **kwargs):
365+
if self._wrap_with_kind: # pragma: NO COVER
366+
kwargs["kind"] = self.kind
367+
return gapic_v1.method_async.wrap_method(func, *args, **kwargs)
368+
350369
def close(self):
351370
return self.grpc_channel.close()
352371

372+
@property
373+
def kind(self) -> str:
374+
return "grpc_asyncio"
375+
353376
@property
354377
def get_operation(
355378
self,

0 commit comments

Comments
 (0)