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

* 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 9674409 commit de9060a
Show file tree
Hide file tree
Showing 10 changed files with 22,951 additions and 173 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,136 @@
]
}
}
},
"rest": {
"libraryClient": "DatastreamClient",
"rpcs": {
"CreateConnectionProfile": {
"methods": [
"create_connection_profile"
]
},
"CreatePrivateConnection": {
"methods": [
"create_private_connection"
]
},
"CreateRoute": {
"methods": [
"create_route"
]
},
"CreateStream": {
"methods": [
"create_stream"
]
},
"DeleteConnectionProfile": {
"methods": [
"delete_connection_profile"
]
},
"DeletePrivateConnection": {
"methods": [
"delete_private_connection"
]
},
"DeleteRoute": {
"methods": [
"delete_route"
]
},
"DeleteStream": {
"methods": [
"delete_stream"
]
},
"DiscoverConnectionProfile": {
"methods": [
"discover_connection_profile"
]
},
"FetchStaticIps": {
"methods": [
"fetch_static_ips"
]
},
"GetConnectionProfile": {
"methods": [
"get_connection_profile"
]
},
"GetPrivateConnection": {
"methods": [
"get_private_connection"
]
},
"GetRoute": {
"methods": [
"get_route"
]
},
"GetStream": {
"methods": [
"get_stream"
]
},
"GetStreamObject": {
"methods": [
"get_stream_object"
]
},
"ListConnectionProfiles": {
"methods": [
"list_connection_profiles"
]
},
"ListPrivateConnections": {
"methods": [
"list_private_connections"
]
},
"ListRoutes": {
"methods": [
"list_routes"
]
},
"ListStreamObjects": {
"methods": [
"list_stream_objects"
]
},
"ListStreams": {
"methods": [
"list_streams"
]
},
"LookupStreamObject": {
"methods": [
"lookup_stream_object"
]
},
"StartBackfillJob": {
"methods": [
"start_backfill_job"
]
},
"StopBackfillJob": {
"methods": [
"stop_backfill_job"
]
},
"UpdateConnectionProfile": {
"methods": [
"update_connection_profile"
]
},
"UpdateStream": {
"methods": [
"update_stream"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, DatastreamTransport
from .transports.grpc import DatastreamGrpcTransport
from .transports.grpc_asyncio import DatastreamGrpcAsyncIOTransport
from .transports.rest import DatastreamRestTransport


class DatastreamClientMeta(type):
Expand All @@ -75,6 +76,7 @@ class DatastreamClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[DatastreamTransport]]
_transport_registry["grpc"] = DatastreamGrpcTransport
_transport_registry["grpc_asyncio"] = DatastreamGrpcAsyncIOTransport
_transport_registry["rest"] = DatastreamRestTransport

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 DatastreamTransport
from .grpc import DatastreamGrpcTransport
from .grpc_asyncio import DatastreamGrpcAsyncIOTransport
from .rest import DatastreamRestInterceptor, DatastreamRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[DatastreamTransport]]
_transport_registry["grpc"] = DatastreamGrpcTransport
_transport_registry["grpc_asyncio"] = DatastreamGrpcAsyncIOTransport
_transport_registry["rest"] = DatastreamRestTransport

__all__ = (
"DatastreamTransport",
"DatastreamGrpcTransport",
"DatastreamGrpcAsyncIOTransport",
"DatastreamRestTransport",
"DatastreamRestInterceptor",
)
Loading

0 comments on commit de9060a

Please sign in to comment.