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 (#257)

* 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 16, 2023
1 parent c0526cd commit 173fade
Show file tree
Hide file tree
Showing 5 changed files with 2,629 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,36 @@
]
}
}
},
"rest": {
"libraryClient": "DashboardsServiceClient",
"rpcs": {
"CreateDashboard": {
"methods": [
"create_dashboard"
]
},
"DeleteDashboard": {
"methods": [
"delete_dashboard"
]
},
"GetDashboard": {
"methods": [
"get_dashboard"
]
},
"ListDashboards": {
"methods": [
"list_dashboards"
]
},
"UpdateDashboard": {
"methods": [
"update_dashboard"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
from .transports.base import DashboardsServiceTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import DashboardsServiceGrpcTransport
from .transports.grpc_asyncio import DashboardsServiceGrpcAsyncIOTransport
from .transports.rest import DashboardsServiceRestTransport


class DashboardsServiceClientMeta(type):
Expand All @@ -69,6 +70,7 @@ class DashboardsServiceClientMeta(type):
) # type: Dict[str, Type[DashboardsServiceTransport]]
_transport_registry["grpc"] = DashboardsServiceGrpcTransport
_transport_registry["grpc_asyncio"] = DashboardsServiceGrpcAsyncIOTransport
_transport_registry["rest"] = DashboardsServiceRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@
from .base import DashboardsServiceTransport
from .grpc import DashboardsServiceGrpcTransport
from .grpc_asyncio import DashboardsServiceGrpcAsyncIOTransport
from .rest import DashboardsServiceRestTransport
from .rest import DashboardsServiceRestInterceptor


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[DashboardsServiceTransport]]
_transport_registry["grpc"] = DashboardsServiceGrpcTransport
_transport_registry["grpc_asyncio"] = DashboardsServiceGrpcAsyncIOTransport
_transport_registry["rest"] = DashboardsServiceRestTransport

__all__ = (
"DashboardsServiceTransport",
"DashboardsServiceGrpcTransport",
"DashboardsServiceGrpcAsyncIOTransport",
"DashboardsServiceRestTransport",
"DashboardsServiceRestInterceptor",
)
Loading

0 comments on commit 173fade

Please sign in to comment.