Skip to content
This repository has been archived by the owner on Nov 14, 2023. 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 (#114)

* 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 21, 2023
1 parent 0c68080 commit e3b3312
Show file tree
Hide file tree
Showing 5 changed files with 1,245 additions and 4 deletions.
15 changes: 15 additions & 0 deletions google/cloud/optimization_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@
]
}
}
},
"rest": {
"libraryClient": "FleetRoutingClient",
"rpcs": {
"BatchOptimizeTours": {
"methods": [
"batch_optimize_tours"
]
},
"OptimizeTours": {
"methods": [
"optimize_tours"
]
}
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/optimization_v1/services/fleet_routing/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
from .transports.base import FleetRoutingTransport, DEFAULT_CLIENT_INFO
from .transports.grpc import FleetRoutingGrpcTransport
from .transports.grpc_asyncio import FleetRoutingGrpcAsyncIOTransport
from .transports.rest import FleetRoutingRestTransport


class FleetRoutingClientMeta(type):
Expand All @@ -67,6 +68,7 @@ class FleetRoutingClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[FleetRoutingTransport]]
_transport_registry["grpc"] = FleetRoutingGrpcTransport
_transport_registry["grpc_asyncio"] = FleetRoutingGrpcAsyncIOTransport
_transport_registry["rest"] = FleetRoutingRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,20 @@
from .base import FleetRoutingTransport
from .grpc import FleetRoutingGrpcTransport
from .grpc_asyncio import FleetRoutingGrpcAsyncIOTransport
from .rest import FleetRoutingRestTransport
from .rest import FleetRoutingRestInterceptor


# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[FleetRoutingTransport]]
_transport_registry["grpc"] = FleetRoutingGrpcTransport
_transport_registry["grpc_asyncio"] = FleetRoutingGrpcAsyncIOTransport
_transport_registry["rest"] = FleetRoutingRestTransport

__all__ = (
"FleetRoutingTransport",
"FleetRoutingGrpcTransport",
"FleetRoutingGrpcAsyncIOTransport",
"FleetRoutingRestTransport",
"FleetRoutingRestInterceptor",
)
Loading

0 comments on commit e3b3312

Please sign in to comment.