Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit faf6d6b

Browse files
feat: enable "rest" transport in Python for services supporting numeric enums (#520)
* 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 * chore: Update gapic-generator-python to v1.8.5 PiperOrigin-RevId: 511892190 Source-Link: googleapis/googleapis@a45d9c0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1907294b1d8365ea24f8c5f2e059a64124c4ed3b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkwNzI5NGIxZDgzNjVlYTI0ZjhjNWYyZTA1OWE2NDEyNGM0ZWQzYiJ9 * 🦉 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> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent b809823 commit faf6d6b

Some content is hidden

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

64 files changed

+32883
-497
lines changed

google/cloud/vision_v1/gapic_metadata.json

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,31 @@
5656
]
5757
}
5858
}
59+
},
60+
"rest": {
61+
"libraryClient": "ImageAnnotatorClient",
62+
"rpcs": {
63+
"AsyncBatchAnnotateFiles": {
64+
"methods": [
65+
"async_batch_annotate_files"
66+
]
67+
},
68+
"AsyncBatchAnnotateImages": {
69+
"methods": [
70+
"async_batch_annotate_images"
71+
]
72+
},
73+
"BatchAnnotateFiles": {
74+
"methods": [
75+
"batch_annotate_files"
76+
]
77+
},
78+
"BatchAnnotateImages": {
79+
"methods": [
80+
"batch_annotate_images"
81+
]
82+
}
83+
}
5984
}
6085
}
6186
},
@@ -260,6 +285,106 @@
260285
]
261286
}
262287
}
288+
},
289+
"rest": {
290+
"libraryClient": "ProductSearchClient",
291+
"rpcs": {
292+
"AddProductToProductSet": {
293+
"methods": [
294+
"add_product_to_product_set"
295+
]
296+
},
297+
"CreateProduct": {
298+
"methods": [
299+
"create_product"
300+
]
301+
},
302+
"CreateProductSet": {
303+
"methods": [
304+
"create_product_set"
305+
]
306+
},
307+
"CreateReferenceImage": {
308+
"methods": [
309+
"create_reference_image"
310+
]
311+
},
312+
"DeleteProduct": {
313+
"methods": [
314+
"delete_product"
315+
]
316+
},
317+
"DeleteProductSet": {
318+
"methods": [
319+
"delete_product_set"
320+
]
321+
},
322+
"DeleteReferenceImage": {
323+
"methods": [
324+
"delete_reference_image"
325+
]
326+
},
327+
"GetProduct": {
328+
"methods": [
329+
"get_product"
330+
]
331+
},
332+
"GetProductSet": {
333+
"methods": [
334+
"get_product_set"
335+
]
336+
},
337+
"GetReferenceImage": {
338+
"methods": [
339+
"get_reference_image"
340+
]
341+
},
342+
"ImportProductSets": {
343+
"methods": [
344+
"import_product_sets"
345+
]
346+
},
347+
"ListProductSets": {
348+
"methods": [
349+
"list_product_sets"
350+
]
351+
},
352+
"ListProducts": {
353+
"methods": [
354+
"list_products"
355+
]
356+
},
357+
"ListProductsInProductSet": {
358+
"methods": [
359+
"list_products_in_product_set"
360+
]
361+
},
362+
"ListReferenceImages": {
363+
"methods": [
364+
"list_reference_images"
365+
]
366+
},
367+
"PurgeProducts": {
368+
"methods": [
369+
"purge_products"
370+
]
371+
},
372+
"RemoveProductFromProductSet": {
373+
"methods": [
374+
"remove_product_from_product_set"
375+
]
376+
},
377+
"UpdateProduct": {
378+
"methods": [
379+
"update_product"
380+
]
381+
},
382+
"UpdateProductSet": {
383+
"methods": [
384+
"update_product_set"
385+
]
386+
}
387+
}
263388
}
264389
}
265390
}

google/cloud/vision_v1/services/image_annotator/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
from .transports.base import ImageAnnotatorTransport, DEFAULT_CLIENT_INFO
5353
from .transports.grpc import ImageAnnotatorGrpcTransport
5454
from .transports.grpc_asyncio import ImageAnnotatorGrpcAsyncIOTransport
55+
from .transports.rest import ImageAnnotatorRestTransport
5556

5657

5758
class ImageAnnotatorClientMeta(type):
@@ -67,6 +68,7 @@ class ImageAnnotatorClientMeta(type):
6768
) # type: Dict[str, Type[ImageAnnotatorTransport]]
6869
_transport_registry["grpc"] = ImageAnnotatorGrpcTransport
6970
_transport_registry["grpc_asyncio"] = ImageAnnotatorGrpcAsyncIOTransport
71+
_transport_registry["rest"] = ImageAnnotatorRestTransport
7072

7173
def get_transport_class(
7274
cls,

google/cloud/vision_v1/services/image_annotator/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 ImageAnnotatorTransport
2020
from .grpc import ImageAnnotatorGrpcTransport
2121
from .grpc_asyncio import ImageAnnotatorGrpcAsyncIOTransport
22+
from .rest import ImageAnnotatorRestTransport
23+
from .rest import ImageAnnotatorRestInterceptor
2224

2325

2426
# Compile a registry of transports.
2527
_transport_registry = OrderedDict() # type: Dict[str, Type[ImageAnnotatorTransport]]
2628
_transport_registry["grpc"] = ImageAnnotatorGrpcTransport
2729
_transport_registry["grpc_asyncio"] = ImageAnnotatorGrpcAsyncIOTransport
30+
_transport_registry["rest"] = ImageAnnotatorRestTransport
2831

2932
__all__ = (
3033
"ImageAnnotatorTransport",
3134
"ImageAnnotatorGrpcTransport",
3235
"ImageAnnotatorGrpcAsyncIOTransport",
36+
"ImageAnnotatorRestTransport",
37+
"ImageAnnotatorRestInterceptor",
3338
)

0 commit comments

Comments
 (0)