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

Commit e4cbcab

Browse files
feat: enable "rest" transport in Python for services supporting numeric enums (#294)
* feat: enable "rest" transport in Python for services supporting numeric enums PiperOrigin-RevId: 508143576 Source-Link: googleapis/googleapis@7a702a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6ad1279c0e7aa787ac6b66c9fd4a210692edffcd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * use REST transport in samples/tests * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert changes to fixtures * revert * revert --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent a6cc65a commit e4cbcab

File tree

10 files changed

+4132
-100
lines changed

10 files changed

+4132
-100
lines changed

google/cloud/bigquery_connection_v1/gapic_metadata.json

+45
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,51 @@
9696
]
9797
}
9898
}
99+
},
100+
"rest": {
101+
"libraryClient": "ConnectionServiceClient",
102+
"rpcs": {
103+
"CreateConnection": {
104+
"methods": [
105+
"create_connection"
106+
]
107+
},
108+
"DeleteConnection": {
109+
"methods": [
110+
"delete_connection"
111+
]
112+
},
113+
"GetConnection": {
114+
"methods": [
115+
"get_connection"
116+
]
117+
},
118+
"GetIamPolicy": {
119+
"methods": [
120+
"get_iam_policy"
121+
]
122+
},
123+
"ListConnections": {
124+
"methods": [
125+
"list_connections"
126+
]
127+
},
128+
"SetIamPolicy": {
129+
"methods": [
130+
"set_iam_policy"
131+
]
132+
},
133+
"TestIamPermissions": {
134+
"methods": [
135+
"test_iam_permissions"
136+
]
137+
},
138+
"UpdateConnection": {
139+
"methods": [
140+
"update_connection"
141+
]
142+
}
143+
}
99144
}
100145
}
101146
}

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

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
from .transports.base import DEFAULT_CLIENT_INFO, ConnectionServiceTransport
5858
from .transports.grpc import ConnectionServiceGrpcTransport
5959
from .transports.grpc_asyncio import ConnectionServiceGrpcAsyncIOTransport
60+
from .transports.rest import ConnectionServiceRestTransport
6061

6162

6263
class ConnectionServiceClientMeta(type):
@@ -72,6 +73,7 @@ class ConnectionServiceClientMeta(type):
7273
) # type: Dict[str, Type[ConnectionServiceTransport]]
7374
_transport_registry["grpc"] = ConnectionServiceGrpcTransport
7475
_transport_registry["grpc_asyncio"] = ConnectionServiceGrpcAsyncIOTransport
76+
_transport_registry["rest"] = ConnectionServiceRestTransport
7577

7678
def get_transport_class(
7779
cls,

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

+4
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
from .base import ConnectionServiceTransport
2020
from .grpc import ConnectionServiceGrpcTransport
2121
from .grpc_asyncio import ConnectionServiceGrpcAsyncIOTransport
22+
from .rest import ConnectionServiceRestInterceptor, ConnectionServiceRestTransport
2223

2324
# Compile a registry of transports.
2425
_transport_registry = OrderedDict() # type: Dict[str, Type[ConnectionServiceTransport]]
2526
_transport_registry["grpc"] = ConnectionServiceGrpcTransport
2627
_transport_registry["grpc_asyncio"] = ConnectionServiceGrpcAsyncIOTransport
28+
_transport_registry["rest"] = ConnectionServiceRestTransport
2729

2830
__all__ = (
2931
"ConnectionServiceTransport",
3032
"ConnectionServiceGrpcTransport",
3133
"ConnectionServiceGrpcAsyncIOTransport",
34+
"ConnectionServiceRestTransport",
35+
"ConnectionServiceRestInterceptor",
3236
)

0 commit comments

Comments
 (0)