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

* 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

* add rest transport to system test

---------

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 16, 2023
1 parent e5e238e commit 5a18fa7
Show file tree
Hide file tree
Showing 6 changed files with 7,136 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,86 @@
]
}
}
},
"rest": {
"libraryClient": "DataTransferServiceClient",
"rpcs": {
"CheckValidCreds": {
"methods": [
"check_valid_creds"
]
},
"CreateTransferConfig": {
"methods": [
"create_transfer_config"
]
},
"DeleteTransferConfig": {
"methods": [
"delete_transfer_config"
]
},
"DeleteTransferRun": {
"methods": [
"delete_transfer_run"
]
},
"EnrollDataSources": {
"methods": [
"enroll_data_sources"
]
},
"GetDataSource": {
"methods": [
"get_data_source"
]
},
"GetTransferConfig": {
"methods": [
"get_transfer_config"
]
},
"GetTransferRun": {
"methods": [
"get_transfer_run"
]
},
"ListDataSources": {
"methods": [
"list_data_sources"
]
},
"ListTransferConfigs": {
"methods": [
"list_transfer_configs"
]
},
"ListTransferLogs": {
"methods": [
"list_transfer_logs"
]
},
"ListTransferRuns": {
"methods": [
"list_transfer_runs"
]
},
"ScheduleTransferRuns": {
"methods": [
"schedule_transfer_runs"
]
},
"StartManualTransferRuns": {
"methods": [
"start_manual_transfer_runs"
]
},
"UpdateTransferConfig": {
"methods": [
"update_transfer_config"
]
}
}
}
}
}
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, DataTransferServiceTransport
from .transports.grpc import DataTransferServiceGrpcTransport
from .transports.grpc_asyncio import DataTransferServiceGrpcAsyncIOTransport
from .transports.rest import DataTransferServiceRestTransport


class DataTransferServiceClientMeta(type):
Expand All @@ -75,6 +76,7 @@ class DataTransferServiceClientMeta(type):
) # type: Dict[str, Type[DataTransferServiceTransport]]
_transport_registry["grpc"] = DataTransferServiceGrpcTransport
_transport_registry["grpc_asyncio"] = DataTransferServiceGrpcAsyncIOTransport
_transport_registry["rest"] = DataTransferServiceRestTransport

def get_transport_class(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,20 @@
from .base import DataTransferServiceTransport
from .grpc import DataTransferServiceGrpcTransport
from .grpc_asyncio import DataTransferServiceGrpcAsyncIOTransport
from .rest import DataTransferServiceRestInterceptor, DataTransferServiceRestTransport

# Compile a registry of transports.
_transport_registry = (
OrderedDict()
) # type: Dict[str, Type[DataTransferServiceTransport]]
_transport_registry["grpc"] = DataTransferServiceGrpcTransport
_transport_registry["grpc_asyncio"] = DataTransferServiceGrpcAsyncIOTransport
_transport_registry["rest"] = DataTransferServiceRestTransport

__all__ = (
"DataTransferServiceTransport",
"DataTransferServiceGrpcTransport",
"DataTransferServiceGrpcAsyncIOTransport",
"DataTransferServiceRestTransport",
"DataTransferServiceRestInterceptor",
)
Loading

0 comments on commit 5a18fa7

Please sign in to comment.