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

* 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 2bc3e86 commit 090bbf4
Show file tree
Hide file tree
Showing 10 changed files with 10,510 additions and 345 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,51 @@
]
}
}
},
"rest": {
"libraryClient": "CloudMemcacheClient",
"rpcs": {
"ApplyParameters": {
"methods": [
"apply_parameters"
]
},
"CreateInstance": {
"methods": [
"create_instance"
]
},
"DeleteInstance": {
"methods": [
"delete_instance"
]
},
"GetInstance": {
"methods": [
"get_instance"
]
},
"ListInstances": {
"methods": [
"list_instances"
]
},
"RescheduleMaintenance": {
"methods": [
"reschedule_maintenance"
]
},
"UpdateInstance": {
"methods": [
"update_instance"
]
},
"UpdateParameters": {
"methods": [
"update_parameters"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, CloudMemcacheTransport
from .transports.grpc import CloudMemcacheGrpcTransport
from .transports.grpc_asyncio import CloudMemcacheGrpcAsyncIOTransport
from .transports.rest import CloudMemcacheRestTransport


class CloudMemcacheClientMeta(type):
Expand All @@ -73,6 +74,7 @@ class CloudMemcacheClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudMemcacheTransport]]
_transport_registry["grpc"] = CloudMemcacheGrpcTransport
_transport_registry["grpc_asyncio"] = CloudMemcacheGrpcAsyncIOTransport
_transport_registry["rest"] = CloudMemcacheRestTransport

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 CloudMemcacheTransport
from .grpc import CloudMemcacheGrpcTransport
from .grpc_asyncio import CloudMemcacheGrpcAsyncIOTransport
from .rest import CloudMemcacheRestInterceptor, CloudMemcacheRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudMemcacheTransport]]
_transport_registry["grpc"] = CloudMemcacheGrpcTransport
_transport_registry["grpc_asyncio"] = CloudMemcacheGrpcAsyncIOTransport
_transport_registry["rest"] = CloudMemcacheRestTransport

__all__ = (
"CloudMemcacheTransport",
"CloudMemcacheGrpcTransport",
"CloudMemcacheGrpcAsyncIOTransport",
"CloudMemcacheRestTransport",
"CloudMemcacheRestInterceptor",
)
Loading

0 comments on commit 090bbf4

Please sign in to comment.