Skip to content
This repository has been archived by the owner on Sep 5, 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 (#251)

* 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

* fix: Add service_yaml_parameters to py_gapic_library BUILD.bazel targets

PiperOrigin-RevId: 510187992

Source-Link: googleapis/googleapis@5edc235

Source-Link: googleapis/googleapis-gen@b0bedb7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBiZWRiNzJlNDc2NWEzZTBiNjc0YTI4YzUwZWEwZjlhOWIyNmE4OSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: Update gapic-generator-python to v1.8.5

PiperOrigin-RevId: 511892190

Source-Link: googleapis/googleapis@a45d9c0

Source-Link: googleapis/googleapis-gen@1907294
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkwNzI5NGIxZDgzNjVlYTI0ZjhjNWYyZTA1OWE2NDEyNGM0ZWQzYiJ9

* 🦉 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>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Feb 28, 2023
1 parent 84e2bf1 commit 6d3c767
Show file tree
Hide file tree
Showing 12 changed files with 10,988 additions and 338 deletions.
60 changes: 60 additions & 0 deletions google/cloud/redis_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,66 @@
]
}
}
},
"rest": {
"libraryClient": "CloudRedisClient",
"rpcs": {
"CreateInstance": {
"methods": [
"create_instance"
]
},
"DeleteInstance": {
"methods": [
"delete_instance"
]
},
"ExportInstance": {
"methods": [
"export_instance"
]
},
"FailoverInstance": {
"methods": [
"failover_instance"
]
},
"GetInstance": {
"methods": [
"get_instance"
]
},
"GetInstanceAuthString": {
"methods": [
"get_instance_auth_string"
]
},
"ImportInstance": {
"methods": [
"import_instance"
]
},
"ListInstances": {
"methods": [
"list_instances"
]
},
"RescheduleMaintenance": {
"methods": [
"reschedule_maintenance"
]
},
"UpdateInstance": {
"methods": [
"update_instance"
]
},
"UpgradeInstance": {
"methods": [
"upgrade_instance"
]
}
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/redis_v1/services/cloud_redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, CloudRedisTransport
from .transports.grpc import CloudRedisGrpcTransport
from .transports.grpc_asyncio import CloudRedisGrpcAsyncIOTransport
from .transports.rest import CloudRedisRestTransport


class CloudRedisClientMeta(type):
Expand All @@ -71,6 +72,7 @@ class CloudRedisClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudRedisTransport]]
_transport_registry["grpc"] = CloudRedisGrpcTransport
_transport_registry["grpc_asyncio"] = CloudRedisGrpcAsyncIOTransport
_transport_registry["rest"] = CloudRedisRestTransport

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 CloudRedisTransport
from .grpc import CloudRedisGrpcTransport
from .grpc_asyncio import CloudRedisGrpcAsyncIOTransport
from .rest import CloudRedisRestInterceptor, CloudRedisRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[CloudRedisTransport]]
_transport_registry["grpc"] = CloudRedisGrpcTransport
_transport_registry["grpc_asyncio"] = CloudRedisGrpcAsyncIOTransport
_transport_registry["rest"] = CloudRedisRestTransport

__all__ = (
"CloudRedisTransport",
"CloudRedisGrpcTransport",
"CloudRedisGrpcAsyncIOTransport",
"CloudRedisRestTransport",
"CloudRedisRestInterceptor",
)
Loading

0 comments on commit 6d3c767

Please sign in to comment.