Skip to content

Commit

Permalink
feat: enable "rest" transport in Python for services supporting numer…
Browse files Browse the repository at this point in the history
…ic enums (#173)

* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Feb 9, 2023
1 parent c4eb70c commit f885ff5
Show file tree
Hide file tree
Showing 5 changed files with 3,768 additions and 133 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,41 @@
]
}
}
},
"rest": {
"libraryClient": "ReachabilityServiceClient",
"rpcs": {
"CreateConnectivityTest": {
"methods": [
"create_connectivity_test"
]
},
"DeleteConnectivityTest": {
"methods": [
"delete_connectivity_test"
]
},
"GetConnectivityTest": {
"methods": [
"get_connectivity_test"
]
},
"ListConnectivityTests": {
"methods": [
"list_connectivity_tests"
]
},
"RerunConnectivityTest": {
"methods": [
"rerun_connectivity_test"
]
},
"UpdateConnectivityTest": {
"methods": [
"update_connectivity_test"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, ReachabilityServiceTransport
from .transports.grpc import ReachabilityServiceGrpcTransport
from .transports.grpc_asyncio import ReachabilityServiceGrpcAsyncIOTransport
from .transports.rest import ReachabilityServiceRestTransport


class ReachabilityServiceClientMeta(type):
Expand All @@ -73,6 +74,7 @@ class ReachabilityServiceClientMeta(type):
) # type: Dict[str, Type[ReachabilityServiceTransport]]
_transport_registry["grpc"] = ReachabilityServiceGrpcTransport
_transport_registry["grpc_asyncio"] = ReachabilityServiceGrpcAsyncIOTransport
_transport_registry["rest"] = ReachabilityServiceRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
from .base import ReachabilityServiceTransport
from .grpc import ReachabilityServiceGrpcTransport
from .grpc_asyncio import ReachabilityServiceGrpcAsyncIOTransport
from .rest import ReachabilityServiceRestInterceptor, ReachabilityServiceRestTransport

# Compile a registry of transports.
_transport_registry = (
OrderedDict()
) # type: Dict[str, Type[ReachabilityServiceTransport]]
_transport_registry["grpc"] = ReachabilityServiceGrpcTransport
_transport_registry["grpc_asyncio"] = ReachabilityServiceGrpcAsyncIOTransport
_transport_registry["rest"] = ReachabilityServiceRestTransport

__all__ = (
"ReachabilityServiceTransport",
"ReachabilityServiceGrpcTransport",
"ReachabilityServiceGrpcAsyncIOTransport",
"ReachabilityServiceRestTransport",
"ReachabilityServiceRestInterceptor",
)
Loading

0 comments on commit f885ff5

Please sign in to comment.