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

* feat: enable "rest" transport in Python for services supporting numeric enums

PiperOrigin-RevId: 508143576

Source-Link: googleapis/googleapis@7a702a9

Source-Link: https://github.com/googleapis/googleapis-gen/commit/6ad1279c0e7aa787ac6b66c9fd4a210692edffcd
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 a1c5232 commit 3fc33a3
Show file tree
Hide file tree
Showing 10 changed files with 5,190 additions and 208 deletions.
30 changes: 30 additions & 0 deletions google/cloud/workflows_v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,36 @@
]
}
}
},
"rest": {
"libraryClient": "WorkflowsClient",
"rpcs": {
"CreateWorkflow": {
"methods": [
"create_workflow"
]
},
"DeleteWorkflow": {
"methods": [
"delete_workflow"
]
},
"GetWorkflow": {
"methods": [
"get_workflow"
]
},
"ListWorkflows": {
"methods": [
"list_workflows"
]
},
"UpdateWorkflow": {
"methods": [
"update_workflow"
]
}
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/workflows_v1/services/workflows/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, WorkflowsTransport
from .transports.grpc import WorkflowsGrpcTransport
from .transports.grpc_asyncio import WorkflowsGrpcAsyncIOTransport
from .transports.rest import WorkflowsRestTransport


class WorkflowsClientMeta(type):
Expand All @@ -71,6 +72,7 @@ class WorkflowsClientMeta(type):
_transport_registry = OrderedDict() # type: Dict[str, Type[WorkflowsTransport]]
_transport_registry["grpc"] = WorkflowsGrpcTransport
_transport_registry["grpc_asyncio"] = WorkflowsGrpcAsyncIOTransport
_transport_registry["rest"] = WorkflowsRestTransport

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 WorkflowsTransport
from .grpc import WorkflowsGrpcTransport
from .grpc_asyncio import WorkflowsGrpcAsyncIOTransport
from .rest import WorkflowsRestInterceptor, WorkflowsRestTransport

# Compile a registry of transports.
_transport_registry = OrderedDict() # type: Dict[str, Type[WorkflowsTransport]]
_transport_registry["grpc"] = WorkflowsGrpcTransport
_transport_registry["grpc_asyncio"] = WorkflowsGrpcAsyncIOTransport
_transport_registry["rest"] = WorkflowsRestTransport

__all__ = (
"WorkflowsTransport",
"WorkflowsGrpcTransport",
"WorkflowsGrpcAsyncIOTransport",
"WorkflowsRestTransport",
"WorkflowsRestInterceptor",
)
Loading

0 comments on commit 3fc33a3

Please sign in to comment.