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

Commit 3dcb482

Browse files
feat: enable "rest" transport in Python for services supporting numeric enums (#166)
* 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 * fix: Add service_yaml_parameters to py_gapic_library BUILD.bazel targets PiperOrigin-RevId: 510187992 Source-Link: googleapis/googleapis@5edc235 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b0bedb72e4765a3e0b674a28c50ea0f9a9b26a89 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBiZWRiNzJlNDc2NWEzZTBiNjc0YTI4YzUwZWEwZjlhOWIyNmE4OSJ9 * 🦉 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 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent bad93d7 commit 3dcb482

File tree

7 files changed

+1906
-4
lines changed

7 files changed

+1906
-4
lines changed

google/cloud/service_usage_v1/gapic_metadata.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,41 @@
7676
]
7777
}
7878
}
79+
},
80+
"rest": {
81+
"libraryClient": "ServiceUsageClient",
82+
"rpcs": {
83+
"BatchEnableServices": {
84+
"methods": [
85+
"batch_enable_services"
86+
]
87+
},
88+
"BatchGetServices": {
89+
"methods": [
90+
"batch_get_services"
91+
]
92+
},
93+
"DisableService": {
94+
"methods": [
95+
"disable_service"
96+
]
97+
},
98+
"EnableService": {
99+
"methods": [
100+
"enable_service"
101+
]
102+
},
103+
"GetService": {
104+
"methods": [
105+
"get_service"
106+
]
107+
},
108+
"ListServices": {
109+
"methods": [
110+
"list_services"
111+
]
112+
}
113+
}
79114
}
80115
}
81116
}

google/cloud/service_usage_v1/services/service_usage/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
from .transports.base import DEFAULT_CLIENT_INFO, ServiceUsageTransport
5656
from .transports.grpc import ServiceUsageGrpcTransport
5757
from .transports.grpc_asyncio import ServiceUsageGrpcAsyncIOTransport
58+
from .transports.rest import ServiceUsageRestTransport
5859

5960

6061
class ServiceUsageClientMeta(type):
@@ -68,6 +69,7 @@ class ServiceUsageClientMeta(type):
6869
_transport_registry = OrderedDict() # type: Dict[str, Type[ServiceUsageTransport]]
6970
_transport_registry["grpc"] = ServiceUsageGrpcTransport
7071
_transport_registry["grpc_asyncio"] = ServiceUsageGrpcAsyncIOTransport
72+
_transport_registry["rest"] = ServiceUsageRestTransport
7173

7274
def get_transport_class(
7375
cls,

google/cloud/service_usage_v1/services/service_usage/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 ServiceUsageTransport
2020
from .grpc import ServiceUsageGrpcTransport
2121
from .grpc_asyncio import ServiceUsageGrpcAsyncIOTransport
22+
from .rest import ServiceUsageRestInterceptor, ServiceUsageRestTransport
2223

2324
# Compile a registry of transports.
2425
_transport_registry = OrderedDict() # type: Dict[str, Type[ServiceUsageTransport]]
2526
_transport_registry["grpc"] = ServiceUsageGrpcTransport
2627
_transport_registry["grpc_asyncio"] = ServiceUsageGrpcAsyncIOTransport
28+
_transport_registry["rest"] = ServiceUsageRestTransport
2729

2830
__all__ = (
2931
"ServiceUsageTransport",
3032
"ServiceUsageGrpcTransport",
3133
"ServiceUsageGrpcAsyncIOTransport",
34+
"ServiceUsageRestTransport",
35+
"ServiceUsageRestInterceptor",
3236
)

0 commit comments

Comments
 (0)