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

Commit 41d903b

Browse files
feat: Add support for REST transport (#12)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 474644226 Source-Link: googleapis/googleapis@f90b329 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ad8763bde676f92a3eb70753ae1cfed0e81387e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFkODc2M2JkZTY3NmY5MmEzZWI3MDc1M2FlMWNmZWQwZTgxMzg3ZSJ9 PiperOrigin-RevId: 474571730 Source-Link: googleapis/googleapis@5a9ee4d Source-Link: https://github.com/googleapis/googleapis-gen/commit/ceafe521f137680fdee2f9ca9e1947cdd825070d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2VhZmU1MjFmMTM3NjgwZmRlZTJmOWNhOWUxOTQ3Y2RkODI1MDcwZCJ9 fix(deps): require google-api-core>=1.33.1,>=2.8.0 fix(deps): require protobuf >= 3.20.1
1 parent dd93ca4 commit 41d903b

24 files changed

+5571
-299
lines changed

‎google/cloud/api_keys_v2/gapic_metadata.json

+45
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,51 @@
9696
]
9797
}
9898
}
99+
},
100+
"rest": {
101+
"libraryClient": "ApiKeysClient",
102+
"rpcs": {
103+
"CreateKey": {
104+
"methods": [
105+
"create_key"
106+
]
107+
},
108+
"DeleteKey": {
109+
"methods": [
110+
"delete_key"
111+
]
112+
},
113+
"GetKey": {
114+
"methods": [
115+
"get_key"
116+
]
117+
},
118+
"GetKeyString": {
119+
"methods": [
120+
"get_key_string"
121+
]
122+
},
123+
"ListKeys": {
124+
"methods": [
125+
"list_keys"
126+
]
127+
},
128+
"LookupKey": {
129+
"methods": [
130+
"lookup_key"
131+
]
132+
},
133+
"UndeleteKey": {
134+
"methods": [
135+
"undelete_key"
136+
]
137+
},
138+
"UpdateKey": {
139+
"methods": [
140+
"update_key"
141+
]
142+
}
143+
}
99144
}
100145
}
101146
}

‎google/cloud/api_keys_v2/services/api_keys/client.py

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
from .transports.base import DEFAULT_CLIENT_INFO, ApiKeysTransport
4848
from .transports.grpc import ApiKeysGrpcTransport
4949
from .transports.grpc_asyncio import ApiKeysGrpcAsyncIOTransport
50+
from .transports.rest import ApiKeysRestTransport
5051

5152

5253
class ApiKeysClientMeta(type):
@@ -60,6 +61,7 @@ class ApiKeysClientMeta(type):
6061
_transport_registry = OrderedDict() # type: Dict[str, Type[ApiKeysTransport]]
6162
_transport_registry["grpc"] = ApiKeysGrpcTransport
6263
_transport_registry["grpc_asyncio"] = ApiKeysGrpcAsyncIOTransport
64+
_transport_registry["rest"] = ApiKeysRestTransport
6365

6466
def get_transport_class(
6567
cls,
@@ -353,6 +355,9 @@ def __init__(
353355
transport (Union[str, ApiKeysTransport]): The
354356
transport to use. If set to None, a transport is chosen
355357
automatically.
358+
NOTE: "rest" transport functionality is currently in a
359+
beta state (preview). We welcome your feedback via an
360+
issue in this library's source repository.
356361
client_options (google.api_core.client_options.ClientOptions): Custom options for the
357362
client. It won't take effect if a ``transport`` instance is provided.
358363
(1) The ``api_endpoint`` property can be used to override the

‎google/cloud/api_keys_v2/services/api_keys/transports/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
from .base import ApiKeysTransport
2020
from .grpc import ApiKeysGrpcTransport
2121
from .grpc_asyncio import ApiKeysGrpcAsyncIOTransport
22+
from .rest import ApiKeysRestInterceptor, ApiKeysRestTransport
2223

2324
# Compile a registry of transports.
2425
_transport_registry = OrderedDict() # type: Dict[str, Type[ApiKeysTransport]]
2526
_transport_registry["grpc"] = ApiKeysGrpcTransport
2627
_transport_registry["grpc_asyncio"] = ApiKeysGrpcAsyncIOTransport
28+
_transport_registry["rest"] = ApiKeysRestTransport
2729

2830
__all__ = (
2931
"ApiKeysTransport",
3032
"ApiKeysGrpcTransport",
3133
"ApiKeysGrpcAsyncIOTransport",
34+
"ApiKeysRestTransport",
35+
"ApiKeysRestInterceptor",
3236
)

0 commit comments

Comments
 (0)
X