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

Commit 64dbabb

Browse files
feat: enable "rest" transport in Python for services supporting numeric enums (#151)
* 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 * chore: Update gapic-generator-python to v1.8.5 PiperOrigin-RevId: 511892190 Source-Link: googleapis/googleapis@a45d9c0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1907294b1d8365ea24f8c5f2e059a64124c4ed3b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkwNzI5NGIxZDgzNjVlYTI0ZjhjNWYyZTA1OWE2NDEyNGM0ZWQzYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: Fix formatting of request arg in docstring chore: Update gapic-generator-python to v1.9.1 PiperOrigin-RevId: 518604533 Source-Link: googleapis/googleapis@8a085ae Source-Link: https://github.com/googleapis/googleapis-gen/commit/b2ab4b0a0ae2907e812c209198a74e0898afcb04 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJhYjRiMGEwYWUyOTA3ZTgxMmMyMDkxOThhNzRlMDg5OGFmY2IwNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: Add async context manager return types chore: Mock return_value should not populate oneof message fields chore: Support snippet generation for services that only support REST transport chore: Update gapic-generator-python to v1.11.0 PiperOrigin-RevId: 545430278 Source-Link: googleapis/googleapis@601b532 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b3f18d0f6560a855022fd058865e7620479d7af9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjNmMThkMGY2NTYwYTg1NTAyMmZkMDU4ODY1ZTc2MjA0NzlkN2FmOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update gapic-generator-python to v1.11.1 PiperOrigin-RevId: 545769621 Source-Link: googleapis/googleapis@cc2f031 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1a46ae7652ef98a86c2bc232b6da0412e9f30bdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWE0NmFlNzY1MmVmOThhODZjMmJjMjMyYjZkYTA0MTJlOWYzMGJkYiJ9 * 🦉 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> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 6338b07 commit 64dbabb

File tree

14 files changed

+4184
-140
lines changed

14 files changed

+4184
-140
lines changed

google/cloud/debugger_v2/gapic_metadata.json

+50
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,26 @@
4646
]
4747
}
4848
}
49+
},
50+
"rest": {
51+
"libraryClient": "Controller2Client",
52+
"rpcs": {
53+
"ListActiveBreakpoints": {
54+
"methods": [
55+
"list_active_breakpoints"
56+
]
57+
},
58+
"RegisterDebuggee": {
59+
"methods": [
60+
"register_debuggee"
61+
]
62+
},
63+
"UpdateActiveBreakpoint": {
64+
"methods": [
65+
"update_active_breakpoint"
66+
]
67+
}
68+
}
4969
}
5070
}
5171
},
@@ -110,6 +130,36 @@
110130
]
111131
}
112132
}
133+
},
134+
"rest": {
135+
"libraryClient": "Debugger2Client",
136+
"rpcs": {
137+
"DeleteBreakpoint": {
138+
"methods": [
139+
"delete_breakpoint"
140+
]
141+
},
142+
"GetBreakpoint": {
143+
"methods": [
144+
"get_breakpoint"
145+
]
146+
},
147+
"ListBreakpoints": {
148+
"methods": [
149+
"list_breakpoints"
150+
]
151+
},
152+
"ListDebuggees": {
153+
"methods": [
154+
"list_debuggees"
155+
]
156+
},
157+
"SetBreakpoint": {
158+
"methods": [
159+
"set_breakpoint"
160+
]
161+
}
162+
}
113163
}
114164
}
115165
}

google/cloud/debugger_v2/services/controller2/async_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ async def sample_update_active_breakpoint():
594594
# Done; return the response.
595595
return response
596596

597-
async def __aenter__(self):
597+
async def __aenter__(self) -> "Controller2AsyncClient":
598598
return self
599599

600600
async def __aexit__(self, exc_type, exc, tb):

google/cloud/debugger_v2/services/controller2/client.py

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
from .transports.base import DEFAULT_CLIENT_INFO, Controller2Transport
5252
from .transports.grpc import Controller2GrpcTransport
5353
from .transports.grpc_asyncio import Controller2GrpcAsyncIOTransport
54+
from .transports.rest import Controller2RestTransport
5455

5556

5657
class Controller2ClientMeta(type):
@@ -64,6 +65,7 @@ class Controller2ClientMeta(type):
6465
_transport_registry = OrderedDict() # type: Dict[str, Type[Controller2Transport]]
6566
_transport_registry["grpc"] = Controller2GrpcTransport
6667
_transport_registry["grpc_asyncio"] = Controller2GrpcAsyncIOTransport
68+
_transport_registry["rest"] = Controller2RestTransport
6769

6870
def get_transport_class(
6971
cls,

google/cloud/debugger_v2/services/controller2/transports/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
from .base import Controller2Transport
2020
from .grpc import Controller2GrpcTransport
2121
from .grpc_asyncio import Controller2GrpcAsyncIOTransport
22+
from .rest import Controller2RestInterceptor, Controller2RestTransport
2223

2324
# Compile a registry of transports.
2425
_transport_registry = OrderedDict() # type: Dict[str, Type[Controller2Transport]]
2526
_transport_registry["grpc"] = Controller2GrpcTransport
2627
_transport_registry["grpc_asyncio"] = Controller2GrpcAsyncIOTransport
28+
_transport_registry["rest"] = Controller2RestTransport
2729

2830
__all__ = (
2931
"Controller2Transport",
3032
"Controller2GrpcTransport",
3133
"Controller2GrpcAsyncIOTransport",
34+
"Controller2RestTransport",
35+
"Controller2RestInterceptor",
3236
)

0 commit comments

Comments
 (0)