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

Commit db5cec0

Browse files
feat: Add support for REST transport (#184)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 474644226 Source-Link: googleapis/googleapis@f90b329 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ad8763bde676f92a3eb70753ae1cfed0e81387e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFkODc2M2JkZTY3NmY5MmEzZWI3MDc1M2FlMWNmZWQwZTgxMzg3ZSJ9 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 318a9a2 commit db5cec0

File tree

50 files changed

+11772
-656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+11772
-656
lines changed

google/cloud/recommendationengine_v1beta1/gapic_metadata.json

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,41 @@
7676
]
7777
}
7878
}
79+
},
80+
"rest": {
81+
"libraryClient": "CatalogServiceClient",
82+
"rpcs": {
83+
"CreateCatalogItem": {
84+
"methods": [
85+
"create_catalog_item"
86+
]
87+
},
88+
"DeleteCatalogItem": {
89+
"methods": [
90+
"delete_catalog_item"
91+
]
92+
},
93+
"GetCatalogItem": {
94+
"methods": [
95+
"get_catalog_item"
96+
]
97+
},
98+
"ImportCatalogItems": {
99+
"methods": [
100+
"import_catalog_items"
101+
]
102+
},
103+
"ListCatalogItems": {
104+
"methods": [
105+
"list_catalog_items"
106+
]
107+
},
108+
"UpdateCatalogItem": {
109+
"methods": [
110+
"update_catalog_item"
111+
]
112+
}
113+
}
79114
}
80115
}
81116
},
@@ -120,6 +155,26 @@
120155
]
121156
}
122157
}
158+
},
159+
"rest": {
160+
"libraryClient": "PredictionApiKeyRegistryClient",
161+
"rpcs": {
162+
"CreatePredictionApiKeyRegistration": {
163+
"methods": [
164+
"create_prediction_api_key_registration"
165+
]
166+
},
167+
"DeletePredictionApiKeyRegistration": {
168+
"methods": [
169+
"delete_prediction_api_key_registration"
170+
]
171+
},
172+
"ListPredictionApiKeyRegistrations": {
173+
"methods": [
174+
"list_prediction_api_key_registrations"
175+
]
176+
}
177+
}
123178
}
124179
}
125180
},
@@ -144,6 +199,16 @@
144199
]
145200
}
146201
}
202+
},
203+
"rest": {
204+
"libraryClient": "PredictionServiceClient",
205+
"rpcs": {
206+
"Predict": {
207+
"methods": [
208+
"predict"
209+
]
210+
}
211+
}
147212
}
148213
}
149214
},
@@ -208,6 +273,36 @@
208273
]
209274
}
210275
}
276+
},
277+
"rest": {
278+
"libraryClient": "UserEventServiceClient",
279+
"rpcs": {
280+
"CollectUserEvent": {
281+
"methods": [
282+
"collect_user_event"
283+
]
284+
},
285+
"ImportUserEvents": {
286+
"methods": [
287+
"import_user_events"
288+
]
289+
},
290+
"ListUserEvents": {
291+
"methods": [
292+
"list_user_events"
293+
]
294+
},
295+
"PurgeUserEvents": {
296+
"methods": [
297+
"purge_user_events"
298+
]
299+
},
300+
"WriteUserEvent": {
301+
"methods": [
302+
"write_user_event"
303+
]
304+
}
305+
}
211306
}
212307
}
213308
}

google/cloud/recommendationengine_v1beta1/services/catalog_service/client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
from .transports.base import CatalogServiceTransport, DEFAULT_CLIENT_INFO
4646
from .transports.grpc import CatalogServiceGrpcTransport
4747
from .transports.grpc_asyncio import CatalogServiceGrpcAsyncIOTransport
48+
from .transports.rest import CatalogServiceRestTransport
4849

4950

5051
class CatalogServiceClientMeta(type):
@@ -60,6 +61,7 @@ class CatalogServiceClientMeta(type):
6061
) # type: Dict[str, Type[CatalogServiceTransport]]
6162
_transport_registry["grpc"] = CatalogServiceGrpcTransport
6263
_transport_registry["grpc_asyncio"] = CatalogServiceGrpcAsyncIOTransport
64+
_transport_registry["rest"] = CatalogServiceRestTransport
6365

6466
def get_transport_class(
6567
cls,
@@ -355,6 +357,9 @@ def __init__(
355357
transport (Union[str, CatalogServiceTransport]): The
356358
transport to use. If set to None, a transport is chosen
357359
automatically.
360+
NOTE: "rest" transport functionality is currently in a
361+
beta state (preview). We welcome your feedback via an
362+
issue in this library's source repository.
358363
client_options (google.api_core.client_options.ClientOptions): Custom options for the
359364
client. It won't take effect if a ``transport`` instance is provided.
360365
(1) The ``api_endpoint`` property can be used to override the

google/cloud/recommendationengine_v1beta1/services/catalog_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 CatalogServiceTransport
2020
from .grpc import CatalogServiceGrpcTransport
2121
from .grpc_asyncio import CatalogServiceGrpcAsyncIOTransport
22+
from .rest import CatalogServiceRestTransport
23+
from .rest import CatalogServiceRestInterceptor
2224

2325

2426
# Compile a registry of transports.
2527
_transport_registry = OrderedDict() # type: Dict[str, Type[CatalogServiceTransport]]
2628
_transport_registry["grpc"] = CatalogServiceGrpcTransport
2729
_transport_registry["grpc_asyncio"] = CatalogServiceGrpcAsyncIOTransport
30+
_transport_registry["rest"] = CatalogServiceRestTransport
2831

2932
__all__ = (
3033
"CatalogServiceTransport",
3134
"CatalogServiceGrpcTransport",
3235
"CatalogServiceGrpcAsyncIOTransport",
36+
"CatalogServiceRestTransport",
37+
"CatalogServiceRestInterceptor",
3338
)

0 commit comments

Comments
 (0)