Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit e48b9ba

Browse files
feat: Add support for REST transport (#37)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 474571730 Source-Link: googleapis/googleapis@5a9ee4d Source-Link: https://github.com/googleapis/googleapis-gen/commit/ceafe521f137680fdee2f9ca9e1947cdd825070d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2VhZmU1MjFmMTM3NjgwZmRlZTJmOWNhOWUxOTQ3Y2RkODI1MDcwZCJ9 fix(deps): require google-api-core>=1.33.1,>=2.8.0 fix(deps): require protobuf >= 3.20.1
1 parent d8a4864 commit e48b9ba

File tree

38 files changed

+12096
-1158
lines changed

38 files changed

+12096
-1158
lines changed

google/cloud/batch_v1/gapic_metadata.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,41 @@
7676
]
7777
}
7878
}
79+
},
80+
"rest": {
81+
"libraryClient": "BatchServiceClient",
82+
"rpcs": {
83+
"CreateJob": {
84+
"methods": [
85+
"create_job"
86+
]
87+
},
88+
"DeleteJob": {
89+
"methods": [
90+
"delete_job"
91+
]
92+
},
93+
"GetJob": {
94+
"methods": [
95+
"get_job"
96+
]
97+
},
98+
"GetTask": {
99+
"methods": [
100+
"get_task"
101+
]
102+
},
103+
"ListJobs": {
104+
"methods": [
105+
"list_jobs"
106+
]
107+
},
108+
"ListTasks": {
109+
"methods": [
110+
"list_tasks"
111+
]
112+
}
113+
}
79114
}
80115
}
81116
}

google/cloud/batch_v1/services/batch_service/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
from .transports.base import BatchServiceTransport, DEFAULT_CLIENT_INFO
5151
from .transports.grpc import BatchServiceGrpcTransport
5252
from .transports.grpc_asyncio import BatchServiceGrpcAsyncIOTransport
53+
from .transports.rest import BatchServiceRestTransport
5354

5455

5556
class BatchServiceClientMeta(type):
@@ -63,6 +64,7 @@ class BatchServiceClientMeta(type):
6364
_transport_registry = OrderedDict() # type: Dict[str, Type[BatchServiceTransport]]
6465
_transport_registry["grpc"] = BatchServiceGrpcTransport
6566
_transport_registry["grpc_asyncio"] = BatchServiceGrpcAsyncIOTransport
67+
_transport_registry["rest"] = BatchServiceRestTransport
6668

6769
def get_transport_class(
6870
cls,
@@ -409,6 +411,9 @@ def __init__(
409411
transport (Union[str, BatchServiceTransport]): The
410412
transport to use. If set to None, a transport is chosen
411413
automatically.
414+
NOTE: "rest" transport functionality is currently in a
415+
beta state (preview). We welcome your feedback via an
416+
issue in this library's source repository.
412417
client_options (google.api_core.client_options.ClientOptions): Custom options for the
413418
client. It won't take effect if a ``transport`` instance is provided.
414419
(1) The ``api_endpoint`` property can be used to override the

google/cloud/batch_v1/services/batch_service/transports/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@
1919
from .base import BatchServiceTransport
2020
from .grpc import BatchServiceGrpcTransport
2121
from .grpc_asyncio import BatchServiceGrpcAsyncIOTransport
22+
from .rest import BatchServiceRestTransport
23+
from .rest import BatchServiceRestInterceptor
2224

2325

2426
# Compile a registry of transports.
2527
_transport_registry = OrderedDict() # type: Dict[str, Type[BatchServiceTransport]]
2628
_transport_registry["grpc"] = BatchServiceGrpcTransport
2729
_transport_registry["grpc_asyncio"] = BatchServiceGrpcAsyncIOTransport
30+
_transport_registry["rest"] = BatchServiceRestTransport
2831

2932
__all__ = (
3033
"BatchServiceTransport",
3134
"BatchServiceGrpcTransport",
3235
"BatchServiceGrpcAsyncIOTransport",
36+
"BatchServiceRestTransport",
37+
"BatchServiceRestInterceptor",
3338
)

0 commit comments

Comments
 (0)