Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 87b77ee

Browse files
chore: use gapic-generator-python 0.51.2 (#119)
- [ ] Regenerate this pull request now. fix: add 'dict' annotation type to 'request' Committer: @busunkim96 PiperOrigin-RevId: 398509016 Source-Link: googleapis/googleapis@b224dfa Source-Link: https://github.com/googleapis/googleapis-gen/commit/63a1db7a38d74b9639592f521ed1daaf7299ad9a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjNhMWRiN2EzOGQ3NGI5NjM5NTkyZjUyMWVkMWRhYWY3Mjk5YWQ5YSJ9
1 parent fb9e0cc commit 87b77ee

File tree

5 files changed

+33
-33
lines changed

5 files changed

+33
-33
lines changed

google/cloud/bigquery_connection_v1/services/connection_service/client.py

+17-17
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from distutils import util
1818
import os
1919
import re
20-
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
20+
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2121
import pkg_resources
2222

2323
from google.api_core import client_options as client_options_lib # type: ignore
@@ -358,7 +358,7 @@ def __init__(
358358

359359
def create_connection(
360360
self,
361-
request: gcbc_connection.CreateConnectionRequest = None,
361+
request: Union[gcbc_connection.CreateConnectionRequest, dict] = None,
362362
*,
363363
parent: str = None,
364364
connection: gcbc_connection.Connection = None,
@@ -370,7 +370,7 @@ def create_connection(
370370
r"""Creates a new connection.
371371
372372
Args:
373-
request (google.cloud.bigquery_connection_v1.types.CreateConnectionRequest):
373+
request (Union[google.cloud.bigquery_connection_v1.types.CreateConnectionRequest, dict]):
374374
The request object. The request for
375375
[ConnectionService.CreateConnection][google.cloud.bigquery.connection.v1.ConnectionService.CreateConnection].
376376
parent (str):
@@ -448,7 +448,7 @@ def create_connection(
448448

449449
def get_connection(
450450
self,
451-
request: connection.GetConnectionRequest = None,
451+
request: Union[connection.GetConnectionRequest, dict] = None,
452452
*,
453453
name: str = None,
454454
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -458,7 +458,7 @@ def get_connection(
458458
r"""Returns specified connection.
459459
460460
Args:
461-
request (google.cloud.bigquery_connection_v1.types.GetConnectionRequest):
461+
request (Union[google.cloud.bigquery_connection_v1.types.GetConnectionRequest, dict]):
462462
The request object. The request for
463463
[ConnectionService.GetConnection][google.cloud.bigquery.connection.v1.ConnectionService.GetConnection].
464464
name (str):
@@ -520,7 +520,7 @@ def get_connection(
520520

521521
def list_connections(
522522
self,
523-
request: connection.ListConnectionsRequest = None,
523+
request: Union[connection.ListConnectionsRequest, dict] = None,
524524
*,
525525
parent: str = None,
526526
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -530,7 +530,7 @@ def list_connections(
530530
r"""Returns a list of connections in the given project.
531531
532532
Args:
533-
request (google.cloud.bigquery_connection_v1.types.ListConnectionsRequest):
533+
request (Union[google.cloud.bigquery_connection_v1.types.ListConnectionsRequest, dict]):
534534
The request object. The request for
535535
[ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections].
536536
parent (str):
@@ -600,7 +600,7 @@ def list_connections(
600600

601601
def update_connection(
602602
self,
603-
request: gcbc_connection.UpdateConnectionRequest = None,
603+
request: Union[gcbc_connection.UpdateConnectionRequest, dict] = None,
604604
*,
605605
name: str = None,
606606
connection: gcbc_connection.Connection = None,
@@ -614,7 +614,7 @@ def update_connection(
614614
are in the update field mask.
615615
616616
Args:
617-
request (google.cloud.bigquery_connection_v1.types.UpdateConnectionRequest):
617+
request (Union[google.cloud.bigquery_connection_v1.types.UpdateConnectionRequest, dict]):
618618
The request object. The request for
619619
[ConnectionService.UpdateConnection][google.cloud.bigquery.connection.v1.ConnectionService.UpdateConnection].
620620
name (str):
@@ -694,7 +694,7 @@ def update_connection(
694694

695695
def delete_connection(
696696
self,
697-
request: connection.DeleteConnectionRequest = None,
697+
request: Union[connection.DeleteConnectionRequest, dict] = None,
698698
*,
699699
name: str = None,
700700
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -704,7 +704,7 @@ def delete_connection(
704704
r"""Deletes connection and associated credential.
705705
706706
Args:
707-
request (google.cloud.bigquery_connection_v1.types.DeleteConnectionRequest):
707+
request (Union[google.cloud.bigquery_connection_v1.types.DeleteConnectionRequest, dict]):
708708
The request object. The request for
709709
[ConnectionService.DeleteConnectionRequest][].
710710
name (str):
@@ -758,7 +758,7 @@ def delete_connection(
758758

759759
def get_iam_policy(
760760
self,
761-
request: iam_policy_pb2.GetIamPolicyRequest = None,
761+
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
762762
*,
763763
resource: str = None,
764764
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -770,7 +770,7 @@ def get_iam_policy(
770770
not have a policy set.
771771
772772
Args:
773-
request (google.iam.v1.iam_policy_pb2.GetIamPolicyRequest):
773+
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
774774
The request object. Request message for `GetIamPolicy`
775775
method.
776776
resource (str):
@@ -885,7 +885,7 @@ def get_iam_policy(
885885

886886
def set_iam_policy(
887887
self,
888-
request: iam_policy_pb2.SetIamPolicyRequest = None,
888+
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
889889
*,
890890
resource: str = None,
891891
retry: retries.Retry = gapic_v1.method.DEFAULT,
@@ -899,7 +899,7 @@ def set_iam_policy(
899899
``PERMISSION_DENIED`` errors.
900900
901901
Args:
902-
request (google.iam.v1.iam_policy_pb2.SetIamPolicyRequest):
902+
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
903903
The request object. Request message for `SetIamPolicy`
904904
method.
905905
resource (str):
@@ -1014,7 +1014,7 @@ def set_iam_policy(
10141014

10151015
def test_iam_permissions(
10161016
self,
1017-
request: iam_policy_pb2.TestIamPermissionsRequest = None,
1017+
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
10181018
*,
10191019
resource: str = None,
10201020
permissions: Sequence[str] = None,
@@ -1032,7 +1032,7 @@ def test_iam_permissions(
10321032
warning.
10331033
10341034
Args:
1035-
request (google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest):
1035+
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
10361036
The request object. Request message for
10371037
`TestIamPermissions` method.
10381038
resource (str):

google/cloud/bigquery_connection_v1/services/connection_service/transports/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(
124124
**scopes_kwargs, quota_project_id=quota_project_id
125125
)
126126

127-
# If the credentials is service account credentials, then always try to use self signed JWT.
127+
# If the credentials are service account credentials, then always try to use self signed JWT.
128128
if (
129129
always_use_jwt_access
130130
and isinstance(credentials, service_account.Credentials)

google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ def __init__(
8484
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8585
If provided, it overrides the ``host`` argument and tries to create
8686
a mutual TLS channel with client SSL credentials from
87-
``client_cert_source`` or applicatin default SSL credentials.
87+
``client_cert_source`` or application default SSL credentials.
8888
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
8989
Deprecated. A callback to provide client SSL certificate bytes and
9090
private key bytes, both in PEM format. It is ignored if
9191
``api_mtls_endpoint`` is None.
9292
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
93-
for grpc channel. It is ignored if ``channel`` is provided.
93+
for the grpc channel. It is ignored if ``channel`` is provided.
9494
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
9595
A callback to provide client certificate bytes and private key bytes,
96-
both in PEM format. It is used to configure mutual TLS channel. It is
96+
both in PEM format. It is used to configure a mutual TLS channel. It is
9797
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
9898
quota_project_id (Optional[str]): An optional project to use for billing
9999
and quota.

google/cloud/bigquery_connection_v1/services/connection_service/transports/grpc_asyncio.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,16 @@ def __init__(
131131
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
132132
If provided, it overrides the ``host`` argument and tries to create
133133
a mutual TLS channel with client SSL credentials from
134-
``client_cert_source`` or applicatin default SSL credentials.
134+
``client_cert_source`` or application default SSL credentials.
135135
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
136136
Deprecated. A callback to provide client SSL certificate bytes and
137137
private key bytes, both in PEM format. It is ignored if
138138
``api_mtls_endpoint`` is None.
139139
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
140-
for grpc channel. It is ignored if ``channel`` is provided.
140+
for the grpc channel. It is ignored if ``channel`` is provided.
141141
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
142142
A callback to provide client certificate bytes and private key bytes,
143-
both in PEM format. It is used to configure mutual TLS channel. It is
143+
both in PEM format. It is used to configure a mutual TLS channel. It is
144144
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
145145
quota_project_id (Optional[str]): An optional project to use for billing
146146
and quota.

scripts/fixup_bigquery_connection_v1_keywords.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ def partition(
3939
class bigquery_connectionCallTransformer(cst.CSTTransformer):
4040
CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata')
4141
METHOD_TO_PARAMS: Dict[str, Tuple[str]] = {
42-
'create_connection': ('parent', 'connection', 'connection_id', ),
43-
'delete_connection': ('name', ),
44-
'get_connection': ('name', ),
45-
'get_iam_policy': ('resource', 'options', ),
46-
'list_connections': ('parent', 'page_size', 'page_token', ),
47-
'set_iam_policy': ('resource', 'policy', ),
48-
'test_iam_permissions': ('resource', 'permissions', ),
49-
'update_connection': ('name', 'connection', 'update_mask', ),
42+
'create_connection': ('parent', 'connection', 'connection_id', ),
43+
'delete_connection': ('name', ),
44+
'get_connection': ('name', ),
45+
'get_iam_policy': ('resource', 'options', ),
46+
'list_connections': ('parent', 'page_size', 'page_token', ),
47+
'set_iam_policy': ('resource', 'policy', ),
48+
'test_iam_permissions': ('resource', 'permissions', ),
49+
'update_connection': ('name', 'connection', 'update_mask', ),
5050
}
5151

5252
def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
@@ -65,7 +65,7 @@ def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode:
6565
return updated
6666

6767
kwargs, ctrl_kwargs = partition(
68-
lambda a: not a.keyword.value in self.CTRL_PARAMS,
68+
lambda a: a.keyword.value not in self.CTRL_PARAMS,
6969
kwargs
7070
)
7171

0 commit comments

Comments
 (0)