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

* 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 8, 2023
1 parent 7d9db03 commit 63aeb13
Show file tree
Hide file tree
Showing 10 changed files with 19,688 additions and 194 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,101 @@
]
}
}
},
"rest": {
"libraryClient": "DocumentProcessorServiceClient",
"rpcs": {
"BatchProcessDocuments": {
"methods": [
"batch_process_documents"
]
},
"CreateProcessor": {
"methods": [
"create_processor"
]
},
"DeleteProcessor": {
"methods": [
"delete_processor"
]
},
"DeleteProcessorVersion": {
"methods": [
"delete_processor_version"
]
},
"DeployProcessorVersion": {
"methods": [
"deploy_processor_version"
]
},
"DisableProcessor": {
"methods": [
"disable_processor"
]
},
"EnableProcessor": {
"methods": [
"enable_processor"
]
},
"FetchProcessorTypes": {
"methods": [
"fetch_processor_types"
]
},
"GetProcessor": {
"methods": [
"get_processor"
]
},
"GetProcessorType": {
"methods": [
"get_processor_type"
]
},
"GetProcessorVersion": {
"methods": [
"get_processor_version"
]
},
"ListProcessorTypes": {
"methods": [
"list_processor_types"
]
},
"ListProcessorVersions": {
"methods": [
"list_processor_versions"
]
},
"ListProcessors": {
"methods": [
"list_processors"
]
},
"ProcessDocument": {
"methods": [
"process_document"
]
},
"ReviewDocument": {
"methods": [
"review_document"
]
},
"SetDefaultProcessorVersion": {
"methods": [
"set_default_processor_version"
]
},
"UndeployProcessorVersion": {
"methods": [
"undeploy_processor_version"
]
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
from .transports.base import DEFAULT_CLIENT_INFO, DocumentProcessorServiceTransport
from .transports.grpc import DocumentProcessorServiceGrpcTransport
from .transports.grpc_asyncio import DocumentProcessorServiceGrpcAsyncIOTransport
from .transports.rest import DocumentProcessorServiceRestTransport


class DocumentProcessorServiceClientMeta(type):
Expand All @@ -82,6 +83,7 @@ class DocumentProcessorServiceClientMeta(type):
) # type: Dict[str, Type[DocumentProcessorServiceTransport]]
_transport_registry["grpc"] = DocumentProcessorServiceGrpcTransport
_transport_registry["grpc_asyncio"] = DocumentProcessorServiceGrpcAsyncIOTransport
_transport_registry["rest"] = DocumentProcessorServiceRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,23 @@
from .base import DocumentProcessorServiceTransport
from .grpc import DocumentProcessorServiceGrpcTransport
from .grpc_asyncio import DocumentProcessorServiceGrpcAsyncIOTransport
from .rest import (
DocumentProcessorServiceRestInterceptor,
DocumentProcessorServiceRestTransport,
)

# Compile a registry of transports.
_transport_registry = (
OrderedDict()
) # type: Dict[str, Type[DocumentProcessorServiceTransport]]
_transport_registry["grpc"] = DocumentProcessorServiceGrpcTransport
_transport_registry["grpc_asyncio"] = DocumentProcessorServiceGrpcAsyncIOTransport
_transport_registry["rest"] = DocumentProcessorServiceRestTransport

__all__ = (
"DocumentProcessorServiceTransport",
"DocumentProcessorServiceGrpcTransport",
"DocumentProcessorServiceGrpcAsyncIOTransport",
"DocumentProcessorServiceRestTransport",
"DocumentProcessorServiceRestInterceptor",
)
Loading

0 comments on commit 63aeb13

Please sign in to comment.