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

* 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 19, 2023
1 parent 47c7dc7 commit 97cdbe1
Show file tree
Hide file tree
Showing 5 changed files with 7,767 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,96 @@
]
}
}
},
"rest": {
"libraryClient": "EdgeContainerClient",
"rpcs": {
"CreateCluster": {
"methods": [
"create_cluster"
]
},
"CreateNodePool": {
"methods": [
"create_node_pool"
]
},
"CreateVpnConnection": {
"methods": [
"create_vpn_connection"
]
},
"DeleteCluster": {
"methods": [
"delete_cluster"
]
},
"DeleteNodePool": {
"methods": [
"delete_node_pool"
]
},
"DeleteVpnConnection": {
"methods": [
"delete_vpn_connection"
]
},
"GenerateAccessToken": {
"methods": [
"generate_access_token"
]
},
"GetCluster": {
"methods": [
"get_cluster"
]
},
"GetMachine": {
"methods": [
"get_machine"
]
},
"GetNodePool": {
"methods": [
"get_node_pool"
]
},
"GetVpnConnection": {
"methods": [
"get_vpn_connection"
]
},
"ListClusters": {
"methods": [
"list_clusters"
]
},
"ListMachines": {
"methods": [
"list_machines"
]
},
"ListNodePools": {
"methods": [
"list_node_pools"
]
},
"ListVpnConnections": {
"methods": [
"list_vpn_connections"
]
},
"UpdateCluster": {
"methods": [
"update_cluster"
]
},
"UpdateNodePool": {
"methods": [
"update_node_pool"
]
}
}
}
}
}
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, EdgeContainerTransport
from .transports.grpc import EdgeContainerGrpcTransport
from .transports.grpc_asyncio import EdgeContainerGrpcAsyncIOTransport
from .transports.rest import EdgeContainerRestTransport


class EdgeContainerClientMeta(type):
Expand All @@ -71,6 +72,7 @@ class EdgeContainerClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[EdgeContainerTransport]]
_transport_registry["grpc"] = EdgeContainerGrpcTransport
_transport_registry["grpc_asyncio"] = EdgeContainerGrpcAsyncIOTransport
_transport_registry["rest"] = EdgeContainerRestTransport

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 EdgeContainerTransport
from .grpc import EdgeContainerGrpcTransport
from .grpc_asyncio import EdgeContainerGrpcAsyncIOTransport
from .rest import EdgeContainerRestInterceptor, EdgeContainerRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[EdgeContainerTransport]]
_transport_registry["grpc"] = EdgeContainerGrpcTransport
_transport_registry["grpc_asyncio"] = EdgeContainerGrpcAsyncIOTransport
_transport_registry["rest"] = EdgeContainerRestTransport

__all__ = (
"EdgeContainerTransport",
"EdgeContainerGrpcTransport",
"EdgeContainerGrpcAsyncIOTransport",
"EdgeContainerRestTransport",
"EdgeContainerRestInterceptor",
)
Loading

0 comments on commit 97cdbe1

Please sign in to comment.