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

* 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 8e843ff commit e5649e8
Show file tree
Hide file tree
Showing 5 changed files with 10,180 additions and 369 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,101 @@
]
}
}
},
"rest": {
"libraryClient": "EventarcClient",
"rpcs": {
"CreateChannel": {
"methods": [
"create_channel"
]
},
"CreateChannelConnection": {
"methods": [
"create_channel_connection"
]
},
"CreateTrigger": {
"methods": [
"create_trigger"
]
},
"DeleteChannel": {
"methods": [
"delete_channel"
]
},
"DeleteChannelConnection": {
"methods": [
"delete_channel_connection"
]
},
"DeleteTrigger": {
"methods": [
"delete_trigger"
]
},
"GetChannel": {
"methods": [
"get_channel"
]
},
"GetChannelConnection": {
"methods": [
"get_channel_connection"
]
},
"GetGoogleChannelConfig": {
"methods": [
"get_google_channel_config"
]
},
"GetProvider": {
"methods": [
"get_provider"
]
},
"GetTrigger": {
"methods": [
"get_trigger"
]
},
"ListChannelConnections": {
"methods": [
"list_channel_connections"
]
},
"ListChannels": {
"methods": [
"list_channels"
]
},
"ListProviders": {
"methods": [
"list_providers"
]
},
"ListTriggers": {
"methods": [
"list_triggers"
]
},
"UpdateChannel": {
"methods": [
"update_channel"
]
},
"UpdateGoogleChannelConfig": {
"methods": [
"update_google_channel_config"
]
},
"UpdateTrigger": {
"methods": [
"update_trigger"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, EventarcTransport
from .transports.grpc import EventarcGrpcTransport
from .transports.grpc_asyncio import EventarcGrpcAsyncIOTransport
from .transports.rest import EventarcRestTransport


class EventarcClientMeta(type):
Expand All @@ -84,6 +85,7 @@ class EventarcClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[EventarcTransport]]
_transport_registry["grpc"] = EventarcGrpcTransport
_transport_registry["grpc_asyncio"] = EventarcGrpcAsyncIOTransport
_transport_registry["rest"] = EventarcRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@
from .base import EventarcTransport
from .grpc import EventarcGrpcTransport
from .grpc_asyncio import EventarcGrpcAsyncIOTransport
from .rest import EventarcRestInterceptor, EventarcRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[EventarcTransport]]
_transport_registry["grpc"] = EventarcGrpcTransport
_transport_registry["grpc_asyncio"] = EventarcGrpcAsyncIOTransport
_transport_registry["rest"] = EventarcRestTransport

__all__ = (
"EventarcTransport",
"EventarcGrpcTransport",
"EventarcGrpcAsyncIOTransport",
"EventarcRestTransport",
"EventarcRestInterceptor",
)
Loading

0 comments on commit e5649e8

Please sign in to comment.