Skip to content

Commit

Permalink
chore: [Many APIs] Update gapic-generator-python to v1.19.1 (#13152)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 684571179

Source-Link:
googleapis/googleapis@fbdc238

Source-Link:
googleapis/googleapis-gen@3a2cdcf
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiM2EyY2RjZmI4MGMyZDBmNWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWxvZ2dpbmcvLk93bEJvdC55YW1sIiwiaCI6IjNhMmNkY2ZiODBjMmQwZjVlYzBjYzY2M2MyYmFiMGE5NDg2MjI5ZDAifQ==
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LW1pZ3JhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiM2EyY2RjZmI4MGMyZDBmNWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXJlc2VydmF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiIzYTJjZGNmYjgwYzJkMGY1ZWMwY2M2NjNjMmJhYjBhOTQ4NjIyOWQwIn0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbGxpbmctYnVkZ2V0cy8uT3dsQm90LnlhbWwiLCJoIjoiM2EyY2RjZmI4MGMyZDBmNWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbGxpbmcvLk93bEJvdC55YW1sIiwiaCI6IjNhMmNkY2ZiOD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d2xCb3QueWFtbCIsImgiOiIzYTJjZGNmYjgwYzJkMGY1ZWMwY2M2NjNjMmJhYjBhOTQ4NjIyOWQwIn0=

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Oct 11, 2024
1 parent a341b84 commit 78a8560
Show file tree
Hide file tree
Showing 626 changed files with 394,435 additions and 390,951 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "3.16.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "3.16.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -2108,11 +2108,7 @@ async def get_location(

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.get_location,
default_timeout=None,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self.transport._wrapped_methods[self._client._transport.get_location]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down Expand Up @@ -2165,11 +2161,7 @@ async def list_locations(

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method_async.wrap_method(
self._client._transport.list_locations,
default_timeout=None,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self.transport._wrapped_methods[self._client._transport.list_locations]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2532,11 +2532,7 @@ def get_location(

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method.wrap_method(
self._transport.get_location,
default_timeout=None,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self._transport._wrapped_methods[self._transport.get_location]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down Expand Up @@ -2589,11 +2585,7 @@ def list_locations(

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
rpc = gapic_v1.method.wrap_method(
self._transport.list_locations,
default_timeout=None,
client_info=DEFAULT_CLIENT_INFO,
)
rpc = self._transport._wrapped_methods[self._transport.list_locations]

# Certain fields should be provided within the metadata header;
# add these here.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

transport inheritance structure
_______________________________

`DataTransferServiceTransport` is the ABC for all transports.
- public child `DataTransferServiceGrpcTransport` for sync gRPC transport (defined in `grpc.py`).
- public child `DataTransferServiceGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`).
- private child `_BaseDataTransferServiceRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`).
- public child `DataTransferServiceRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`).
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,16 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=None,
client_info=client_info,
),
self.get_location: gapic_v1.method.wrap_method(
self.get_location,
default_timeout=None,
client_info=client_info,
),
self.list_locations: gapic_v1.method.wrap_method(
self.list_locations,
default_timeout=None,
client_info=client_info,
),
}

def close(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import inspect
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
import warnings

Expand Down Expand Up @@ -229,6 +230,9 @@ def __init__(
)

# Wrap messages. This must be done after self._grpc_channel exists
self._wrap_with_kind = (
"kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters
)
self._prep_wrapped_messages(client_info)

@property
Expand Down Expand Up @@ -724,7 +728,7 @@ def unenroll_data_sources(
def _prep_wrapped_messages(self, client_info):
"""Precompute the wrapped methods, overriding the base class method to use async wrappers."""
self._wrapped_methods = {
self.get_data_source: gapic_v1.method_async.wrap_method(
self.get_data_source: self._wrap_method(
self.get_data_source,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -739,7 +743,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.list_data_sources: gapic_v1.method_async.wrap_method(
self.list_data_sources: self._wrap_method(
self.list_data_sources,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -754,17 +758,17 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.create_transfer_config: gapic_v1.method_async.wrap_method(
self.create_transfer_config: self._wrap_method(
self.create_transfer_config,
default_timeout=30.0,
client_info=client_info,
),
self.update_transfer_config: gapic_v1.method_async.wrap_method(
self.update_transfer_config: self._wrap_method(
self.update_transfer_config,
default_timeout=30.0,
client_info=client_info,
),
self.delete_transfer_config: gapic_v1.method_async.wrap_method(
self.delete_transfer_config: self._wrap_method(
self.delete_transfer_config,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -779,7 +783,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.get_transfer_config: gapic_v1.method_async.wrap_method(
self.get_transfer_config: self._wrap_method(
self.get_transfer_config,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -794,7 +798,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.list_transfer_configs: gapic_v1.method_async.wrap_method(
self.list_transfer_configs: self._wrap_method(
self.list_transfer_configs,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -809,17 +813,17 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.schedule_transfer_runs: gapic_v1.method_async.wrap_method(
self.schedule_transfer_runs: self._wrap_method(
self.schedule_transfer_runs,
default_timeout=30.0,
client_info=client_info,
),
self.start_manual_transfer_runs: gapic_v1.method_async.wrap_method(
self.start_manual_transfer_runs: self._wrap_method(
self.start_manual_transfer_runs,
default_timeout=None,
client_info=client_info,
),
self.get_transfer_run: gapic_v1.method_async.wrap_method(
self.get_transfer_run: self._wrap_method(
self.get_transfer_run,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -834,7 +838,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.delete_transfer_run: gapic_v1.method_async.wrap_method(
self.delete_transfer_run: self._wrap_method(
self.delete_transfer_run,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -849,7 +853,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.list_transfer_runs: gapic_v1.method_async.wrap_method(
self.list_transfer_runs: self._wrap_method(
self.list_transfer_runs,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -864,7 +868,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.list_transfer_logs: gapic_v1.method_async.wrap_method(
self.list_transfer_logs: self._wrap_method(
self.list_transfer_logs,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -879,7 +883,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.check_valid_creds: gapic_v1.method_async.wrap_method(
self.check_valid_creds: self._wrap_method(
self.check_valid_creds,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -894,21 +898,40 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=20.0,
client_info=client_info,
),
self.enroll_data_sources: gapic_v1.method_async.wrap_method(
self.enroll_data_sources: self._wrap_method(
self.enroll_data_sources,
default_timeout=None,
client_info=client_info,
),
self.unenroll_data_sources: gapic_v1.method_async.wrap_method(
self.unenroll_data_sources: self._wrap_method(
self.unenroll_data_sources,
default_timeout=None,
client_info=client_info,
),
self.get_location: self._wrap_method(
self.get_location,
default_timeout=None,
client_info=client_info,
),
self.list_locations: self._wrap_method(
self.list_locations,
default_timeout=None,
client_info=client_info,
),
}

def _wrap_method(self, func, *args, **kwargs):
if self._wrap_with_kind: # pragma: NO COVER
kwargs["kind"] = self.kind
return gapic_v1.method_async.wrap_method(func, *args, **kwargs)

def close(self):
return self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc_asyncio"

@property
def list_locations(
self,
Expand Down
Loading

0 comments on commit 78a8560

Please sign in to comment.