Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

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] committed Feb 16, 2023
1 parent c4a83c1 commit bab8b4c
Show file tree
Hide file tree
Showing 5 changed files with 2,629 additions and 4 deletions.
30 changes: 30 additions & 0 deletions google/cloud/monitoring_dashboard_v1/gapic_metadata.json
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
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
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",
)

0 comments on commit bab8b4c

Please sign in to comment.