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

* 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 b5ca9e6 commit 76fba52
Show file tree
Hide file tree
Showing 5 changed files with 6,721 additions and 132 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,76 @@
]
}
}
},
"rest": {
"libraryClient": "ServiceManagerClient",
"rpcs": {
"CreateService": {
"methods": [
"create_service"
]
},
"CreateServiceConfig": {
"methods": [
"create_service_config"
]
},
"CreateServiceRollout": {
"methods": [
"create_service_rollout"
]
},
"DeleteService": {
"methods": [
"delete_service"
]
},
"GenerateConfigReport": {
"methods": [
"generate_config_report"
]
},
"GetService": {
"methods": [
"get_service"
]
},
"GetServiceConfig": {
"methods": [
"get_service_config"
]
},
"GetServiceRollout": {
"methods": [
"get_service_rollout"
]
},
"ListServiceConfigs": {
"methods": [
"list_service_configs"
]
},
"ListServiceRollouts": {
"methods": [
"list_service_rollouts"
]
},
"ListServices": {
"methods": [
"list_services"
]
},
"SubmitConfigSource": {
"methods": [
"submit_config_source"
]
},
"UndeleteService": {
"methods": [
"undelete_service"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, ServiceManagerTransport
from .transports.grpc import ServiceManagerGrpcTransport
from .transports.grpc_asyncio import ServiceManagerGrpcAsyncIOTransport
from .transports.rest import ServiceManagerRestTransport


class ServiceManagerClientMeta(type):
Expand All @@ -95,6 +96,7 @@ class ServiceManagerClientMeta(type):
) # type: Dict[str, Type[ServiceManagerTransport]]
_transport_registry["grpc"] = ServiceManagerGrpcTransport
_transport_registry["grpc_asyncio"] = ServiceManagerGrpcAsyncIOTransport
_transport_registry["rest"] = ServiceManagerRestTransport

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 ServiceManagerTransport
from .grpc import ServiceManagerGrpcTransport
from .grpc_asyncio import ServiceManagerGrpcAsyncIOTransport
from .rest import ServiceManagerRestInterceptor, ServiceManagerRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[ServiceManagerTransport]]
_transport_registry["grpc"] = ServiceManagerGrpcTransport
_transport_registry["grpc_asyncio"] = ServiceManagerGrpcAsyncIOTransport
_transport_registry["rest"] = ServiceManagerRestTransport

__all__ = (
"ServiceManagerTransport",
"ServiceManagerGrpcTransport",
"ServiceManagerGrpcAsyncIOTransport",
"ServiceManagerRestTransport",
"ServiceManagerRestInterceptor",
)
Loading

0 comments on commit 76fba52

Please sign in to comment.