Skip to content

Commit 52d2280

Browse files
feat: enable "rest" transport in Python for services supporting numeric enums (#202)
* feat: enable "rest" transport in Python for services supporting numeric enums PiperOrigin-RevId: 508143576 Source-Link: googleapis/googleapis@7a702a9 Source-Link: googleapis/googleapis-gen@6ad1279 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 8ff2e9a commit 52d2280

File tree

5 files changed

+6951
-85
lines changed

5 files changed

+6951
-85
lines changed

packages/google-cloud-api-gateway/google/cloud/apigateway_v1/gapic_metadata.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,86 @@
166166
]
167167
}
168168
}
169+
},
170+
"rest": {
171+
"libraryClient": "ApiGatewayServiceClient",
172+
"rpcs": {
173+
"CreateApi": {
174+
"methods": [
175+
"create_api"
176+
]
177+
},
178+
"CreateApiConfig": {
179+
"methods": [
180+
"create_api_config"
181+
]
182+
},
183+
"CreateGateway": {
184+
"methods": [
185+
"create_gateway"
186+
]
187+
},
188+
"DeleteApi": {
189+
"methods": [
190+
"delete_api"
191+
]
192+
},
193+
"DeleteApiConfig": {
194+
"methods": [
195+
"delete_api_config"
196+
]
197+
},
198+
"DeleteGateway": {
199+
"methods": [
200+
"delete_gateway"
201+
]
202+
},
203+
"GetApi": {
204+
"methods": [
205+
"get_api"
206+
]
207+
},
208+
"GetApiConfig": {
209+
"methods": [
210+
"get_api_config"
211+
]
212+
},
213+
"GetGateway": {
214+
"methods": [
215+
"get_gateway"
216+
]
217+
},
218+
"ListApiConfigs": {
219+
"methods": [
220+
"list_api_configs"
221+
]
222+
},
223+
"ListApis": {
224+
"methods": [
225+
"list_apis"
226+
]
227+
},
228+
"ListGateways": {
229+
"methods": [
230+
"list_gateways"
231+
]
232+
},
233+
"UpdateApi": {
234+
"methods": [
235+
"update_api"
236+
]
237+
},
238+
"UpdateApiConfig": {
239+
"methods": [
240+
"update_api_config"
241+
]
242+
},
243+
"UpdateGateway": {
244+
"methods": [
245+
"update_gateway"
246+
]
247+
}
248+
}
169249
}
170250
}
171251
}

packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
from .transports.base import DEFAULT_CLIENT_INFO, ApiGatewayServiceTransport
5959
from .transports.grpc import ApiGatewayServiceGrpcTransport
6060
from .transports.grpc_asyncio import ApiGatewayServiceGrpcAsyncIOTransport
61+
from .transports.rest import ApiGatewayServiceRestTransport
6162

6263

6364
class ApiGatewayServiceClientMeta(type):
@@ -73,6 +74,7 @@ class ApiGatewayServiceClientMeta(type):
7374
) # type: Dict[str, Type[ApiGatewayServiceTransport]]
7475
_transport_registry["grpc"] = ApiGatewayServiceGrpcTransport
7576
_transport_registry["grpc_asyncio"] = ApiGatewayServiceGrpcAsyncIOTransport
77+
_transport_registry["rest"] = ApiGatewayServiceRestTransport
7678

7779
def get_transport_class(
7880
cls,

packages/google-cloud-api-gateway/google/cloud/apigateway_v1/services/api_gateway_service/transports/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
from .base import ApiGatewayServiceTransport
2020
from .grpc import ApiGatewayServiceGrpcTransport
2121
from .grpc_asyncio import ApiGatewayServiceGrpcAsyncIOTransport
22+
from .rest import ApiGatewayServiceRestInterceptor, ApiGatewayServiceRestTransport
2223

2324
# Compile a registry of transports.
2425
_transport_registry = OrderedDict() # type: Dict[str, Type[ApiGatewayServiceTransport]]
2526
_transport_registry["grpc"] = ApiGatewayServiceGrpcTransport
2627
_transport_registry["grpc_asyncio"] = ApiGatewayServiceGrpcAsyncIOTransport
28+
_transport_registry["rest"] = ApiGatewayServiceRestTransport
2729

2830
__all__ = (
2931
"ApiGatewayServiceTransport",
3032
"ApiGatewayServiceGrpcTransport",
3133
"ApiGatewayServiceGrpcAsyncIOTransport",
34+
"ApiGatewayServiceRestTransport",
35+
"ApiGatewayServiceRestInterceptor",
3236
)

0 commit comments

Comments
 (0)