-
Notifications
You must be signed in to change notification settings - Fork 104
chore: librarian update image pull request: 20260325T185910Z #1532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+815
−336
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -45,15 +45,16 @@ | |||||||||||||||
| except AttributeError: # pragma: NO COVER | ||||||||||||||||
| OptionalRetry = Union[retries.AsyncRetry, object, None] # type: ignore | ||||||||||||||||
|
|
||||||||||||||||
| from google.api_core import operation # type: ignore | ||||||||||||||||
| from google.api_core import operation_async # type: ignore | ||||||||||||||||
| from google.iam.v1 import iam_policy_pb2 # type: ignore | ||||||||||||||||
| from google.iam.v1 import policy_pb2 # type: ignore | ||||||||||||||||
| import google.api_core.operation as operation # type: ignore | ||||||||||||||||
| import google.api_core.operation_async as operation_async # type: ignore | ||||||||||||||||
| import google.iam.v1.iam_policy_pb2 as iam_policy_pb2 # type: ignore | ||||||||||||||||
| import google.iam.v1.policy_pb2 as policy_pb2 # type: ignore | ||||||||||||||||
| from google.longrunning import operations_pb2 # type: ignore | ||||||||||||||||
| from google.protobuf import duration_pb2 # type: ignore | ||||||||||||||||
| from google.protobuf import empty_pb2 # type: ignore | ||||||||||||||||
| from google.protobuf import field_mask_pb2 # type: ignore | ||||||||||||||||
| from google.protobuf import timestamp_pb2 # type: ignore | ||||||||||||||||
| import google.longrunning.operations_pb2 as operations_pb2 # type: ignore | ||||||||||||||||
|
Comment on lines
52
to
+53
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||||||||||||
| import google.protobuf.duration_pb2 as duration_pb2 # type: ignore | ||||||||||||||||
| import google.protobuf.empty_pb2 as empty_pb2 # type: ignore | ||||||||||||||||
| import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore | ||||||||||||||||
| import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore | ||||||||||||||||
|
|
||||||||||||||||
| from google.cloud.spanner_admin_database_v1.services.database_admin import pagers | ||||||||||||||||
| from google.cloud.spanner_admin_database_v1.types import common, spanner_database_admin | ||||||||||||||||
|
|
@@ -160,7 +161,10 @@ def from_service_account_info(cls, info: dict, *args, **kwargs): | |||||||||||||||
| Returns: | ||||||||||||||||
| DatabaseAdminAsyncClient: The constructed client. | ||||||||||||||||
| """ | ||||||||||||||||
| return DatabaseAdminClient.from_service_account_info.__func__(DatabaseAdminAsyncClient, info, *args, **kwargs) # type: ignore | ||||||||||||||||
| sa_info_func = ( | ||||||||||||||||
| DatabaseAdminClient.from_service_account_info.__func__ # type: ignore | ||||||||||||||||
| ) | ||||||||||||||||
| return sa_info_func(DatabaseAdminAsyncClient, info, *args, **kwargs) | ||||||||||||||||
|
|
||||||||||||||||
| @classmethod | ||||||||||||||||
| def from_service_account_file(cls, filename: str, *args, **kwargs): | ||||||||||||||||
|
|
@@ -176,7 +180,10 @@ def from_service_account_file(cls, filename: str, *args, **kwargs): | |||||||||||||||
| Returns: | ||||||||||||||||
| DatabaseAdminAsyncClient: The constructed client. | ||||||||||||||||
| """ | ||||||||||||||||
| return DatabaseAdminClient.from_service_account_file.__func__(DatabaseAdminAsyncClient, filename, *args, **kwargs) # type: ignore | ||||||||||||||||
| sa_file_func = ( | ||||||||||||||||
| DatabaseAdminClient.from_service_account_file.__func__ # type: ignore | ||||||||||||||||
| ) | ||||||||||||||||
| return sa_file_func(DatabaseAdminAsyncClient, filename, *args, **kwargs) | ||||||||||||||||
|
|
||||||||||||||||
| from_service_account_json = from_service_account_file | ||||||||||||||||
|
|
||||||||||||||||
|
|
@@ -226,7 +233,7 @@ def transport(self) -> DatabaseAdminTransport: | |||||||||||||||
| return self._client.transport | ||||||||||||||||
|
|
||||||||||||||||
| @property | ||||||||||||||||
| def api_endpoint(self): | ||||||||||||||||
| def api_endpoint(self) -> str: | ||||||||||||||||
| """Return the API endpoint used by the client instance. | ||||||||||||||||
|
|
||||||||||||||||
| Returns: | ||||||||||||||||
|
|
@@ -1327,7 +1334,7 @@ async def set_iam_policy( | |||||||||||||||
| # client as shown in: | ||||||||||||||||
| # https://googleapis.dev/python/google-api-core/latest/client_options.html | ||||||||||||||||
| from google.cloud import spanner_admin_database_v1 | ||||||||||||||||
| from google.iam.v1 import iam_policy_pb2 # type: ignore | ||||||||||||||||
| import google.iam.v1.iam_policy_pb2 as iam_policy_pb2 # type: ignore | ||||||||||||||||
|
|
||||||||||||||||
| async def sample_set_iam_policy(): | ||||||||||||||||
| # Create a client | ||||||||||||||||
|
|
@@ -1474,7 +1481,7 @@ async def get_iam_policy( | |||||||||||||||
| # client as shown in: | ||||||||||||||||
| # https://googleapis.dev/python/google-api-core/latest/client_options.html | ||||||||||||||||
| from google.cloud import spanner_admin_database_v1 | ||||||||||||||||
| from google.iam.v1 import iam_policy_pb2 # type: ignore | ||||||||||||||||
| import google.iam.v1.iam_policy_pb2 as iam_policy_pb2 # type: ignore | ||||||||||||||||
|
|
||||||||||||||||
| async def sample_get_iam_policy(): | ||||||||||||||||
| # Create a client | ||||||||||||||||
|
|
@@ -1622,7 +1629,7 @@ async def test_iam_permissions( | |||||||||||||||
| # client as shown in: | ||||||||||||||||
| # https://googleapis.dev/python/google-api-core/latest/client_options.html | ||||||||||||||||
| from google.cloud import spanner_admin_database_v1 | ||||||||||||||||
| from google.iam.v1 import iam_policy_pb2 # type: ignore | ||||||||||||||||
| import google.iam.v1.iam_policy_pb2 as iam_policy_pb2 # type: ignore | ||||||||||||||||
|
|
||||||||||||||||
| async def sample_test_iam_permissions(): | ||||||||||||||||
| # Create a client | ||||||||||||||||
|
|
@@ -3980,7 +3987,7 @@ async def sample_internal_update_graph_operation(): | |||||||||||||||
|
|
||||||||||||||||
| async def list_operations( | ||||||||||||||||
| self, | ||||||||||||||||
| request: Optional[operations_pb2.ListOperationsRequest] = None, | ||||||||||||||||
| request: Optional[Union[operations_pb2.ListOperationsRequest, dict]] = None, | ||||||||||||||||
| *, | ||||||||||||||||
| retry: OptionalRetry = gapic_v1.method.DEFAULT, | ||||||||||||||||
| timeout: Union[float, object] = gapic_v1.method.DEFAULT, | ||||||||||||||||
|
|
@@ -4006,8 +4013,12 @@ async def list_operations( | |||||||||||||||
| # Create or coerce a protobuf request object. | ||||||||||||||||
| # The request isn't a proto-plus wrapped type, | ||||||||||||||||
| # so it must be constructed via keyword expansion. | ||||||||||||||||
| if isinstance(request, dict): | ||||||||||||||||
| request = operations_pb2.ListOperationsRequest(**request) | ||||||||||||||||
| if request is None: | ||||||||||||||||
| request_pb = operations_pb2.ListOperationsRequest() | ||||||||||||||||
| elif isinstance(request, dict): | ||||||||||||||||
| request_pb = operations_pb2.ListOperationsRequest(**request) | ||||||||||||||||
| else: | ||||||||||||||||
| request_pb = request | ||||||||||||||||
|
|
||||||||||||||||
| # Wrap the RPC method; this adds retry and timeout information, | ||||||||||||||||
| # and friendly error handling. | ||||||||||||||||
|
|
@@ -4016,15 +4027,15 @@ async def list_operations( | |||||||||||||||
| # Certain fields should be provided within the metadata header; | ||||||||||||||||
| # add these here. | ||||||||||||||||
| metadata = tuple(metadata) + ( | ||||||||||||||||
| gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), | ||||||||||||||||
| gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)), | ||||||||||||||||
| ) | ||||||||||||||||
|
|
||||||||||||||||
| # Validate the universe domain. | ||||||||||||||||
| self._client._validate_universe_domain() | ||||||||||||||||
|
|
||||||||||||||||
| # Send the request. | ||||||||||||||||
| response = await rpc( | ||||||||||||||||
| request, | ||||||||||||||||
| request_pb, | ||||||||||||||||
| retry=retry, | ||||||||||||||||
| timeout=timeout, | ||||||||||||||||
| metadata=metadata, | ||||||||||||||||
|
|
@@ -4035,7 +4046,7 @@ async def list_operations( | |||||||||||||||
|
|
||||||||||||||||
| async def get_operation( | ||||||||||||||||
| self, | ||||||||||||||||
| request: Optional[operations_pb2.GetOperationRequest] = None, | ||||||||||||||||
| request: Optional[Union[operations_pb2.GetOperationRequest, dict]] = None, | ||||||||||||||||
| *, | ||||||||||||||||
| retry: OptionalRetry = gapic_v1.method.DEFAULT, | ||||||||||||||||
| timeout: Union[float, object] = gapic_v1.method.DEFAULT, | ||||||||||||||||
|
|
@@ -4061,8 +4072,12 @@ async def get_operation( | |||||||||||||||
| # Create or coerce a protobuf request object. | ||||||||||||||||
| # The request isn't a proto-plus wrapped type, | ||||||||||||||||
| # so it must be constructed via keyword expansion. | ||||||||||||||||
| if isinstance(request, dict): | ||||||||||||||||
| request = operations_pb2.GetOperationRequest(**request) | ||||||||||||||||
| if request is None: | ||||||||||||||||
| request_pb = operations_pb2.GetOperationRequest() | ||||||||||||||||
| elif isinstance(request, dict): | ||||||||||||||||
| request_pb = operations_pb2.GetOperationRequest(**request) | ||||||||||||||||
| else: | ||||||||||||||||
| request_pb = request | ||||||||||||||||
|
|
||||||||||||||||
| # Wrap the RPC method; this adds retry and timeout information, | ||||||||||||||||
| # and friendly error handling. | ||||||||||||||||
|
|
@@ -4071,15 +4086,15 @@ async def get_operation( | |||||||||||||||
| # Certain fields should be provided within the metadata header; | ||||||||||||||||
| # add these here. | ||||||||||||||||
| metadata = tuple(metadata) + ( | ||||||||||||||||
| gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), | ||||||||||||||||
| gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)), | ||||||||||||||||
| ) | ||||||||||||||||
|
|
||||||||||||||||
| # Validate the universe domain. | ||||||||||||||||
| self._client._validate_universe_domain() | ||||||||||||||||
|
|
||||||||||||||||
| # Send the request. | ||||||||||||||||
| response = await rpc( | ||||||||||||||||
| request, | ||||||||||||||||
| request_pb, | ||||||||||||||||
| retry=retry, | ||||||||||||||||
| timeout=timeout, | ||||||||||||||||
| metadata=metadata, | ||||||||||||||||
|
|
@@ -4090,7 +4105,7 @@ async def get_operation( | |||||||||||||||
|
|
||||||||||||||||
| async def delete_operation( | ||||||||||||||||
| self, | ||||||||||||||||
| request: Optional[operations_pb2.DeleteOperationRequest] = None, | ||||||||||||||||
| request: Optional[Union[operations_pb2.DeleteOperationRequest, dict]] = None, | ||||||||||||||||
| *, | ||||||||||||||||
| retry: OptionalRetry = gapic_v1.method.DEFAULT, | ||||||||||||||||
| timeout: Union[float, object] = gapic_v1.method.DEFAULT, | ||||||||||||||||
|
|
@@ -4120,8 +4135,12 @@ async def delete_operation( | |||||||||||||||
| # Create or coerce a protobuf request object. | ||||||||||||||||
| # The request isn't a proto-plus wrapped type, | ||||||||||||||||
| # so it must be constructed via keyword expansion. | ||||||||||||||||
| if isinstance(request, dict): | ||||||||||||||||
| request = operations_pb2.DeleteOperationRequest(**request) | ||||||||||||||||
| if request is None: | ||||||||||||||||
| request_pb = operations_pb2.DeleteOperationRequest() | ||||||||||||||||
| elif isinstance(request, dict): | ||||||||||||||||
| request_pb = operations_pb2.DeleteOperationRequest(**request) | ||||||||||||||||
| else: | ||||||||||||||||
| request_pb = request | ||||||||||||||||
|
|
||||||||||||||||
| # Wrap the RPC method; this adds retry and timeout information, | ||||||||||||||||
| # and friendly error handling. | ||||||||||||||||
|
|
@@ -4130,23 +4149,23 @@ async def delete_operation( | |||||||||||||||
| # Certain fields should be provided within the metadata header; | ||||||||||||||||
| # add these here. | ||||||||||||||||
| metadata = tuple(metadata) + ( | ||||||||||||||||
| gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), | ||||||||||||||||
| gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)), | ||||||||||||||||
| ) | ||||||||||||||||
|
|
||||||||||||||||
| # Validate the universe domain. | ||||||||||||||||
| self._client._validate_universe_domain() | ||||||||||||||||
|
|
||||||||||||||||
| # Send the request. | ||||||||||||||||
| await rpc( | ||||||||||||||||
| request, | ||||||||||||||||
| request_pb, | ||||||||||||||||
| retry=retry, | ||||||||||||||||
| timeout=timeout, | ||||||||||||||||
| metadata=metadata, | ||||||||||||||||
| ) | ||||||||||||||||
|
|
||||||||||||||||
| async def cancel_operation( | ||||||||||||||||
| self, | ||||||||||||||||
| request: Optional[operations_pb2.CancelOperationRequest] = None, | ||||||||||||||||
| request: Optional[Union[operations_pb2.CancelOperationRequest, dict]] = None, | ||||||||||||||||
| *, | ||||||||||||||||
| retry: OptionalRetry = gapic_v1.method.DEFAULT, | ||||||||||||||||
| timeout: Union[float, object] = gapic_v1.method.DEFAULT, | ||||||||||||||||
|
|
@@ -4175,8 +4194,12 @@ async def cancel_operation( | |||||||||||||||
| # Create or coerce a protobuf request object. | ||||||||||||||||
| # The request isn't a proto-plus wrapped type, | ||||||||||||||||
| # so it must be constructed via keyword expansion. | ||||||||||||||||
| if isinstance(request, dict): | ||||||||||||||||
| request = operations_pb2.CancelOperationRequest(**request) | ||||||||||||||||
| if request is None: | ||||||||||||||||
| request_pb = operations_pb2.CancelOperationRequest() | ||||||||||||||||
| elif isinstance(request, dict): | ||||||||||||||||
| request_pb = operations_pb2.CancelOperationRequest(**request) | ||||||||||||||||
| else: | ||||||||||||||||
| request_pb = request | ||||||||||||||||
|
|
||||||||||||||||
| # Wrap the RPC method; this adds retry and timeout information, | ||||||||||||||||
| # and friendly error handling. | ||||||||||||||||
|
|
@@ -4185,15 +4208,15 @@ async def cancel_operation( | |||||||||||||||
| # Certain fields should be provided within the metadata header; | ||||||||||||||||
| # add these here. | ||||||||||||||||
| metadata = tuple(metadata) + ( | ||||||||||||||||
| gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)), | ||||||||||||||||
| gapic_v1.routing_header.to_grpc_metadata((("name", request_pb.name),)), | ||||||||||||||||
| ) | ||||||||||||||||
|
|
||||||||||||||||
| # Validate the universe domain. | ||||||||||||||||
| self._client._validate_universe_domain() | ||||||||||||||||
|
|
||||||||||||||||
| # Send the request. | ||||||||||||||||
| await rpc( | ||||||||||||||||
| request, | ||||||||||||||||
| request_pb, | ||||||||||||||||
| retry=retry, | ||||||||||||||||
| timeout=timeout, | ||||||||||||||||
| metadata=metadata, | ||||||||||||||||
|
|
||||||||||||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
loggingmodule is imported twice. Please remove the duplicate import. It's also good practice to keep imports sorted alphabetically.