diff --git a/packages/google-cloud-vision/google/cloud/vision_v1/services/image_annotator/client.py b/packages/google-cloud-vision/google/cloud/vision_v1/services/image_annotator/client.py index f915f42e6386..aa3ca43588b7 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1/services/image_annotator/client.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1/services/image_annotator/client.py @@ -944,7 +944,7 @@ def sample_async_batch_annotate_files(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ImageAnnotatorClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-vision/google/cloud/vision_v1/services/product_search/client.py b/packages/google-cloud-vision/google/cloud/vision_v1/services/product_search/client.py index 2f49a6581369..ccb048768997 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1/services/product_search/client.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1/services/product_search/client.py @@ -2863,7 +2863,7 @@ def sample_purge_products(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ProductSearchClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-vision/google/cloud/vision_v1/types/image_annotator.py b/packages/google-cloud-vision/google/cloud/vision_v1/types/image_annotator.py index 371727b48b86..76790bc0f494 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1/types/image_annotator.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1/types/image_annotator.py @@ -77,6 +77,20 @@ class Likelihood(proto.Enum): r"""A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades. + + Values: + UNKNOWN (0): + Unknown likelihood. + VERY_UNLIKELY (1): + It is very unlikely. + UNLIKELY (2): + It is unlikely. + POSSIBLE (3): + It is possible. + LIKELY (4): + It is likely. + VERY_LIKELY (5): + It is very likely. """ UNKNOWN = 0 VERY_UNLIKELY = 1 @@ -107,7 +121,43 @@ class Feature(proto.Message): """ class Type(proto.Enum): - r"""Type of Google Cloud Vision API feature to be extracted.""" + r"""Type of Google Cloud Vision API feature to be extracted. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified feature type. + FACE_DETECTION (1): + Run face detection. + LANDMARK_DETECTION (2): + Run landmark detection. + LOGO_DETECTION (3): + Run logo detection. + LABEL_DETECTION (4): + Run label detection. + TEXT_DETECTION (5): + Run text detection / optical character recognition (OCR). + Text detection is optimized for areas of text within a + larger image; if the image is a document, use + ``DOCUMENT_TEXT_DETECTION`` instead. + DOCUMENT_TEXT_DETECTION (11): + Run dense text document OCR. Takes precedence when both + ``DOCUMENT_TEXT_DETECTION`` and ``TEXT_DETECTION`` are + present. + SAFE_SEARCH_DETECTION (6): + Run Safe Search to detect potentially unsafe + or undesirable content. + IMAGE_PROPERTIES (7): + Compute a set of image properties, such as + the image's dominant colors. + CROP_HINTS (9): + Run crop hints. + WEB_DETECTION (10): + Run web detection. + PRODUCT_SEARCH (12): + Run Product Search. + OBJECT_LOCALIZATION (19): + Run localizer for object detection. + """ TYPE_UNSPECIFIED = 0 FACE_DETECTION = 1 LANDMARK_DETECTION = 2 @@ -283,6 +333,83 @@ class Type(proto.Enum): vantage of the viewer of the image without considering mirror projections typical of photos. So, ``LEFT_EYE``, typically, is the person's right eye. + + Values: + UNKNOWN_LANDMARK (0): + Unknown face landmark detected. Should not be + filled. + LEFT_EYE (1): + Left eye. + RIGHT_EYE (2): + Right eye. + LEFT_OF_LEFT_EYEBROW (3): + Left of left eyebrow. + RIGHT_OF_LEFT_EYEBROW (4): + Right of left eyebrow. + LEFT_OF_RIGHT_EYEBROW (5): + Left of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW (6): + Right of right eyebrow. + MIDPOINT_BETWEEN_EYES (7): + Midpoint between eyes. + NOSE_TIP (8): + Nose tip. + UPPER_LIP (9): + Upper lip. + LOWER_LIP (10): + Lower lip. + MOUTH_LEFT (11): + Mouth left. + MOUTH_RIGHT (12): + Mouth right. + MOUTH_CENTER (13): + Mouth center. + NOSE_BOTTOM_RIGHT (14): + Nose, bottom right. + NOSE_BOTTOM_LEFT (15): + Nose, bottom left. + NOSE_BOTTOM_CENTER (16): + Nose, bottom center. + LEFT_EYE_TOP_BOUNDARY (17): + Left eye, top boundary. + LEFT_EYE_RIGHT_CORNER (18): + Left eye, right corner. + LEFT_EYE_BOTTOM_BOUNDARY (19): + Left eye, bottom boundary. + LEFT_EYE_LEFT_CORNER (20): + Left eye, left corner. + RIGHT_EYE_TOP_BOUNDARY (21): + Right eye, top boundary. + RIGHT_EYE_RIGHT_CORNER (22): + Right eye, right corner. + RIGHT_EYE_BOTTOM_BOUNDARY (23): + Right eye, bottom boundary. + RIGHT_EYE_LEFT_CORNER (24): + Right eye, left corner. + LEFT_EYEBROW_UPPER_MIDPOINT (25): + Left eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT (26): + Right eyebrow, upper midpoint. + LEFT_EAR_TRAGION (27): + Left ear tragion. + RIGHT_EAR_TRAGION (28): + Right ear tragion. + LEFT_EYE_PUPIL (29): + Left eye pupil. + RIGHT_EYE_PUPIL (30): + Right eye pupil. + FOREHEAD_GLABELLA (31): + Forehead glabella. + CHIN_GNATHION (32): + Chin gnathion. + CHIN_LEFT_GONION (33): + Chin left gonion. + CHIN_RIGHT_GONION (34): + Chin right gonion. + LEFT_CHEEK_CENTER (35): + Left cheek center. + RIGHT_CHEEK_CENTER (36): + Right cheek center. """ UNKNOWN_LANDMARK = 0 LEFT_EYE = 1 @@ -1559,7 +1686,20 @@ class OperationMetadata(proto.Message): """ class State(proto.Enum): - r"""Batch operation states.""" + r"""Batch operation states. + + Values: + STATE_UNSPECIFIED (0): + Invalid. + CREATED (1): + Request is received. + RUNNING (2): + Request is actively being processed. + DONE (3): + The batch processing is done. + CANCELLED (4): + The batch processing was cancelled. + """ STATE_UNSPECIFIED = 0 CREATED = 1 RUNNING = 2 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1/types/product_search_service.py b/packages/google-cloud-vision/google/cloud/vision_v1/types/product_search_service.py index 3b91b3e79e90..24f715c36748 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1/types/product_search_service.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1/types/product_search_service.py @@ -997,6 +997,24 @@ class BatchOperationMetadata(proto.Message): class State(proto.Enum): r"""Enumerates the possible states that the batch request can be in. + + Values: + STATE_UNSPECIFIED (0): + Invalid. + PROCESSING (1): + Request is actively being processed. + SUCCESSFUL (2): + The request is done and at least one item has + been successfully processed. + FAILED (3): + The request is done and no item has been + successfully processed. + CANCELLED (4): + The request is done after the + longrunning.Operations.CancelOperation has been + called by the user. Any records that were + processed before the cancel command are output + as specified in the request. """ STATE_UNSPECIFIED = 0 PROCESSING = 1 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1/types/text_annotation.py b/packages/google-cloud-vision/google/cloud/vision_v1/types/text_annotation.py index 2298ad0b88bd..febc99632d0d 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1/types/text_annotation.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1/types/text_annotation.py @@ -82,7 +82,24 @@ class DetectedBreak(proto.Message): """ class BreakType(proto.Enum): - r"""Enum to denote the type of break found. New line, space etc.""" + r"""Enum to denote the type of break found. New line, space etc. + + Values: + UNKNOWN (0): + Unknown break label type. + SPACE (1): + Regular space. + SURE_SPACE (2): + Sure space (very wide). + EOL_SURE_SPACE (3): + Line-wrapping break. + HYPHEN (4): + End-line hyphen that is not present in text; does not + co-occur with ``SPACE``, ``LEADER_SPACE``, or + ``LINE_BREAK``. + LINE_BREAK (5): + Line break that ends a paragraph. + """ UNKNOWN = 0 SPACE = 1 SURE_SPACE = 2 @@ -221,7 +238,22 @@ class Block(proto.Message): """ class BlockType(proto.Enum): - r"""Type of a block (text, image etc) as identified by OCR.""" + r"""Type of a block (text, image etc) as identified by OCR. + + Values: + UNKNOWN (0): + Unknown block type. + TEXT (1): + Regular text block. + TABLE (2): + Table block. + PICTURE (3): + Image block. + RULER (4): + Horizontal/vertical line box. + BARCODE (5): + Barcode block. + """ UNKNOWN = 0 TEXT = 1 TABLE = 2 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/services/image_annotator/client.py b/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/services/image_annotator/client.py index 204442d41946..bb3945a7c740 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/services/image_annotator/client.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/services/image_annotator/client.py @@ -524,7 +524,7 @@ def sample_batch_annotate_images(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ImageAnnotatorClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/image_annotator.py b/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/image_annotator.py index c2d0d4644970..e68965ac088e 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/image_annotator.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/image_annotator.py @@ -58,6 +58,25 @@ class Likelihood(proto.Enum): r"""A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades. + + Values: + UNKNOWN (0): + Unknown likelihood. + VERY_UNLIKELY (1): + It is very unlikely that the image belongs to + the specified vertical. + UNLIKELY (2): + It is unlikely that the image belongs to the + specified vertical. + POSSIBLE (3): + It is possible that the image belongs to the + specified vertical. + LIKELY (4): + It is likely that the image belongs to the + specified vertical. + VERY_LIKELY (5): + It is very likely that the image belongs to + the specified vertical. """ UNKNOWN = 0 VERY_UNLIKELY = 1 @@ -88,7 +107,35 @@ class Feature(proto.Message): """ class Type(proto.Enum): - r"""Type of image feature.""" + r"""Type of image feature. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified feature type. + FACE_DETECTION (1): + Run face detection. + LANDMARK_DETECTION (2): + Run landmark detection. + LOGO_DETECTION (3): + Run logo detection. + LABEL_DETECTION (4): + Run label detection. + TEXT_DETECTION (5): + Run OCR. + DOCUMENT_TEXT_DETECTION (11): + Run dense text document OCR. Takes precedence when both + DOCUMENT_TEXT_DETECTION and TEXT_DETECTION are present. + SAFE_SEARCH_DETECTION (6): + Run computer vision models to compute image + safe-search properties. + IMAGE_PROPERTIES (7): + Compute a set of image properties, such as + the image's dominant colors. + CROP_HINTS (9): + Run crop hints. + WEB_DETECTION (10): + Run web detection. + """ TYPE_UNSPECIFIED = 0 FACE_DETECTION = 1 LANDMARK_DETECTION = 2 @@ -249,6 +296,79 @@ class Type(proto.Enum): vantage of the viewer of the image without considering mirror projections typical of photos. So, ``LEFT_EYE``, typically, is the person's right eye. + + Values: + UNKNOWN_LANDMARK (0): + Unknown face landmark detected. Should not be + filled. + LEFT_EYE (1): + Left eye. + RIGHT_EYE (2): + Right eye. + LEFT_OF_LEFT_EYEBROW (3): + Left of left eyebrow. + RIGHT_OF_LEFT_EYEBROW (4): + Right of left eyebrow. + LEFT_OF_RIGHT_EYEBROW (5): + Left of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW (6): + Right of right eyebrow. + MIDPOINT_BETWEEN_EYES (7): + Midpoint between eyes. + NOSE_TIP (8): + Nose tip. + UPPER_LIP (9): + Upper lip. + LOWER_LIP (10): + Lower lip. + MOUTH_LEFT (11): + Mouth left. + MOUTH_RIGHT (12): + Mouth right. + MOUTH_CENTER (13): + Mouth center. + NOSE_BOTTOM_RIGHT (14): + Nose, bottom right. + NOSE_BOTTOM_LEFT (15): + Nose, bottom left. + NOSE_BOTTOM_CENTER (16): + Nose, bottom center. + LEFT_EYE_TOP_BOUNDARY (17): + Left eye, top boundary. + LEFT_EYE_RIGHT_CORNER (18): + Left eye, right corner. + LEFT_EYE_BOTTOM_BOUNDARY (19): + Left eye, bottom boundary. + LEFT_EYE_LEFT_CORNER (20): + Left eye, left corner. + RIGHT_EYE_TOP_BOUNDARY (21): + Right eye, top boundary. + RIGHT_EYE_RIGHT_CORNER (22): + Right eye, right corner. + RIGHT_EYE_BOTTOM_BOUNDARY (23): + Right eye, bottom boundary. + RIGHT_EYE_LEFT_CORNER (24): + Right eye, left corner. + LEFT_EYEBROW_UPPER_MIDPOINT (25): + Left eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT (26): + Right eyebrow, upper midpoint. + LEFT_EAR_TRAGION (27): + Left ear tragion. + RIGHT_EAR_TRAGION (28): + Right ear tragion. + LEFT_EYE_PUPIL (29): + Left eye pupil. + RIGHT_EYE_PUPIL (30): + Right eye pupil. + FOREHEAD_GLABELLA (31): + Forehead glabella. + CHIN_GNATHION (32): + Chin gnathion. + CHIN_LEFT_GONION (33): + Chin left gonion. + CHIN_RIGHT_GONION (34): + Chin right gonion. """ UNKNOWN_LANDMARK = 0 LEFT_EYE = 1 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/text_annotation.py b/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/text_annotation.py index 2b3071337175..294fdbe11ab9 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/text_annotation.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p1beta1/types/text_annotation.py @@ -82,7 +82,24 @@ class DetectedBreak(proto.Message): """ class BreakType(proto.Enum): - r"""Enum to denote the type of break found. New line, space etc.""" + r"""Enum to denote the type of break found. New line, space etc. + + Values: + UNKNOWN (0): + Unknown break label type. + SPACE (1): + Regular space. + SURE_SPACE (2): + Sure space (very wide). + EOL_SURE_SPACE (3): + Line-wrapping break. + HYPHEN (4): + End-line hyphen that is not present in text; does not + co-occur with ``SPACE``, ``LEADER_SPACE``, or + ``LINE_BREAK``. + LINE_BREAK (5): + Line break that ends a paragraph. + """ UNKNOWN = 0 SPACE = 1 SURE_SPACE = 2 @@ -206,7 +223,22 @@ class Block(proto.Message): """ class BlockType(proto.Enum): - r"""Type of a block (text, image etc) as identified by OCR.""" + r"""Type of a block (text, image etc) as identified by OCR. + + Values: + UNKNOWN (0): + Unknown block type. + TEXT (1): + Regular text block. + TABLE (2): + Table block. + PICTURE (3): + Image block. + RULER (4): + Horizontal/vertical line box. + BARCODE (5): + Barcode block. + """ UNKNOWN = 0 TEXT = 1 TABLE = 2 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/services/image_annotator/client.py b/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/services/image_annotator/client.py index ba233b13a254..ea05405e8ea5 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/services/image_annotator/client.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/services/image_annotator/client.py @@ -651,7 +651,7 @@ def sample_async_batch_annotate_files(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ImageAnnotatorClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/image_annotator.py b/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/image_annotator.py index a0ca57ada0af..929c76484eb4 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/image_annotator.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/image_annotator.py @@ -70,6 +70,25 @@ class Likelihood(proto.Enum): r"""A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades. + + Values: + UNKNOWN (0): + Unknown likelihood. + VERY_UNLIKELY (1): + It is very unlikely that the image belongs to + the specified vertical. + UNLIKELY (2): + It is unlikely that the image belongs to the + specified vertical. + POSSIBLE (3): + It is possible that the image belongs to the + specified vertical. + LIKELY (4): + It is likely that the image belongs to the + specified vertical. + VERY_LIKELY (5): + It is very likely that the image belongs to + the specified vertical. """ UNKNOWN = 0 VERY_UNLIKELY = 1 @@ -100,7 +119,39 @@ class Feature(proto.Message): """ class Type(proto.Enum): - r"""Type of Google Cloud Vision API feature to be extracted.""" + r"""Type of Google Cloud Vision API feature to be extracted. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified feature type. + FACE_DETECTION (1): + Run face detection. + LANDMARK_DETECTION (2): + Run landmark detection. + LOGO_DETECTION (3): + Run logo detection. + LABEL_DETECTION (4): + Run label detection. + TEXT_DETECTION (5): + Run text detection / optical character recognition (OCR). + Text detection is optimized for areas of text within a + larger image; if the image is a document, use + ``DOCUMENT_TEXT_DETECTION`` instead. + DOCUMENT_TEXT_DETECTION (11): + Run dense text document OCR. Takes precedence when both + ``DOCUMENT_TEXT_DETECTION`` and ``TEXT_DETECTION`` are + present. + SAFE_SEARCH_DETECTION (6): + Run Safe Search to detect potentially unsafe + or undesirable content. + IMAGE_PROPERTIES (7): + Compute a set of image properties, such as + the image's dominant colors. + CROP_HINTS (9): + Run crop hints. + WEB_DETECTION (10): + Run web detection. + """ TYPE_UNSPECIFIED = 0 FACE_DETECTION = 1 LANDMARK_DETECTION = 2 @@ -271,6 +322,79 @@ class Type(proto.Enum): vantage of the viewer of the image without considering mirror projections typical of photos. So, ``LEFT_EYE``, typically, is the person's right eye. + + Values: + UNKNOWN_LANDMARK (0): + Unknown face landmark detected. Should not be + filled. + LEFT_EYE (1): + Left eye. + RIGHT_EYE (2): + Right eye. + LEFT_OF_LEFT_EYEBROW (3): + Left of left eyebrow. + RIGHT_OF_LEFT_EYEBROW (4): + Right of left eyebrow. + LEFT_OF_RIGHT_EYEBROW (5): + Left of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW (6): + Right of right eyebrow. + MIDPOINT_BETWEEN_EYES (7): + Midpoint between eyes. + NOSE_TIP (8): + Nose tip. + UPPER_LIP (9): + Upper lip. + LOWER_LIP (10): + Lower lip. + MOUTH_LEFT (11): + Mouth left. + MOUTH_RIGHT (12): + Mouth right. + MOUTH_CENTER (13): + Mouth center. + NOSE_BOTTOM_RIGHT (14): + Nose, bottom right. + NOSE_BOTTOM_LEFT (15): + Nose, bottom left. + NOSE_BOTTOM_CENTER (16): + Nose, bottom center. + LEFT_EYE_TOP_BOUNDARY (17): + Left eye, top boundary. + LEFT_EYE_RIGHT_CORNER (18): + Left eye, right corner. + LEFT_EYE_BOTTOM_BOUNDARY (19): + Left eye, bottom boundary. + LEFT_EYE_LEFT_CORNER (20): + Left eye, left corner. + RIGHT_EYE_TOP_BOUNDARY (21): + Right eye, top boundary. + RIGHT_EYE_RIGHT_CORNER (22): + Right eye, right corner. + RIGHT_EYE_BOTTOM_BOUNDARY (23): + Right eye, bottom boundary. + RIGHT_EYE_LEFT_CORNER (24): + Right eye, left corner. + LEFT_EYEBROW_UPPER_MIDPOINT (25): + Left eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT (26): + Right eyebrow, upper midpoint. + LEFT_EAR_TRAGION (27): + Left ear tragion. + RIGHT_EAR_TRAGION (28): + Right ear tragion. + LEFT_EYE_PUPIL (29): + Left eye pupil. + RIGHT_EYE_PUPIL (30): + Right eye pupil. + FOREHEAD_GLABELLA (31): + Forehead glabella. + CHIN_GNATHION (32): + Chin gnathion. + CHIN_LEFT_GONION (33): + Chin left gonion. + CHIN_RIGHT_GONION (34): + Chin right gonion. """ UNKNOWN_LANDMARK = 0 LEFT_EYE = 1 @@ -1243,7 +1367,20 @@ class OperationMetadata(proto.Message): """ class State(proto.Enum): - r"""Batch operation states.""" + r"""Batch operation states. + + Values: + STATE_UNSPECIFIED (0): + Invalid. + CREATED (1): + Request is received. + RUNNING (2): + Request is actively being processed. + DONE (3): + The batch processing is done. + CANCELLED (4): + The batch processing was cancelled. + """ STATE_UNSPECIFIED = 0 CREATED = 1 RUNNING = 2 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/text_annotation.py b/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/text_annotation.py index 9ab0d9678073..71c2bab1f800 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/text_annotation.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p2beta1/types/text_annotation.py @@ -82,7 +82,24 @@ class DetectedBreak(proto.Message): """ class BreakType(proto.Enum): - r"""Enum to denote the type of break found. New line, space etc.""" + r"""Enum to denote the type of break found. New line, space etc. + + Values: + UNKNOWN (0): + Unknown break label type. + SPACE (1): + Regular space. + SURE_SPACE (2): + Sure space (very wide). + EOL_SURE_SPACE (3): + Line-wrapping break. + HYPHEN (4): + End-line hyphen that is not present in text; does not + co-occur with ``SPACE``, ``LEADER_SPACE``, or + ``LINE_BREAK``. + LINE_BREAK (5): + Line break that ends a paragraph. + """ UNKNOWN = 0 SPACE = 1 SURE_SPACE = 2 @@ -221,7 +238,22 @@ class Block(proto.Message): """ class BlockType(proto.Enum): - r"""Type of a block (text, image etc) as identified by OCR.""" + r"""Type of a block (text, image etc) as identified by OCR. + + Values: + UNKNOWN (0): + Unknown block type. + TEXT (1): + Regular text block. + TABLE (2): + Table block. + PICTURE (3): + Image block. + RULER (4): + Horizontal/vertical line box. + BARCODE (5): + Barcode block. + """ UNKNOWN = 0 TEXT = 1 TABLE = 2 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/image_annotator/client.py b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/image_annotator/client.py index 6d28b9742125..8dc71ced2101 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/image_annotator/client.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/image_annotator/client.py @@ -697,7 +697,7 @@ def sample_async_batch_annotate_files(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ImageAnnotatorClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/product_search/client.py b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/product_search/client.py index 820ac2487067..e05cf1e2b41e 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/product_search/client.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/services/product_search/client.py @@ -2730,7 +2730,7 @@ def sample_import_product_sets(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ProductSearchClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/image_annotator.py b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/image_annotator.py index e3fec2ac7ad9..7bf9ec32b2e2 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/image_annotator.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/image_annotator.py @@ -72,6 +72,25 @@ class Likelihood(proto.Enum): r"""A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades. + + Values: + UNKNOWN (0): + Unknown likelihood. + VERY_UNLIKELY (1): + It is very unlikely that the image belongs to + the specified vertical. + UNLIKELY (2): + It is unlikely that the image belongs to the + specified vertical. + POSSIBLE (3): + It is possible that the image belongs to the + specified vertical. + LIKELY (4): + It is likely that the image belongs to the + specified vertical. + VERY_LIKELY (5): + It is very likely that the image belongs to + the specified vertical. """ UNKNOWN = 0 VERY_UNLIKELY = 1 @@ -102,7 +121,43 @@ class Feature(proto.Message): """ class Type(proto.Enum): - r"""Type of Google Cloud Vision API feature to be extracted.""" + r"""Type of Google Cloud Vision API feature to be extracted. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified feature type. + FACE_DETECTION (1): + Run face detection. + LANDMARK_DETECTION (2): + Run landmark detection. + LOGO_DETECTION (3): + Run logo detection. + LABEL_DETECTION (4): + Run label detection. + TEXT_DETECTION (5): + Run text detection / optical character recognition (OCR). + Text detection is optimized for areas of text within a + larger image; if the image is a document, use + ``DOCUMENT_TEXT_DETECTION`` instead. + DOCUMENT_TEXT_DETECTION (11): + Run dense text document OCR. Takes precedence when both + ``DOCUMENT_TEXT_DETECTION`` and ``TEXT_DETECTION`` are + present. + SAFE_SEARCH_DETECTION (6): + Run Safe Search to detect potentially unsafe + or undesirable content. + IMAGE_PROPERTIES (7): + Compute a set of image properties, such as + the image's dominant colors. + CROP_HINTS (9): + Run crop hints. + WEB_DETECTION (10): + Run web detection. + PRODUCT_SEARCH (12): + Run Product Search. + OBJECT_LOCALIZATION (19): + Run localizer for object detection. + """ TYPE_UNSPECIFIED = 0 FACE_DETECTION = 1 LANDMARK_DETECTION = 2 @@ -275,6 +330,79 @@ class Type(proto.Enum): vantage of the viewer of the image without considering mirror projections typical of photos. So, ``LEFT_EYE``, typically, is the person's right eye. + + Values: + UNKNOWN_LANDMARK (0): + Unknown face landmark detected. Should not be + filled. + LEFT_EYE (1): + Left eye. + RIGHT_EYE (2): + Right eye. + LEFT_OF_LEFT_EYEBROW (3): + Left of left eyebrow. + RIGHT_OF_LEFT_EYEBROW (4): + Right of left eyebrow. + LEFT_OF_RIGHT_EYEBROW (5): + Left of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW (6): + Right of right eyebrow. + MIDPOINT_BETWEEN_EYES (7): + Midpoint between eyes. + NOSE_TIP (8): + Nose tip. + UPPER_LIP (9): + Upper lip. + LOWER_LIP (10): + Lower lip. + MOUTH_LEFT (11): + Mouth left. + MOUTH_RIGHT (12): + Mouth right. + MOUTH_CENTER (13): + Mouth center. + NOSE_BOTTOM_RIGHT (14): + Nose, bottom right. + NOSE_BOTTOM_LEFT (15): + Nose, bottom left. + NOSE_BOTTOM_CENTER (16): + Nose, bottom center. + LEFT_EYE_TOP_BOUNDARY (17): + Left eye, top boundary. + LEFT_EYE_RIGHT_CORNER (18): + Left eye, right corner. + LEFT_EYE_BOTTOM_BOUNDARY (19): + Left eye, bottom boundary. + LEFT_EYE_LEFT_CORNER (20): + Left eye, left corner. + RIGHT_EYE_TOP_BOUNDARY (21): + Right eye, top boundary. + RIGHT_EYE_RIGHT_CORNER (22): + Right eye, right corner. + RIGHT_EYE_BOTTOM_BOUNDARY (23): + Right eye, bottom boundary. + RIGHT_EYE_LEFT_CORNER (24): + Right eye, left corner. + LEFT_EYEBROW_UPPER_MIDPOINT (25): + Left eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT (26): + Right eyebrow, upper midpoint. + LEFT_EAR_TRAGION (27): + Left ear tragion. + RIGHT_EAR_TRAGION (28): + Right ear tragion. + LEFT_EYE_PUPIL (29): + Left eye pupil. + RIGHT_EYE_PUPIL (30): + Right eye pupil. + FOREHEAD_GLABELLA (31): + Forehead glabella. + CHIN_GNATHION (32): + Chin gnathion. + CHIN_LEFT_GONION (33): + Chin left gonion. + CHIN_RIGHT_GONION (34): + Chin right gonion. """ UNKNOWN_LANDMARK = 0 LEFT_EYE = 1 @@ -1316,7 +1444,20 @@ class OperationMetadata(proto.Message): """ class State(proto.Enum): - r"""Batch operation states.""" + r"""Batch operation states. + + Values: + STATE_UNSPECIFIED (0): + Invalid. + CREATED (1): + Request is received. + RUNNING (2): + Request is actively being processed. + DONE (3): + The batch processing is done. + CANCELLED (4): + The batch processing was cancelled. + """ STATE_UNSPECIFIED = 0 CREATED = 1 RUNNING = 2 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/product_search_service.py b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/product_search_service.py index 9590d9f925f2..32635f617c0a 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/product_search_service.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/product_search_service.py @@ -978,6 +978,24 @@ class BatchOperationMetadata(proto.Message): class State(proto.Enum): r"""Enumerates the possible states that the batch request can be in. + + Values: + STATE_UNSPECIFIED (0): + Invalid. + PROCESSING (1): + Request is actively being processed. + SUCCESSFUL (2): + The request is done and at least one item has + been successfully processed. + FAILED (3): + The request is done and no item has been + successfully processed. + CANCELLED (4): + The request is done after the + longrunning.Operations.CancelOperation has been + called by the user. Any records that were + processed before the cancel command are output + as specified in the request. """ STATE_UNSPECIFIED = 0 PROCESSING = 1 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/text_annotation.py b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/text_annotation.py index aac0c22ac472..689548dc5c9d 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/text_annotation.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p3beta1/types/text_annotation.py @@ -82,7 +82,24 @@ class DetectedBreak(proto.Message): """ class BreakType(proto.Enum): - r"""Enum to denote the type of break found. New line, space etc.""" + r"""Enum to denote the type of break found. New line, space etc. + + Values: + UNKNOWN (0): + Unknown break label type. + SPACE (1): + Regular space. + SURE_SPACE (2): + Sure space (very wide). + EOL_SURE_SPACE (3): + Line-wrapping break. + HYPHEN (4): + End-line hyphen that is not present in text; does not + co-occur with ``SPACE``, ``LEADER_SPACE``, or + ``LINE_BREAK``. + LINE_BREAK (5): + Line break that ends a paragraph. + """ UNKNOWN = 0 SPACE = 1 SURE_SPACE = 2 @@ -221,7 +238,22 @@ class Block(proto.Message): """ class BlockType(proto.Enum): - r"""Type of a block (text, image etc) as identified by OCR.""" + r"""Type of a block (text, image etc) as identified by OCR. + + Values: + UNKNOWN (0): + Unknown block type. + TEXT (1): + Regular text block. + TABLE (2): + Table block. + PICTURE (3): + Image block. + RULER (4): + Horizontal/vertical line box. + BARCODE (5): + Barcode block. + """ UNKNOWN = 0 TEXT = 1 TABLE = 2 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/image_annotator/client.py b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/image_annotator/client.py index 1776dfa45c12..abcc8a1dfa16 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/image_annotator/client.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/image_annotator/client.py @@ -944,7 +944,7 @@ def sample_async_batch_annotate_files(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ImageAnnotatorClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/product_search/client.py b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/product_search/client.py index d1f2252218db..e94709ae3b91 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/product_search/client.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/services/product_search/client.py @@ -2867,7 +2867,7 @@ def sample_purge_products(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ProductSearchClient": return self def __exit__(self, type, value, traceback): diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/image_annotator.py b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/image_annotator.py index 5b5a557adf22..fb61a8467de6 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/image_annotator.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/image_annotator.py @@ -78,6 +78,20 @@ class Likelihood(proto.Enum): r"""A bucketized representation of likelihood, which is intended to give clients highly stable results across model upgrades. + + Values: + UNKNOWN (0): + Unknown likelihood. + VERY_UNLIKELY (1): + It is very unlikely. + UNLIKELY (2): + It is unlikely. + POSSIBLE (3): + It is possible. + LIKELY (4): + It is likely. + VERY_LIKELY (5): + It is very likely. """ UNKNOWN = 0 VERY_UNLIKELY = 1 @@ -108,7 +122,43 @@ class Feature(proto.Message): """ class Type(proto.Enum): - r"""Type of Google Cloud Vision API feature to be extracted.""" + r"""Type of Google Cloud Vision API feature to be extracted. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified feature type. + FACE_DETECTION (1): + Run face detection. + LANDMARK_DETECTION (2): + Run landmark detection. + LOGO_DETECTION (3): + Run logo detection. + LABEL_DETECTION (4): + Run label detection. + TEXT_DETECTION (5): + Run text detection / optical character recognition (OCR). + Text detection is optimized for areas of text within a + larger image; if the image is a document, use + ``DOCUMENT_TEXT_DETECTION`` instead. + DOCUMENT_TEXT_DETECTION (11): + Run dense text document OCR. Takes precedence when both + ``DOCUMENT_TEXT_DETECTION`` and ``TEXT_DETECTION`` are + present. + SAFE_SEARCH_DETECTION (6): + Run Safe Search to detect potentially unsafe + or undesirable content. + IMAGE_PROPERTIES (7): + Compute a set of image properties, such as + the image's dominant colors. + CROP_HINTS (9): + Run crop hints. + WEB_DETECTION (10): + Run web detection. + PRODUCT_SEARCH (12): + Run Product Search. + OBJECT_LOCALIZATION (19): + Run localizer for object detection. + """ TYPE_UNSPECIFIED = 0 FACE_DETECTION = 1 LANDMARK_DETECTION = 2 @@ -289,6 +339,79 @@ class Type(proto.Enum): vantage of the viewer of the image without considering mirror projections typical of photos. So, ``LEFT_EYE``, typically, is the person's right eye. + + Values: + UNKNOWN_LANDMARK (0): + Unknown face landmark detected. Should not be + filled. + LEFT_EYE (1): + Left eye. + RIGHT_EYE (2): + Right eye. + LEFT_OF_LEFT_EYEBROW (3): + Left of left eyebrow. + RIGHT_OF_LEFT_EYEBROW (4): + Right of left eyebrow. + LEFT_OF_RIGHT_EYEBROW (5): + Left of right eyebrow. + RIGHT_OF_RIGHT_EYEBROW (6): + Right of right eyebrow. + MIDPOINT_BETWEEN_EYES (7): + Midpoint between eyes. + NOSE_TIP (8): + Nose tip. + UPPER_LIP (9): + Upper lip. + LOWER_LIP (10): + Lower lip. + MOUTH_LEFT (11): + Mouth left. + MOUTH_RIGHT (12): + Mouth right. + MOUTH_CENTER (13): + Mouth center. + NOSE_BOTTOM_RIGHT (14): + Nose, bottom right. + NOSE_BOTTOM_LEFT (15): + Nose, bottom left. + NOSE_BOTTOM_CENTER (16): + Nose, bottom center. + LEFT_EYE_TOP_BOUNDARY (17): + Left eye, top boundary. + LEFT_EYE_RIGHT_CORNER (18): + Left eye, right corner. + LEFT_EYE_BOTTOM_BOUNDARY (19): + Left eye, bottom boundary. + LEFT_EYE_LEFT_CORNER (20): + Left eye, left corner. + RIGHT_EYE_TOP_BOUNDARY (21): + Right eye, top boundary. + RIGHT_EYE_RIGHT_CORNER (22): + Right eye, right corner. + RIGHT_EYE_BOTTOM_BOUNDARY (23): + Right eye, bottom boundary. + RIGHT_EYE_LEFT_CORNER (24): + Right eye, left corner. + LEFT_EYEBROW_UPPER_MIDPOINT (25): + Left eyebrow, upper midpoint. + RIGHT_EYEBROW_UPPER_MIDPOINT (26): + Right eyebrow, upper midpoint. + LEFT_EAR_TRAGION (27): + Left ear tragion. + RIGHT_EAR_TRAGION (28): + Right ear tragion. + LEFT_EYE_PUPIL (29): + Left eye pupil. + RIGHT_EYE_PUPIL (30): + Right eye pupil. + FOREHEAD_GLABELLA (31): + Forehead glabella. + CHIN_GNATHION (32): + Chin gnathion. + CHIN_LEFT_GONION (33): + Chin left gonion. + CHIN_RIGHT_GONION (34): + Chin right gonion. """ UNKNOWN_LANDMARK = 0 LEFT_EYE = 1 @@ -1509,7 +1632,20 @@ class OperationMetadata(proto.Message): """ class State(proto.Enum): - r"""Batch operation states.""" + r"""Batch operation states. + + Values: + STATE_UNSPECIFIED (0): + Invalid. + CREATED (1): + Request is received. + RUNNING (2): + Request is actively being processed. + DONE (3): + The batch processing is done. + CANCELLED (4): + The batch processing was cancelled. + """ STATE_UNSPECIFIED = 0 CREATED = 1 RUNNING = 2 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/product_search_service.py b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/product_search_service.py index 92663457044c..90f878141d49 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/product_search_service.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/product_search_service.py @@ -999,6 +999,24 @@ class BatchOperationMetadata(proto.Message): class State(proto.Enum): r"""Enumerates the possible states that the batch request can be in. + + Values: + STATE_UNSPECIFIED (0): + Invalid. + PROCESSING (1): + Request is actively being processed. + SUCCESSFUL (2): + The request is done and at least one item has + been successfully processed. + FAILED (3): + The request is done and no item has been + successfully processed. + CANCELLED (4): + The request is done after the + longrunning.Operations.CancelOperation has been + called by the user. Any records that were + processed before the cancel command are output + as specified in the request. """ STATE_UNSPECIFIED = 0 PROCESSING = 1 diff --git a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/text_annotation.py b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/text_annotation.py index 11c932704352..ccf90ea8cfa7 100644 --- a/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/text_annotation.py +++ b/packages/google-cloud-vision/google/cloud/vision_v1p4beta1/types/text_annotation.py @@ -82,7 +82,24 @@ class DetectedBreak(proto.Message): """ class BreakType(proto.Enum): - r"""Enum to denote the type of break found. New line, space etc.""" + r"""Enum to denote the type of break found. New line, space etc. + + Values: + UNKNOWN (0): + Unknown break label type. + SPACE (1): + Regular space. + SURE_SPACE (2): + Sure space (very wide). + EOL_SURE_SPACE (3): + Line-wrapping break. + HYPHEN (4): + End-line hyphen that is not present in text; does not + co-occur with ``SPACE``, ``LEADER_SPACE``, or + ``LINE_BREAK``. + LINE_BREAK (5): + Line break that ends a paragraph. + """ UNKNOWN = 0 SPACE = 1 SURE_SPACE = 2 @@ -221,7 +238,22 @@ class Block(proto.Message): """ class BlockType(proto.Enum): - r"""Type of a block (text, image etc) as identified by OCR.""" + r"""Type of a block (text, image etc) as identified by OCR. + + Values: + UNKNOWN (0): + Unknown block type. + TEXT (1): + Regular text block. + TABLE (2): + Table block. + PICTURE (3): + Image block. + RULER (4): + Horizontal/vertical line box. + BARCODE (5): + Barcode block. + """ UNKNOWN = 0 TEXT = 1 TABLE = 2 diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json index d37e6933b762..e29e0ec20f4f 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.3.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json index ec4fe3035369..70f20c5e5334 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.3.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json index 0cd619f37c15..52e22f36f702 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.3.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json index 4406cd9365c3..2dae915e840f 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p3beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.3.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json index a9b1e5d35f57..a1201ce42817 100644 --- a/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated_samples/snippet_metadata_google.cloud.vision.v1p4beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-vision", - "version": "3.3.0" + "version": "0.1.0" }, "snippets": [ {