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

* 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 19b30c9 commit 00dcc29
Show file tree
Hide file tree
Showing 5 changed files with 19,873 additions and 331 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,206 @@
]
}
}
},
"rest": {
"libraryClient": "NetworkServicesClient",
"rpcs": {
"CreateEndpointPolicy": {
"methods": [
"create_endpoint_policy"
]
},
"CreateGateway": {
"methods": [
"create_gateway"
]
},
"CreateGrpcRoute": {
"methods": [
"create_grpc_route"
]
},
"CreateHttpRoute": {
"methods": [
"create_http_route"
]
},
"CreateMesh": {
"methods": [
"create_mesh"
]
},
"CreateServiceBinding": {
"methods": [
"create_service_binding"
]
},
"CreateTcpRoute": {
"methods": [
"create_tcp_route"
]
},
"CreateTlsRoute": {
"methods": [
"create_tls_route"
]
},
"DeleteEndpointPolicy": {
"methods": [
"delete_endpoint_policy"
]
},
"DeleteGateway": {
"methods": [
"delete_gateway"
]
},
"DeleteGrpcRoute": {
"methods": [
"delete_grpc_route"
]
},
"DeleteHttpRoute": {
"methods": [
"delete_http_route"
]
},
"DeleteMesh": {
"methods": [
"delete_mesh"
]
},
"DeleteServiceBinding": {
"methods": [
"delete_service_binding"
]
},
"DeleteTcpRoute": {
"methods": [
"delete_tcp_route"
]
},
"DeleteTlsRoute": {
"methods": [
"delete_tls_route"
]
},
"GetEndpointPolicy": {
"methods": [
"get_endpoint_policy"
]
},
"GetGateway": {
"methods": [
"get_gateway"
]
},
"GetGrpcRoute": {
"methods": [
"get_grpc_route"
]
},
"GetHttpRoute": {
"methods": [
"get_http_route"
]
},
"GetMesh": {
"methods": [
"get_mesh"
]
},
"GetServiceBinding": {
"methods": [
"get_service_binding"
]
},
"GetTcpRoute": {
"methods": [
"get_tcp_route"
]
},
"GetTlsRoute": {
"methods": [
"get_tls_route"
]
},
"ListEndpointPolicies": {
"methods": [
"list_endpoint_policies"
]
},
"ListGateways": {
"methods": [
"list_gateways"
]
},
"ListGrpcRoutes": {
"methods": [
"list_grpc_routes"
]
},
"ListHttpRoutes": {
"methods": [
"list_http_routes"
]
},
"ListMeshes": {
"methods": [
"list_meshes"
]
},
"ListServiceBindings": {
"methods": [
"list_service_bindings"
]
},
"ListTcpRoutes": {
"methods": [
"list_tcp_routes"
]
},
"ListTlsRoutes": {
"methods": [
"list_tls_routes"
]
},
"UpdateEndpointPolicy": {
"methods": [
"update_endpoint_policy"
]
},
"UpdateGateway": {
"methods": [
"update_gateway"
]
},
"UpdateGrpcRoute": {
"methods": [
"update_grpc_route"
]
},
"UpdateHttpRoute": {
"methods": [
"update_http_route"
]
},
"UpdateMesh": {
"methods": [
"update_mesh"
]
},
"UpdateTcpRoute": {
"methods": [
"update_tcp_route"
]
},
"UpdateTlsRoute": {
"methods": [
"update_tls_route"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, NetworkServicesTransport
from .transports.grpc import NetworkServicesGrpcTransport
from .transports.grpc_asyncio import NetworkServicesGrpcAsyncIOTransport
from .transports.rest import NetworkServicesRestTransport


class NetworkServicesClientMeta(type):
Expand All @@ -97,6 +98,7 @@ class NetworkServicesClientMeta(type):
) # type: Dict[str, Type[NetworkServicesTransport]]
_transport_registry["grpc"] = NetworkServicesGrpcTransport
_transport_registry["grpc_asyncio"] = NetworkServicesGrpcAsyncIOTransport
_transport_registry["rest"] = NetworkServicesRestTransport

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 NetworkServicesTransport
from .grpc import NetworkServicesGrpcTransport
from .grpc_asyncio import NetworkServicesGrpcAsyncIOTransport
from .rest import NetworkServicesRestInterceptor, NetworkServicesRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[NetworkServicesTransport]]
_transport_registry["grpc"] = NetworkServicesGrpcTransport
_transport_registry["grpc_asyncio"] = NetworkServicesGrpcAsyncIOTransport
_transport_registry["rest"] = NetworkServicesRestTransport

__all__ = (
"NetworkServicesTransport",
"NetworkServicesGrpcTransport",
"NetworkServicesGrpcAsyncIOTransport",
"NetworkServicesRestTransport",
"NetworkServicesRestInterceptor",
)
Loading

0 comments on commit 00dcc29

Please sign in to comment.