Skip to content

Commit cbb1070

Browse files
authored
Vision: pick up addition of 'product_search_client' to 'vision_v1' (googleapis#6361)
Closes googleapis#6359.
1 parent 5abdf8d commit cbb1070

17 files changed

+6156
-159
lines changed

vision/google/cloud/vision_v1/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
from google.cloud.vision_v1 import types
2323
from google.cloud.vision_v1.gapic import enums
2424
from google.cloud.vision_v1.gapic import image_annotator_client as iac
25+
from google.cloud.vision_v1.gapic import product_search_client
26+
27+
28+
class ProductSearchClient(product_search_client.ProductSearchClient):
29+
__doc__ = product_search_client.ProductSearchClient.__doc__
30+
enums = enums
2531

2632

2733
@add_single_feature_methods
@@ -33,5 +39,6 @@ class ImageAnnotatorClient(VisionHelpers, iac.ImageAnnotatorClient):
3339
__all__ = (
3440
'enums',
3541
'types',
42+
'ProductSearchClient',
3643
'ImageAnnotatorClient',
3744
)

vision/google/cloud/vision_v1/gapic/enums.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,28 @@ class BlockType(enum.IntEnum):
8383
BARCODE = 5
8484

8585

86+
class BatchOperationMetadata(object):
87+
class State(enum.IntEnum):
88+
"""
89+
Enumerates the possible states that the batch request can be in.
90+
91+
Attributes:
92+
STATE_UNSPECIFIED (int): Invalid.
93+
PROCESSING (int): Request is actively being processed.
94+
SUCCESSFUL (int): The request is done and at least one item has been successfully
95+
processed.
96+
FAILED (int): The request is done and no item has been successfully processed.
97+
CANCELLED (int): The request is done after the longrunning.Operations.CancelOperation has
98+
been called by the user. Any records that were processed before the
99+
cancel command are output as specified in the request.
100+
"""
101+
STATE_UNSPECIFIED = 0
102+
PROCESSING = 1
103+
SUCCESSFUL = 2
104+
FAILED = 3
105+
CANCELLED = 4
106+
107+
86108
class Feature(object):
87109
class Type(enum.IntEnum):
88110
"""
@@ -105,6 +127,7 @@ class Type(enum.IntEnum):
105127
image's dominant colors.
106128
CROP_HINTS (int): Run crop hints.
107129
WEB_DETECTION (int): Run web detection.
130+
PRODUCT_SEARCH (int): Run Product Search.
108131
OBJECT_LOCALIZATION (int): Run localizer for object detection.
109132
"""
110133
TYPE_UNSPECIFIED = 0
@@ -118,6 +141,7 @@ class Type(enum.IntEnum):
118141
IMAGE_PROPERTIES = 7
119142
CROP_HINTS = 9
120143
WEB_DETECTION = 10
144+
PRODUCT_SEARCH = 12
121145
OBJECT_LOCALIZATION = 19
122146

123147

vision/google/cloud/vision_v1/gapic/image_annotator_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
from google.cloud.vision_v1.gapic.transports import image_annotator_grpc_transport
3333
from google.cloud.vision_v1.proto import image_annotator_pb2
3434
from google.cloud.vision_v1.proto import image_annotator_pb2_grpc
35+
from google.cloud.vision_v1.proto import product_search_service_pb2
36+
from google.cloud.vision_v1.proto import product_search_service_pb2_grpc
3537
from google.longrunning import operations_pb2
38+
from google.protobuf import empty_pb2
39+
from google.protobuf import field_mask_pb2
3640

3741
_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
3842
'google-cloud-vision', ).version

0 commit comments

Comments
 (0)